pca006132 has quit [Remote host closed the connection]
teepee has quit [Ping timeout: 260 seconds]
teepee has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
L29Ah has quit [Read error: Connection reset by peer]
pca006132 has joined #openscad
pca006132 has quit [Remote host closed the connection]
pca006132 has joined #openscad
GNUmoon2 has quit [Ping timeout: 260 seconds]
L29Ah has joined #openscad
teepee has quit [Quit: bye...]
teepee has joined #openscad
J24k57 has quit [Ping timeout: 250 seconds]
R2robot has joined #openscad
qeed_ has joined #openscad
qeed has quit [Ping timeout: 256 seconds]
J24k has joined #openscad
Guest_Plonker has joined #openscad
<Guest_Plonker>
Hi everyone. I'm trying to generate a list that contains elements that are always larger than the previous, but are larger by a random amount. How would i achieve this?
<Guest_Plonker>
I've tried `lt = [ for (i = [0 : floor(rands(1, 4, 1)[0]) : 100]) i];` but it seems that rand is run only once, not every iteration.
<J24k>
Guest_Plonker add i as seed for the rands
<J24k>
hm ok that is not working .. this should lt = [ for (i = [0 : 4 : 100]) i+floor(rands(1, 4, 1)[0])];
<J24k>
Guest_Plonker yes i noticed that too .. you can add the rands to i or recursive ```f=function(in=0,out) in<100? f(in+floor(rands(1, 4, 1)[0]),out=concat(out,in) ) : out;echo(f());```
<Guest_Plonker>
I understand everything happening there, but i wouldn't have been able to write it from scratch. I know the jokes and memes about recursion but i'm definitely not comfortable with it.
<J24k>
that is why i used "out" it makes it much more clearer
<Guest_Plonker>
So different question: `for (j = [0 : 1 : len(lt) - 1]) { echo(lt[j], lt[j+1]); }` works fine but...
<Guest_Plonker>
`for (j = [0 : 1 : len(lt) - 1]) { translate([lt[j] * n, n, 0]) square([n, n], center = false); translate([lt[j+1] * n, n, 0]) square([n, n], center = false); }` gives an "undefined operation (undefined * number)" for that second translate.
<Guest_Plonker>
so `lt[j], lt[j+1]` works in the `echo()` but not in a translate?
<Guest_Plonker>
Yeah, `translate([lt[j] * n, lt[j+1] * n, 0]) square(...)` gives the same error. So you can't access elements other than the current `for` loop iterator in a call to `translate`?
mmu_man has joined #openscad
GNUmoon2 has joined #openscad
pca006132 has quit [Remote host closed the connection]
<Scopeuk>
Hmm I'm wondering if you are reading past the end of the vector
<Scopeuk>
0->len(lt)-1 is fine but once you add the +1 you are going to len(lt)
<Scopeuk>
Which is one past vector end
<Guest_Plonker>
You're spot on, it was an off-by-one error. Wow, that was an idiotic mistake... I feel twenty years younger.
<Guest_Plonker>
in an effort to save my ego, i'd say the error message wasn't particularly helpful.
<Scopeuk>
I don't think I would argue otherwise on that
<Scopeuk>
the error is "technically correct" but not helpful
mmu_man has quit [Ping timeout: 246 seconds]
mmu_man has joined #openscad
extor has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
extor has joined #openscad
drfff has quit [Ping timeout: 260 seconds]
gwillen has quit [Read error: Connection reset by peer]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
snaked has quit [Quit: Leaving]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
Guest_Plonker has quit [Quit: Client closed]
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
fling has quit [Ping timeout: 260 seconds]
fling_ has joined #openscad
fling_ is now known as fling
Guest82 has joined #openscad
<Guest82>
Hello ?
<teepee>
hello Guest82
<Guest82>
Can you point me in a direction to set up a user account for Libera.chat, it only aloowed me to sign in as a guest, no set up account here
<Guest82>
thanks I'll check it out and be back as sidilakies
<teepee>
as additional safety, give those /msg commands in the status channel
<teepee>
that helps not accidentally posting the password :-)
<Guest82>
ok , thanks
sidilakies has joined #openscad
<sidilakies>
Hello, I think I set this up properly.
<InPhase>
Scopeuk: Yeah, it probably would be good if we gave a warning at an out of bounds read. I know to look for it in that situation, but by experience of transitive reasoning on the message implications.
<sidilakies>
I installed Konversation on my system and these posts showed up on the browser version so it's working.
<sidilakies>
Any way I'm here since I started using Openscad and was looking for a place to ask questions, probaly not help since I just started this week. But not new to modeling
<InPhase>
teepee: That mechanical digital clock is pretty cool. :)
<InPhase>
Bad from a usability perspective, but awesome from a mechanical design perspective.
<teepee>
yep, exactly
<teepee>
I wonder if there's some color trick to handle the usability issue
<InPhase>
Rotating 7-element white/black strips would fix it.
<InPhase>
One would just need to translate the extension into a rotate-unrotate with an additional axial component.
<InPhase>
Like a round disk with a radially offset attachment point, and the extension arm being on a pivot.
<teepee>
first thing I want to do is to look at how it's done in detail, there's probably something to learn from that
<InPhase>
And probably putting that all inside, attaching it to the front display by an additional gearing mechanism so that there is no big disk sticking out the front.
<InPhase>
This is clear and doable in my head, so let me know if you decide to try it and can't understand the idea from the terse description. :)
<InPhase>
teepee: Also, I just stumbled on this. It seemed in your aesthetic style, although with different toolsets. :) https://imgur.com/gallery/rLouTQ7
<teepee>
that looks very cool, bonus points for moon craters?
<teepee>
as one of the commentors mentions, there is some sort of "and now magic happened" cut when modelling the surface