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