POV-Ray : Newsgroups : povray.binaries.animations : Torus Torture Server Time
20 Jul 2024 15:31:22 EDT (-0400)
  Torus Torture (Message 11 to 19 of 19)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Rune
Subject: Re: Torus Torture
Date: 19 Jan 2001 15:46:18
Message: <3a68a79a@news.povray.org>
"Wlodzimierz ABX Skiba" wrote:
> how normals are calculated ?
> did you considered my method sended for you to p.a-u ?

I didn't understand your symbolic code.
I think it is close to my own solution anyway. I posted that too. Did you
look at it?

I find points on the plane perpendicular to the input normal, then deform
those points, and then find the deformed normal which is the vector
perpendicular to the deformed points on the plane.
I believe you used n points in your method. I find 4 to be sufficient.

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

From: Wlodzimierz ABX Skiba
Subject: Re: Torus Torture
Date: 22 Jan 2001 12:33:12
Message: <3a6c6ed8@news.povray.org>
Rune wrote in message <3a68a79a@news.povray.org>...
>"Wlodzimierz ABX Skiba" wrote:
> > how normals are calculated ?
> > did you considered my method sended for you to p.a-u ?
>
> I didn't understand your symbolic code.

ough, advenced english is my biggest problem
I can try describe something more if you wish
just go back to this thread and show me where you want explanations

> I find points on the plane perpendicular to the input normal, then deform
> those points, and then find the deformed normal which is the vector
> perpendicular to the deformed points on the plane.
> I believe you used n points in your method. I find 4 to be sufficient.


The main difference beetween my method and your is that you (as I understand)
simply average normals after deformation. You forgot that deformation is not
linear and strength of deformation on one side of normal vector can be different
on the other side. In my method I use weighted averaging dependant of area of
triangles described by deformed perpendicular vectors. As I show some day in
p.b.i this weighted method is more accurate.

ABX


Post a reply to this message

From: Rune
Subject: Re: Torus Torture
Date: 23 Jan 2001 09:20:34
Message: <3a6d9332@news.povray.org>
"Wlodzimierz ABX Skiba" wrote:
> The main difference beetween my method and your is that you
> (as I understand) simply average normals after deformation.

I don't average any normals.

> You forgot that deformation is not linear and strength of
> deformation on one side of normal vector can be different
> on the other side.

No I don't...

> In my method I use weighted averaging dependant of area of
> triangles described by deformed perpendicular vectors.

There are no triangles involved at all in my normal calculations.

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

From: Wlodzimierz ABX Skiba
Subject: Re: Torus Torture
Date: 23 Jan 2001 10:31:59
Message: <3a6da3ef@news.povray.org>
Rune wrote in message <3a6d9332@news.povray.org>...
> "Wlodzimierz ABX Skiba" wrote:
> > The main difference beetween my method and your is that you
> > (as I understand) simply average normals after deformation.
>
> I don't average any normals.

sorry for the mistake but ...
you wrote "I find points on the plane perpendicular to the input normal, then
deform those points, and then find the deformed normal which is the vector
perpendicular to the deformed points on the plane."
I just don't understand this meaning sentence.
How you find normal perpendicular to 4 (you wrote that you best number is 4)
deformed points ? and what plane ? 4 points not describe plane.

> > In my method I use weighted averaging dependant of area of
> > triangles described by deformed perpendicular vectors.
>
> There are no triangles involved at all in my normal calculations.


every two vectors joined to one point describe triangle
I just "virtualize" situation :-)

ABX


Post a reply to this message

From: Rune
Subject: Re: Torus Torture
Date: 23 Jan 2001 14:40:12
Message: <3a6dde1c$1@news.povray.org>
"Wlodzimierz ABX Skiba" wrote:
> sorry for the mistake but ...
> you wrote "I find points on the plane perpendicular to
> the input normal, then deform those points, and then find
> the deformed normal which is the vector perpendicular to
> the deformed points on the plane."
> I just don't understand this meaning sentence.
> How you find normal perpendicular to 4 (you wrote that
> you best number is 4) deformed points ? and what plane ?
> 4 points not describe plane.

