toxiclibs pumpkin function

Nikolaus Gradwohl2011-10-19T05:16:12+00:00

since helloween is comming nearer I made a processing sketch that generates a 3D pumpkin using the toxiclibs mesh builder. Generating a pumpkin-shape isn't very hard to do when using polar coordinates.

I use a sin of the phi angle to make the shape a litte bit more flat on top and bottom

and than i subtract the absolute of a sin of the tetha angle to generate the segments.

click here to start the sketch or download the sourcecode.

rotating pumpkin