|
|
> Next step (after some more testing) will be to implement Proximity() for other
> object types.
Implemented Proximity() now for:
Mesh
Sphere
Box
Triangle
Plane
Disc
Cone (includes cylinder)
For non-solid objects like Triangle, Disc, Cone (if open), the proximity will
always be positive, since there is no well-defined "inside", so for testing
isosurfaces, I set threshold to 0.001 instead of 0.0, so it actually renders a
little thickness around the object.
I also implemented fn_nearest_point, that returns the nearest point calculated
by the Proximity() code.
So for proximity, you define the function like this:
#declare fn_X = function { proximity { shape } }
For nearest_point, you define the function like this:
#declare fn_N = function { nearest_point { shape } }
proximity functions return a double
nearest_point functions return a 3d vector position <x, y, z>
Attached a test render for an open cone, with some test points arrayed around
it.
Post a reply to this message
Attachments:
Download 'test_new.png' (91 KB)
Preview of image 'test_new.png'
|
|