samedi 4 mars 2017

How to generate random blobs?

I would like to generate random shapes in 3D. I want the shapes to be blobs, essentially what could be obtained by taking a sphere and distorting it to be less regularly shaped but still mostly compact. Think taking a ball of clay and pinching or pushing and pulling it slightly. The surface curvature or scale of irregularities on the surface should be controllable using some kind of parameter. I would like the output to be a volume consisting of voxels (1 for inside and 0 for outside), although a surface which can be converted to a volume is also ok.

I've looked at Gaussian random spheres, which are superpositions of spherical harmonics. I couldn't quite figure out the math for these, and there is no sample code anywhere. Also, they can't generate any shape which has an overhang (ie, where a ray from the center of the sphere intersects the surface more than once).




Aucun commentaire:

Enregistrer un commentaire