|
![](/i/fill.gif) |
In article <3a6190d0@news.povray.org>, "Rune" <run### [at] iname com>
wrote:
> It doesn't work, but I can't understand why.
>
> ( Perpendiculize(A,B) adjusts A so it is perpendicular to B. The
> adjusted A is returned. )
I think you need to make two vectors perpendicular to the normal, deform
those, and find a vector perpendicular to those. It looks like this
might have been what you are doing...cross products give me a headache.
Maybe something along the lines of:
#local Small = 0.001;
#macro mezz_deform_dir(P, DP, N) (mezz_deform(P + N*Small) - DP) #end
#macro DeformNormal(Point, deformedPoint, Normal)
#local N1 = Perpendiculize(Normal, y);
#local N2 = Perpendiculize(Normal, N1);
#local N1 = mezz_deform_dir(Point, deformedPoint, N1);
#local N2 = mezz_deform_dir(Point, deformedPoint, N2);
#local deformedNormal = Perpendiculize(N1, N2);
(deformedNormal)
#end
I don't think a third point will be necessary, because the normal
shouldn't change if the surface moves perpendicularly to it...but I may
be wrong, it may be something to try.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |