Archived

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

counterclockwise

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Paul: Its actually called counter clockwise,
thats why they''re abbreviated CW (clockwise) and CCW (counter clockwise)....

Share this post


Link to post
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 this post


Link to post
Share on other sites
Guest Anonymous Poster
Ok, sorry, I didn''t know that...
I''m from Sweden and have always only heard ''counterclockwise''...

Share this post


Link to post
Share on other sites
then which is the solution,damn if clockwise is so subjective which is the order to use for calculating normal?
and hey i''m the only who have this problem?
what i have choosen the worst file format in the world?
i''m using .off!
i''ll change file format if the thing will be too hard.
which format should i use ?only binary format because from now i hate text file!
ah!someone have written an importer for lightwave 6.0?

Share this post


Link to post
Share on other sites
It''s not subjective, lemme give you a better example. Let''s say you wanted a 2D "plate" that was visible on both sides.

OK, so we''ve got 4 vertices:

1 2

3 4

We need to define two polygons, one for the front side, one for the back side (although OpenGL can do 2-sided polygons).

OK, lets say we need to define our polygons in clockwise order (DirectX). So the front side would use the vertices in this order:

1,2,3,4.

Now, the back side uses the same vertices, but when viewing from the back, the order 1,2,3,4 won''t work. It needs to go in reverse: 1,3,4,2. What I usually do is put the vertex numbers on a sheet of paper, then look at it from the side it''s supposed to face to figure out my ordering.

Once you define the vertices, you don''t have to re-define them for clockwiseness or not...it''s all before any transformations have taken place.

Better?

Share this post


Link to post
Share on other sites
if i write my own polygon it''s ok ,but i need an algorithm for check if a polygon is specified clockwise or anticlockwise because they are loaded from a file and they aren''t displayed in the right way(some are visible other not).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
when you mix a 3d object with a 6d project. you will get a message saying you are in contempt with trig function

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
normals are abs abs are abnormal . but normal compared to josh abs they are abnormal osh oh my fuckin gosh or something

Share this post


Link to post
Share on other sites