|
|
Wasn't it mephuser who wrote:
>Is it possible to convert the Code for the Predefined Shapes into Isosurface
>Code?
>
>Any external programs that can do this?
>
>How do I write Isosurface Code for all the Predefined Shapes such as Torus,
>Sphere, Cube, Rounded cube, cylinder and etc?
There's no general solution. For some shapes there are builtin
functions, like f_sphere(), f_torus(), f_rounded_box(). Some other
shapes have simple formulae, like
#declare Cube=functionfunction { max((y*y-1),(x*x-1),(z*z-1)) }
#declare Cylinder=function { y*y + z*z - R*R }
Prisms and lathes can be achieved with the technique described here:
<http://www.econym.demon.co.uk/isotut/splines.htm#bent>
Check also the alphabetical index of the Isosurface tutorial:
<http://www.econym.demon.co.uk/isotut/xref.htm>
For many shapes there's also the IsoCSG library.
Some shapes, like meshes, are virtually impossible.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|