POV-Ray : Newsgroups : povray.binaries.images : Hesse normal form for lines - distance formula. Server Time
18 Apr 2024 18:34:50 EDT (-0400)
  Hesse normal form for lines - distance formula. (Message 1 to 1 of 1)  
From: William F Pokorny
Subject: Hesse normal form for lines - distance formula.
Date: 4 Dec 2020 10:36:52
Message: <5fca5794$1@news.povray.org>
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'
f_hessian_example.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.