POV-Ray : Newsgroups : povray.advanced-users : How does one test to see if a triangle's verticies are arranged in a clockwise or counter clockwise direction? : Re: Different solution - Re: How does one test to see if a triangle's verticies are arranged in a clockwise or counter c Server Time
29 Jul 2024 16:29:09 EDT (-0400)
  Re: Different solution - Re: How does one test to see if a triangle's verticies are arranged in a clockwise or counter c  
From: John Pallett
Date: 25 Jul 2002 15:30:22
Message: <3d4051ce@news.povray.org>
You're right.  Adjust to make sure that all of your orderings are OPPOSITE,
not the same.  Sorry, that was a napkin-scratched solution.

Thanks, Ron.  Jim, hope this helps.

JP

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Thu, 25 Jul 2002 12:11:36 -0700, John Pallett wrote:
> > Another way to accomplish the same task is to run recursively through
all of
> > your adjacent triangles and ensure that the "vertex ordering" of their
two
> > adjacent vertices is the same.
>
> Are you sure you don't have this backwards?
>
>   A--B
>   |\ |
>   | \|
>   C--D
>
> Notice that A-D-C and B-D-A are both clockwise, but the D-A edge is not
> represented the same in both triangles.
>
> --
> #macro R(P)z+_(P)_(P)_(P+1)_(P+1)+z#end#macro Q(C,T)bicubic_patch{type
1u_steps
> 6v_steps 6R(1)R(3)R(5)R(7)pigment{rgb z}}#end#macro _(Y)#local
X=asc(substr(C,Y
> ,1))-65;<T+mod(X,4)div(X,4)9>-2#end#macro
O(T)Q("ABEFUQWS",T)Q("WSXTLOJN",T)#
> end O(0)O(3)Q("JNKLCGCD",0)light_source{x 1}// ron### [at] povrayorg


Post a reply to this message

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