teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
teepee_ has joined #openscad
teepee has quit [Remote host closed the connection]
teepee_ is now known as teepee
<linext> damn
<linext> still frozen
<linext> i didn't add the stop condition to the recursion
<linext> i can see the backup file path in the Console
<InPhase> linext: Why not recursion?
<JordanBrown[m]> That would be Bad™.
<linext> ok, i got the code back atleast
<linext> so is there a way to run functions like translate and rotate multiple times on children?
<JordanBrown[m]> sure, why not?
<JordanBrown[m]> The example I gave did that.
<InPhase> linext: branch(d) { translate... rotate... if (d>0) { branch(d-1); } else { children(); } translate... rotate... if (d>0) ... }
<JordanBrown[m]> Here's a slightly fancier version: https://bpa.st/UE6Q
JordanBrown has joined #openscad
<InPhase> linext: Then branch() branch() branch() s(); becomes branch(3) s();
<JordanBrown[m]> testing... are these messages getting out?
<InPhase> linext: Oh, and I see your s is the bar, so maybe work it in there so you don't need branch(1), branch(2), and so on, but it's all done recursively in one go.
<JordanBrown> Did you see my example https://bpa.st/UE6Q ?
<InPhase> linext: It can then be simplified to branch(d) { if (d>0) { translate... rotate... { children(); branch(d-1); } } }
<linext> i don't see any output 3d object
<linext> oh, it's 2d square
<JordanBrown> Mine is 2D because your original was 2D.
<linext> i see
<JordanBrown> The same scheme would apply to 3D.
<JordanBrown> but of course the rotation is all different.
<linext> i started this morning trying to do a 3d tree and the trigonometry was confusing
<InPhase> J2235: lol. I just realized that because my bubble trap comes after your eyes design on the calendar, it looks like a deformed eye at first glance. :) It didn't look like that before it was in the calendar.
<linext> where is the calendar?
<JordanBrown> Here's a 3D variant.
<JordanBrown> Note that there's no trig in either the 2D or 3D variant.
<linext> it think by using center=false you don't need it
<JordanBrown> 3^10 is a much larger number than 2^10
<InPhase> JordanBrown: Link missing?
<JordanBrown> InPhase link missing where?
<JordanBrown[m]> (test)
<JordanBrown[m]> Oh, duh, sorry.
<JordanBrown> 3D variant: https://bpa.st/AJVA
buZz has quit [Ping timeout: 265 seconds]
buZz has joined #openscad
<JordanBrown> But it makes trees that are very much deciduous, not evergreen.
buZz is now known as Guest5990
<InPhase> Well changing 3 to 10 looks neat, even if not like a tree.
<InPhase> I guess maybe that turns the branches into simulated leaves on the top.
<JordanBrown> Yes, with large numbers of branches it starts to look very mushroom-y.
<linext> i'm still having trouble doing the recursion using children()
<JordanBrown> Why do you want to?
<JordanBrown[m]> Or, rather, exactly what do you want to achieve?
<linext> just building upon the original idea
<JordanBrown> Here's a variation that will put a desired "leaf" at the end of the smallest branches: https://bpa.st/E7GQ
<JordanBrown> Having the branch itself be supplied as a child is a little trickier, mostly because there's no direct way to tell how tall it is; you'd have to supply that as an argument.
<InPhase> I totally failed at what I was trying to do with the tree, but it is accidentally pretty. :) https://bpa.st/HZZA
<InPhase> linext: Did you see my line above? That will modify your existing design to recursive.
<InPhase> 23 minutes back.
<linext> i've been loading all the examples
<linext> where i can run translate...rotate x number of times
<JordanBrown> Sure, that's what my branch() does.
splud has quit [Ping timeout: 246 seconds]
<JordanBrown[m]> Here's a variation that lets you supply the branch as a child, and scales it down as appropriate: https://bpa.st/HARA
<JordanBrown[m]> Note that the supplied height (10 in the example) needs to match the height of the first child.
<InPhase> linext: I didn't give a working example, I just explained how to do it. :)
<linext> yea, it works for a tree with one branch
<linext> not so much for two branches
<InPhase> It's the same thing.
<InPhase> You recurse twice.
<JordanBrown> Isn't that the definition of recurse?
<JordanBrown> You curse, and then you curse again.
<InPhase> rerecurse
<JordanBrown[m]> We used to say that FORTRAN was a recursive language, since you could curse at it over and over again.
<teepee> or you ai generate for brilliant results... https://twitter.com/tomo1230/status/1603192237068013568
<teepee> ahhhhhh, there's aliens in the calendar ;-)
<JordanBrown[m]> You don't want the loop around the branch() at the bottom.
<linext> oh wait, my mistake
<linext> translate needs a - sign for the right branch
splud has joined #openscad
<linext> -30/4*-cos...
<JordanBrown[m]> I'm confused by why it's even as interesting as it is, given that all of the rotates around around Z.
<JordanBrown[m]> Ah, but now I see that we are looking down on the model.
linext has quit [Read error: Connection reset by peer]
<JordanBrown[m]> Are you sure that you know what you are doing with that for() loop? I would remove it until you are sure that you understand what's going on with the recursion. It's not clearly wrong, but it will certainly make things more complicated.
linext has joined #openscad
<linext> my pc almost crashed
<linext> i put 100 in for the number of branches
<JordanBrown[m]> Exponential recursion will do that to you.
<JordanBrown[m]> Exponential anything will do that to you.
<linext> 17GB later, hexchat closes by itself, explorer.exe restarts, windows reports running very low on memory
<linext> i have 32GB in this machine and openscad used 17gb
<JordanBrown[m]> But you don't actually have any branches in this model. You only have leaves.
<linext> yes, that's true
<JordanBrown[m]> I need to go off and pretend to work for a while.
TheAssassin has quit [Quit: No Ping reply in 180 seconds.]
TheAssassin has joined #openscad
Guest5990 is now known as buZz
<linext> if openscad exports 3MF is the color info included?
<linext> if so, maybe 3dcustomizer.net could display 3MF using three.js and have a JS function to convert from 3MF to STL
<JordanBrown[m]> no
<JordanBrown[m]> Only preview understands color. Color is lost on render. And preview doesn't produce a 3D model.
<linext> yea, i exported and got that result
<JordanBrown[m]> I have some ideas for color support but I doubt that I will get to them any time soon, and they may well involve undesirable costs.
<JordanBrown[m]> and I have never touched that end of the program and ...
<linext> i suppose there's always exporting separate STL files with some position and color data
<JordanBrown[m]> Right, you generate N properly aligned models, one for each color.
<JordanBrown[m]> Probably you generate them from one file, telling it which color to generate in this run.
<JordanBrown[m]> But you will have to be careful with your design.
<JordanBrown[m]> You should not need out-of-band position data, because STLs are in a particular position.
<linext> that's what i did for http://mylabyrinthlab.com/
<linext> ah, when i load STLs using the view STL plugin, it always puts them centered
<linext> which is annoying
<JordanBrown[m]> That is, if you generate a cube with its origin at [10,10,10], then the cube in the STL has its origin at [10,10,10]. You will need to ensure that your slicer doesn't drop it to the bed.
<JordanBrown[m]> But one assumes that multicolor-capable slicers will let you do that sort of thing easily.
Joel has joined #openscad
LordOfBikes has quit [Ping timeout: 272 seconds]
<InPhase> teepee: That's better than the tree chatgpt made for me.
<InPhase> linext: I don't know what you did in 601R6PD, but it looks awesome. :)
<InPhase> JordanBrown[m]: Are you still doing a Life for the calendar?
<InPhase> I'm about to start working again on the caterpillar.
<JordanBrown[m]> yes, but haven't done much work recently.
<JordanBrown[m]> Not tonight, but I should be able to put it at the top of the list for a couple of hours this week.
<InPhase> We have 4 slots yet.
<InPhase> So 21, 22, 23, 24.
<JordanBrown[m]> Is 24 the last, or 25? Should have something extra-special for the last.
<InPhase> 24 is last.
LordOfBikes has joined #openscad
<InPhase> Well, I note that I've been in 24 for every calendar so far, so I'm perfectly content with someone else filling it. And I think Life is a pretty compelling one for it.
oldlaptop has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<JordanBrown[m]> Nah, not Christmassy enough.
<InPhase> Well I don't think we have anything dazzling and Christmasy coming.
<JordanBrown[m]> Not something where half the people will ask "what the heck is that?"
<InPhase> I had an idea for that, but there's no way I get it done.
<InPhase> But it was only the first calendar that had a Christmas themed 24 anyway.
<InPhase> I think more important is that it is particularly "interesting" or dazzling.
<JordanBrown[m]> yeah, but Life is interesting and maybe dazzling only for those who know what it is.
<InPhase> I'm okay with that. :) I think that has a good overlap with the target audience.
<InPhase> *** Pop survey of the whole channel. Please anyone answer. *** Would you recognize a video of Conway's Game of Life in action if you saw it?
<InPhase> (Without looking it up in response to my question.)
<JordanBrown[m]> crickets :-)
<JordanBrown[m]> I like that I can still ^S after I F6.
<InPhase> I'm much more comfortable about not losing data when I use vim to edit for OpenSCAD.
<InPhase> Which I guess is indicative of some things we should improve.
oldlaptop has joined #openscad
J223589 has joined #openscad
snaked has quit [Remote host closed the connection]
J2235 has quit [Ping timeout: 260 seconds]
extor has quit [Ping timeout: 246 seconds]
EkpyroticFrood has joined #openscad
castaway has joined #openscad
ur5us_ has quit [Ping timeout: 256 seconds]
snaked has joined #openscad
ur5us_ has joined #openscad
TheAssassin has quit [Remote host closed the connection]
aiyion1 has quit [Remote host closed the connection]
TheAssassin has joined #openscad
aiyion1 has joined #openscad
JordanBrown has quit [Ping timeout: 252 seconds]
JordanBrown has joined #openscad
ur5us_ has quit [Ping timeout: 252 seconds]
TheAssassin has quit [Remote host closed the connection]
use-value has joined #openscad
teepee has quit [Remote host closed the connection]
TheAssassin has joined #openscad
teepee has joined #openscad
extor has joined #openscad
KimK_ has joined #openscad
KimK has quit [Ping timeout: 255 seconds]
<J223589> linext here some tree i made years ago https://imgur.com/a/iOJTLN7
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
ur5us_ has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
L29Ah has quit [Ping timeout: 248 seconds]
<Scopeuk> InPhase I've tried to program it in 3d on an led cube before now. might not definitively get get that it is con-ways game of life but it's recognizable as cellular automatator
ur5us_ has quit [Ping timeout: 272 seconds]
use-value has quit [Remote host closed the connection]
use-value has joined #openscad
<teepee> Scopeuk: oh, 3d Game of Life?
epony has quit [Quit: QUIT]
use-value has quit [Ping timeout: 246 seconds]
use-value has joined #openscad
extor has quit [Read error: Connection reset by peer]
epony has joined #openscad
snaked has quit [Quit: Leaving]
Guest39 has joined #openscad
Guest39 has quit [Quit: Client closed]
<InPhase> teepee: The Safari user wants to know how you click on the numbers on the calendar to get the design problem of the day to work on, because it's not working in Safari. https://www.reddit.com/r/openscad/comments/zbtbxe/comment/j09dhvf/?utm_source=reddit&utm_medium=web2x&context=3
<InPhase> teepee: Although we'd probably need someone with both Safari and some web knowledge to figure out what is going wrong there.
x__ has joined #openscad
<teepee> last year it worked :)
<teepee> works fine on ipad
<InPhase> Might be user error, like no javascript.
L29Ah has joined #openscad
<teepee> or apple decided to make funny changes in a recent release of Safari
<teepee> but yes, no javascript means, no doors opening
<teepee> as that's how it's checking data and decide which doors can be opened
aiyion1 has quit [Write error: Connection reset by peer]
teepee has quit [Write error: Connection reset by peer]
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
aiyion1 has joined #openscad
teepee has joined #openscad
TheAssassin has quit [Remote host closed the connection]
teepee has quit [Remote host closed the connection]
TheAssassin has joined #openscad
Guest39 has joined #openscad
teepee has joined #openscad
Guest39 has quit [Client Quit]
Lagopus has joined #openscad
<Scopeuk> teepee I tried to adapt the rules, as it was a small 3d grid with clear columns/rows/layers I was having each node consider it's immediate neighbors only (up/down/left/right/forwards/baclwards) and then apply similar rules, I never got any good results out of it (partially because the cube was likely too small)
<teepee> with openscad and cubes it will just get slow :)
<teepee> no cables needed
aiyion1 has quit [Ping timeout: 255 seconds]
<teepee> but I suppose a 2d version is much more recognizable
<Scopeuk> yeh, that was done because I had the cube "lying around" playing hand coded animations
aiyion1 has joined #openscad
DigitaltNoget has quit [Quit: Leaving]
NogetDigitalt has quit [Quit: Leaving]
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 255 seconds]
teepee_ has joined #openscad
teepee has quit [Remote host closed the connection]
teepee_ is now known as teepee
L29Ah has left #openscad [#openscad]
aiyion1 has quit [Remote host closed the connection]
aiyion1 has joined #openscad
J223589 has quit [Quit: Client closed]
J223589 has joined #openscad
othx has quit [Ping timeout: 252 seconds]
fling has joined #openscad
othx has joined #openscad
aiyion1 has quit [Remote host closed the connection]
<JordanBrown[m]> There has been some work done on 3D cellular automata using Life-like rules.
<Scopeuk> generally on bigger than a 4x4x4 grid I had to work with
<JordanBrown[m]> I found a paper on it a few weeks back, characterizing potential rules and which ones worked well, and how they behaved.
<JordanBrown[m]> yes, bigger than that :-)
<JordanBrown[m]> I don't know about 3D, but a 4x4 grid is only barely big enough to run a blinker in.
<JordanBrown[m]> Eh, I suppose it depends on whether the edges wrap.
<JordanBrown[m]> 3x3 isn't big enough if the edges wrap, but is big enough if they don't.
aiyion1 has joined #openscad
<Scopeuk> I mean 4x4x4 is effectivly 8x8
<Scopeuk> the "naive" approach would be to treat it as one large 2d grid grid
<JordanBrown[m]> Well, yeah, but that isn't really 3D.
<Scopeuk> true, would still likely look pretty
ur5us_ has joined #openscad
JordanBrown has quit [Ping timeout: 252 seconds]
JordanBrown has joined #openscad
aiyion1 is now known as aiyion
L29Ah has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
castaway has quit [Ping timeout: 272 seconds]
use-value has quit [Remote host closed the connection]
use-value has joined #openscad
fling has quit [Ping timeout: 255 seconds]