How to achive this morphing sphere

Started by
1 comment, last by unbird 10 years, 4 months ago

In these pictures in lower right corner can be seen a sphere that is changing its shape.

sphere1.jpgsphere2.jpgsphere3.jpg

I wonder how I can build this sphere. Probably it is some kind of sin function or something similar. The direct link for demo is here.

Advertisement

Maybe some function with Perlin noise would work or I though I could use some function with sin and some random values like A*sin(a) + A*cos(a) + A*sin(b) where A is some function of random values and interpolated and a and b are angles in spherical coordinates. Would something like this work ?

Well, just play with it, that's what demo programming is about wink.png

I wonder if you need a random source here, let alone perlin. But yes, starting with a Sine wave looks appropriate. E.g. start with a sphere mesh and distort its coordinates like so:



x += amplitude * sin(x * k + time * omega)
Do this for each coordinate separately, using different wavenumbers (k) and frequencies (omega).

Or distort the polar coordinates (including radius).

Don't forget to post screenshots when you got something.

PS: Warning for others: Small demos use tricks to shrink the exe size, my virus scanner coughed. Then again: mea culpa laugh.png

This topic is closed to new replies.

Advertisement