POV-Ray : Newsgroups : povray.advanced-users : Normal vector deformation : Re: Normal vector deformation Server Time
26 Sep 2024 17:44:15 EDT (-0400)
  Re: Normal vector deformation  
From: Tor Olav Kristensen
Date: 13 Jan 2001 21:58:27
Message: <3A61148C.66317755@online.no>
Rune wrote:
> 
> "Chris Huff" wrote:
> > Try something like:
> > #declare SmallValue = 0.01;
> > #declare dN = vnormalize(Deform(P+V*SmallValue) - dP);
> >
> > In other words, deform the point and a second point a short
> > distance along the normal from it, and use the direction from
> > dP to the new point as your normal. This should work in most
> > circumstances, and you could decrease SmallValue for more
> > accuracy.
> 
> Nope, I've already tried that, and it doesn't work.
> Imagine a box deformed by a shearing matrix. The normals on the skewed sides
> should change, but they won't using your method. I think I need several
> points for reference (two points forming vectors perpendicular to the normal
> vector?), but I haven't had any luck so far.

If N is the normal at the point P, then how about trying this ?

#declare dN = vnormalize(Deform(P + 0.01*vnormalize(N)) - Deform(P));


Tor Olav
-- 
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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