Sign in to follow this  
oreste

Untransformed vertices coordinates.

Recommended Posts

In my tut lesson we start talking about untransformed vertices and the geometry pipeline. I have a prob here understanding things, from the get go! The coordinates of the vertices (untransformed) are: 3.0f, -3.0f, 0.0f 0.0f, 3.0f, 0.0f -3.0f, -3.0f, 0.0f i don't understand these coordinates. On a piece of paper i drew a coordinate system X (horizontal) and Y (vertical) intersecting at (0, 0) and X >0 at the right side of (0, 0) and Y >0 above (0, 0). I built a triangle by plugging in the above coordinates. BUT the vertices are in counter-clockwise order. So my representation must be wrong, no!? And also these coordinates: is there a range of values for each coordinate (x, y, z). How can i determine a particuler shape for my triangle?

Share this post


Link to post
Share on other sites

Defining vertices in that order (counter clockwise) gives you a normal pointing "out" of the XY plane, i.e, a normal on the Z axis with a positive value. Why do you think it's wrong? How do you think it should be and why? Do you know about orthogonal vectors and cross product? http://en.wikipedia.org/wiki/Cross_product

 

X, Y and Z are real numbers representing a point in space. In theory there's no limit for them, any coordinate of a point in a 3 dimensional space can have any value between minus infinity and infinity. In practice there's a limit when you try to put those numbers inside a computer, since X, Y and Z must be stored in a fixed amount of bits. It depends on the platform you're using, but most of the times you don't worry about it unless you need both really small and really big numbers at the same time. When you work with numbers between a small range you can always think of the values as meters, kilometers, centimeters, miles, or whatever fits better in that case.

 

What do you mean with "how can I determine a particular shape for my triangle?"?

Share this post


Link to post
Share on other sites
I thought that if you present the vertices in a counter-clockwise order the vertices would not be displayed on screen: i probably misunderstood... Now you threw me for a loop: normals, orthogonal vectors, cross product ?? I beefed up on vector algebra, matrices, etc. Your reply makes me view things very differently. As to your last question: you gave the answer: i give the coordinates i want to obtain a particuler triangle (isoceles, equilateral or some particular shape). I have just started this tut lesson, the author says that for a beginner it's like studying pointers...so there will be other questions but for now i am going to play w/ the code try to do the exercises to understand better. Thank you for your help. Phil

Share this post


Link to post
Share on other sites

I thought that if you present the vertices in a counter-clockwise order the vertices would not be displayed on screen: i probably misunderstood.

 

Perhaps not. In some APIs (application programming interface), counter-clockwise is the default order. In other APIs, clockwise is the default order. Many APIs support changing the default order during rendering.

 

Determining whether a particular triangle gets rendered depending on the order of the vertices is called culling. If clockwise order is the default, then, if the vertices of a triangle appear from a particular direction to be in clockwise order, then that is called the "front face" of the triangle. The back face is the same triangle as viewed from the opposite direction, say, from "behind." From the "behind" direction, the vertices appear in counter-clockwise order. As mentioned, many APIs allow the program to set backface culling or frontface culling as an option.

Edited by Buckeye

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this