POV-Ray : Newsgroups : povray.binaries.animations : Torus Torture : Re: Torus Torture Server Time
20 Jul 2024 17:14:11 EDT (-0400)
  Re: Torus Torture  
From: Rune
Date: 24 Jan 2001 14:45:34
Message: <3a6f30de@news.povray.org>
"Wlodzimierz ABX Skiba" wrote:
> what about deformations where deformation not exist along
> four directions but beetween them ?

What do you mean, "between them"? The tangent vectors are very very small,
so they're always deformed almost exactly the same.

> I think that number of vectors/tangents should be customizable.

I think 4 is plenty.

> if I understand in your method accuracy of this plane
> depends of length of your vectors/tangents

Yes, the smaller the vectors, the more precise. Therefore I always use very
small lengths.

> and I think this length should be also customizable

No, I simply always use a very small length. There's no need to make it
customisable.

> My old method (currently I use exact method served me by
> Jerome Berger in p.u.p) was something like finding smoth
> normals for vertices of not smoothed mesh. I think it has
> the same accuracy level like your method but was more
> customizable.

No, not at all. To find normals for non-smoothed mesh, the only input is the
triangle faces. To get good results with this, a weighted average of the
triangle-normals have to be found. But to deform normals is something
completely different. The input is a normal, not some triangles.

I use the code below to deform a normal. oP is input point. oN is input
normal. deform_mezz is the macro that deforms a point in space. dP is
deformed point. dN is deformed normal. Can you say what exactly is wrong
with this? If you have a more accurate method (in POV-script) I'd be happy
to test it and see if the results are better.

#local oP = SmoothTrianglePoint[Counter];
#local dP = deform_mezz(oP);
#local oN = SmoothTriangleNormal[Counter];
#local SomeVector = <0.4,0.5,0.6>;
#local Small = 0.000001;
#local Na = Perpendiculize(SomeVector,oN);
#local Nb = vcross(Na,oN);
#local nNa = deform_mezz(+Na*Small+oP);
#local nNb = deform_mezz(+Nb*Small+oP);
#local nNc = deform_mezz(-Na*Small+oP);
#local nNd = deform_mezz(-Nb*Small+oP);
#local dN = vnormalize(vcross(nNa-nNc,nNb-nNd));

Oh, and you need this macro:

#macro Perpendiculize (V1,V2)
   vnormalize(vcross(vcross(V2,V1),V2))
#end

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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