POV-Ray : Newsgroups : povray.general : Height-field and smooth-triangles : Re: Height-field and smooth-triangles Server Time
12 Aug 2024 07:26:24 EDT (-0400)
  Re: Height-field and smooth-triangles  
From: Rudy Velthuis
Date: 16 Mar 1999 08:13:05
Message: <36ee58e1.0@news.povray.org>
gemelli david schrieb in Nachricht <36EE4DA3.FA7B78F7@imerir.asso.fr>...
>I posted an image in povray.binaries.images of an height-field I did
>with a POV file. I use
>a mesh of triangles and I would like to change them to smooth-triangles.
>How can I find normal
>vectors from the corners of the triangles ?
>Thanks !


Just an idea (not founded knowledge I mean), but couldn't you add all
direction vectors from a point and then divide them by the number and then
invert it, to make it point outwards. So if your point were V and there were
three vertices to V1, V2, and V3, I would do this:

Norm = - ((V1 - V) + (V2 - V) + (V3 - V)) / 3

or simplified:

Norm = - (V1 + V2 + V3) / 3 - V.

But I'm not sure if this will give you the exact normal, and if the normal
must be normalized too.

--
Rudy Velthuis


Post a reply to this message

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