The Hesse or Hessian normal form is often used to define planes. There
is a similar encoding for lines; in an old book I stumbled across a
distance formula used as a part the line encoding which makes for a nice
method to specify planes by rotation and offset relative to the y axis.
It naturally divides regions into positive and negative values with good
gradients.
// Set up for left handed rotation about y. 0 angle aligns with x.
#declare FnHessianDist = function (x,y,z,Theta,Offset) {
z*cos(radians(Theta)) + x*sin(radians(Theta)) - Offset
}
It's useful. I'll be creating an inbuilt version called f_hessian_dist
for povr. The SDL written function above can be used in any version of
POV-Ray supporting functions.
Attached in an isosurface doodle making multiple uses of it all bound by
a sphere. You can do octagonal columns and such too. Suppose other ways
to do the same things, but being able to specify just angle and offset
makes it easier.
Bill P.
Post a reply to this message
Attachments:
Download 'f_hessian_example.jpg' (175 KB)
Preview of image 'f_hessian_example.jpg'
|