|
|
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
|
|