|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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 !
David GEMELLI
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'd suggest you use the cross product of the vectors. Recently there was a
good posting that should explain how to do this. Search on cross product.
--
Jim
Check out my web site http://www.kressworks.com/
It'll blow your mind (politically), stimulate your senses (artistically)
and provide scientific insights beyond compare!
Be sure to read the Warp maintained POV VFAQ:
http://iki.fi/warp/povVFAQ.html
gemelli david wrote in message <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 !
>
> David GEMELLI
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 16 Mar 1999 13:25:07 +0100, gemelli david
<gem### [at] imerirassofr> wrote:
>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 !
Consider a typical corner to be set up thus:
B--------------C
/ \ / \
/ \ / \
/ \ / \
/ \ / \
D-------------A-------------E
\ / \ /
\ / \ /
\ / \ /
\ / \ /
F-------------G
Get the normal at A thus:
vnormalize(vcross(B - A, C - A) + vcross(C - A, E - A) + vcross(E - A,
G - A) + vcross(G - A, F - A) + vcross(F - A, D - A) + vcross(D - A, B
- A)).
Make sure that you always go around the point in the same direction
(i.e. clockwise) and remember to allow for points at edges and so on
that do not have six surrounding triangles.
Jerry Anning
clem "at" dhol "dot" com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
gemelli david <gem### [at] imerirassofr> wrote:
: 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 ?
You can use my utlility for that:
http://iki.fi/warp/PovUtils/smooth.html
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
My plugin might also help you out, check in text.scene-files.
Regards
Gordon
<gbe### [at] birdcameroncomau>
Nieminen Mika wrote in message <36ee9db5.0@news.povray.org>...
>gemelli david <gem### [at] imerirassofr> wrote:
>: 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 ?
>
> You can use my utlility for that:
>http://iki.fi/warp/PovUtils/smooth.html
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |