counterclockwise

Started by
16 comments, last by chris82 23 years, 9 months ago
how can i check if 3 vertex are counterclockwise sorted? because i''m working with normals and some polygon aren''t visible
Advertisement
Hey,

I haven''t totally read over this or tried it, but this should be exactly what you''re looking for..

http://www.geocities.com/SiliconValley/2151/math2d.html

It''s toward the end of the document, so look there for it.. Let me know if it helps you out..

Optionally for anyone who reads this, a really good place to look for stuff is

http://www.calculus.net



bosco()




--
leader of the free world .. or something ..
--leader of the free world .. or something ..
i''m not sure it works because:
1)it''s for 2d
2)i haven''t understand it yet
Do you still need this code? If so, I think I have the source in The Black Art of Mac Game Programming (and no, the code is not Mac-specific).

Morgan
But if you think about it, any three vertices make a polygon which is a plane and therefore 2d.. Trust me.. It''s what that is describing.. I read it.. You just need to read and understand it.. Do you understand vectors??


bosco()




--
leader of the free world .. or something ..
--leader of the free world .. or something ..
morgan>yes i need it.
bosco>i have understand a thing ,in 2d it''s ok you can find clockwise because the view is always in front of you but in 3d what mean clockwise ?i can watch from the z axis and the result will be one ,i can watch from y axis and the result will be one,ecc.
so the order it''s given by what?
i thought it was given by the front of the polygon but it is determined by normal which is calculated with vertex sorted clockwise,so i''m getting mad
AHEM

anti-clockwise

Paul.
Paul Grovespauls opengl page
Paul: Its actually called counter clockwise,
thats why they''re abbreviated CW (clockwise) and CCW (counter clockwise)....
Actually, anti- and counter- depend on where you are in the world (US vs. rest of the world). At any rate, whether a vertex is defined clockwise or counterclockwise is dependant on how it would be viewed. For example, take the following triangle:


1

2
3


If the triangle would be facing you, the order (if going clockwise, i.e., DirectX) would be 1,3,2.

If the triangle were the back side of an object (facing away from you), the order would be 1,2,3.

So it''s all in HOW YOU WOULD VIEW IT.

Vyvyan
Ok, sorry, I didn''t know that...
I''m from Sweden and have always only heard ''counterclockwise''...

This topic is closed to new replies.

Advertisement