#### Archived

This topic is now archived and is closed to further replies.

# counterclockwise

This topic is 6726 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

how can i check if 3 vertex are counterclockwise sorted? because i''m working with normals and some polygon aren''t visible

##### Share on other sites
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 ..

##### Share on other sites
i''m not sure it works because:
1)it''s for 2d
2)i haven''t understand it yet

##### Share on other sites
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

##### Share on other sites
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 ..

##### Share on other sites
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.

##### Share on other sites
Paul: Its actually called counter clockwise,
thats why they''re abbreviated CW (clockwise) and CCW (counter clockwise)....

##### Share on other sites
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

##### Share on other sites
Ok, sorry, I didn''t know that...
I''m from Sweden and have always only heard ''counterclockwise''...

1. 1
2. 2
Rutin
18
3. 3
khawk
15
4. 4
A4L
14
5. 5

• 10
• 13
• 26
• 10
• 11
• ### Forum Statistics

• Total Topics
633745
• Total Posts
3013667
×