POV-Ray : Newsgroups : povray.advanced-users : Calculating Normals in Smooth Triangles Server Time
26 Dec 2024 14:15:47 EST (-0500)
  Calculating Normals in Smooth Triangles (Message 1 to 3 of 3)  
From: Joshua English
Subject: Calculating Normals in Smooth Triangles
Date: 14 Nov 1999 15:04:54
Message: <382F15C1.AA57F1AB@spiritone.com>
Does anyone have a good way of finding Normal vectors in
smooth_triangles? I'm working on an image with lots of triangles and I
would like to be able to use smooth triangles in stead of the standard
ones.

I've tried one method of using vcross on each vertex like this:
 // p1,p2, and p3 are vertexes of the triangle
 n1 = vcross((p2-p1),(p3-p1))+p1;
n2 = vcross((p1-p2),(p3-p2))+p2;
n3 = vcross((p2-p3),(p1-p3))+p3;

This method doesn't work well when there are multiple triangles
connected, though,
so I tried averaging the vectors from each point and using that, and it
seems to work.

Is there a better, more accurate way to find normals?

Thanks for the help,

Josh English
eng### [at] spiritonecom


Post a reply to this message

From: ingo
Subject: Re: Calculating Normals in Smooth Triangles
Date: 14 Nov 1999 15:13:39
Message: <8E7EDCA0Bseed7@212.120.113.81>
Joshua English wrote:

>Does anyone have a good way of finding Normal vectors in
>smooth_triangles? .....

Try Warps Triangle Mesh Smoother 
http://www.students.tut.fi/~warp/PovUtils/smooth.html
The manual gives a good explaination, if you want to do it in POV.


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Josh English
Subject: Re: Calculating Normals in Smooth Triangles
Date: 15 Nov 1999 16:56:16
Message: <38308178.291D1F72@spiritone.com>
Thanks for the link. Nice to know I was on the right track.

Josh English
eng### [at] spiritonecom

ingo wrote:

> Joshua English wrote:
>
> >Does anyone have a good way of finding Normal vectors in
> >smooth_triangles? .....
>
> Try Warps Triangle Mesh Smoother
> http://www.students.tut.fi/~warp/PovUtils/smooth.html
> The manual gives a good explaination, if you want to do it in POV.
>
> Ingo
>
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

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