|
Author |
Topic: finger prints (Read 429 times) |
|
toxi
|
finger prints
« on: Oct 6th, 2003, 4:34pm » |
|
for a detail of a game i'm working on, i've been playing a bit more with perlin noise and the still undoc'ed noiseDetail() function to create random spirals which almost look like finger prints (not necessarily human though) http://www.toxi.co.uk/p5/fingerPrints/ click to leave a random finger print. the code is commented, but here's how it works: the function to draw a random finger print is sampling a random 2D slice of the perlin noise space in various angles/directions (number defined by LATHE_STEPS variable in the source) starting at a random radius for each angle. while iterating through all rings and angles, the noise value is computed for each step and then used to modulate/displace the grow rate of the spiral for that angle and position. so the spiral is growing at a constantly changing rate for and in every direction. instead of drawing the spiral directly, every vertex is first stored in a vertex list which is then used as base to draw 10 (again slightly randomized) copies to create smoother results. a few more words about the noiseDetail() function: in future, this command will be fully documented in the "advanced" Processing reference pages... coming soon, please don't bug ben+casey about it though! i hope, casey is forgiving me for pre-posting this, but for early adopters here's the demo + help text for the function: http://www.toxi.co.uk/p5/noiseDetail/ have fun!
|
http://toxi.co.uk/
|
|
|
rgovostes
|
Re: finger prints
« Reply #1 on: Oct 6th, 2003, 6:31pm » |
|
That is pretty cool! The way it draws the lines makes them look as if they were done with pencils.
|
|
|
|
Koenie
|
Re: finger prints
« Reply #2 on: Oct 6th, 2003, 8:32pm » |
|
That's some pretty cool stuff, going on in that noise() function! I really need to play with it soon. Koenie P.S. I would be kinda scared if my fingerprints would look like those!
|
http://koeniedesign.com
|
|
|
|