Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Scribble MO
Bob
Newbie
Posts: 2
Permalink
Post Scribble MO
on: June 9, 2015, 10:35
Quote

Hi Sandy et al

I have just completed my polargraph machine broadly following the Instructible. My laser cut sprokets are larger,(24 beads rather than 8, but it seems to be working)

My question is about the way that scribble rendering works. Does it generate fresh code each time the render button is clicked? In other words if I home the pen and then rerun the scribble render without any other alterations to the settings will the pen exactly retrace the first rendering or will it follow a new random path?

Bob

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Scribble MO
on: June 9, 2015, 11:52
Quote

Hi Bob, the randomness is not actually designed any particular way, so I discovered that the default behaviour of the Arduino's random(...) function is to use a known seed each time. That means that you get the same sequence of random numbers each time - predictable randomness! Same exact path.

http://www.polargraph.co.uk/2013/03/random-scribbles/

If you wanted a more random behaviour, then the number generator needs to be seeded with a different number each time. Not hard to do (sample an unconnected analog pin during setup()), but I've never done it. It wasn't causing a problem for me, so I just left it.

sn

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.017 seconds.