|
|
In article <3a60d0eb@news.povray.org>, "Rune" <run### [at] inamecom>
wrote:
> Say the macro Deform(V) will return a deformed version of V.
> If I have the point P I can find the deformed point dP:
> #declare dP = Deform(P)
>
> If I have the normal N, how can I find the deformed normal dN?
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.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|