I have the input normal vector iN. Then I find 4 vectors perpendicular to
it. Those are tangents. Let's call them iT1, iT2, iT3 and iT4. These all lie
in the plane perpendicular to the input normal vector. Then I apply the
deformation to the 4 tangents, and I get the deformed tangents dT1, dT2,
dT3, dT4. These "describe" the deformed plane. To get the deformed normal I
find the vector that is perpendicular to the 4 deformed tangent vectors. And
yes, I average the tangent vectors 2 and 2 first. But they are tangents, not
normals, so I don't average any normals. And the tangent vectors are simply
added together, so it is automatically a weighted average (because a longer
tangent vector will have greater influence).

> every two vectors joined to one point describe triangle
> I just "virtualize" situation :-)

That may make sense for your method, but not for mine. I don't pair tangent
vectors next to each other, I pair opposite-lying tangent vectors...

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

From: Wlodzimierz ABX Skiba
Subject: Re: Torus Torture
Date: 24 Jan 2001 13:11:22
Message: <3a6f1aca@news.povray.org>
Rune wrote in message <3a6dde1c$1@news.povray.org>...
> I have the input normal vector iN. Then I find 4 vectors perpendicular to
> it. Those are tangents. Let's call them iT1, iT2, iT3 and iT4. These all lie
> in the plane perpendicular to the input normal vector. Then I apply the
> deformation to the 4 tangents, and I get the deformed tangents dT1, dT2,
> dT3, dT4.

what about deformations where deformation not exist along four directions but
beetween them ?
I think that number of vectors/tangents should be customizable.

> These "describe" the deformed plane.

are you sure ?
if I understand in your method accuracy of this plane depends of length of your
vectors/tangents and I think this length should be also customizable

> To get the deformed normal I
> find the vector that is perpendicular to the 4 deformed tangent vectors. And
> yes, I average the tangent vectors 2 and 2 first. But they are tangents, not
> normals, so I don't average any normals.

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.

ABX


Post a reply to this message

From: Rune
Subject: Re: Torus Torture
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

From: Wlodzimierz ABX Skiba
Subject: Re: Torus Torture
Date: 29 Jan 2001 04:15:35
Message: <3a7534b7@news.povray.org>
Rune wrote in 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.

Four tangents describe four directions. What about deformation which operate on
space between this directions and leave space along this directions ? For
example imagine that your tangents are on axis x,z,-x,-z and normal point
somewhere up. Than imagine such deformation:
deform(P)=<P.x*(2^P.z),P.y,P.z*(2^P.x)>
along axes x and z this not change values therefore
deform(<x,y,0>)=<x,y,0>
deform(<0,y,z>)=<0,y,z>

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

there is need - accuracy of floating point operations !!!


> If you have a more accurate method (in POV-script) I'd be happy
> to test it and see if the results are better.

I don't want say that this method is wrong at all, I want say that this method
could be wrong for some situations if you not allow customizable accuracy
(number of points, value of Small). And I want to say that you can use
personalized deform_of_normal to achive exact (!) method value of deformed
normal instead of aproximated (3a34cd8f@news.povray.org)

ABX


Post a reply to this message

From: Rune
Subject: Re: Torus Torture
Date: 29 Jan 2001 15:11:59
Message: <3a75ce8f@news.povray.org>
"Wlodzimierz ABX Skiba" wrote:
> Four tangents describe four directions.

Yes.

> What about deformation which operate on space between this
> directions and leave space along this directions ?

What do you mean by that? Show me such a deformation!

> For example imagine that your tangents are on axis x,z,-x,-z
> and normal point somewhere up. Than imagine such deformation:
> deform(P)=<P.x*(2^P.z),P.y,P.z*(2^P.x)>

That is not a valid deformation. It generates negative fractional powers.
( For example, when P.z is -0.5 (2^P.z) will generate an error. )

You was also a bit unclear with the details. For input I need a point vector
and a normal vector. If you give me that, and a valid deformation, I can
show you that it doesn't matter which 4 tangents are used.

> there is need - accuracy of floating point operations !!!

That would not likely be a problem, but it would be very simple for me to
make the lengths user-defined, if that makes you happy...

> I don't want say that this method is wrong at all, I want
> say that this method could be wrong for some situations

Maybe, but I can't know before you show me one.

> And I want to say that you can use personalized deform_of_normal
> to achive exact (!) method value of deformed normal instead of
> aproximated ( news:3a34cd8f@news.povray.org )

I don't know what you're talking about, and I didn't find the answer in the
messege you linked to. What do you mean by "personalized deform_of_normal"?

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 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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