🔒 Locked
Triangles vs Lines
Advertisement
Original Post
Okay I understand that Triangles are simpler to use than Quads but why Graphics Card use Triangles. Why dont they use Lines if simplicity is the reason for not choosing Quads over Triangles ? Do all the cards use Triangle as lowest primitive. I heard some modern cards use high order surfaces. Is it true ? If yes, whats the reason behind it ?
Try to imagine building a 3D-character out of lines, it would be impossible since a line doesn't have a width, and if it had it would be a quad (rectangle). You would need to use an infinite number of lines to create anything. AFAIK triangles is the simplest primitive you can build any other 3D model from.
Quote:
Original post by ebikhan
Well since u can create a triangle from three lines then why not create a complex model from lines ?
That's not lines you are talking about, that's polygons. One problem is that you can make a lot of assumptions about a triangle, but not about an n-sided polygon, for example are triangle is guaranteed to be convex. Also the code to render an n-sided polygon is much more complex, not simpler than the code to render a triangle.
Quote:
Original post by ebikhan
Do all the cards use Triangle as lowest primitive. I heard some modern cards use high order surfaces. Is it true ? If yes, whats the reason behind it ?
Yes, they use so-called patches (bezier for example) and/or NURBS.
I don't know a lot 'bout them, but the big benefit is that the Gfx card triangulates them for you and you can decide the level of subdivision (very handy for Level of Detail, for instance).
Another benefit is: they require few vertices to define their (curved) shapes.
Well I think the answer of your question is in the method of 3D incremental image synthesis that is used by most popular 3D APIs.
When you have a triangle you have only three vertices so you can consider it as three lines if you want but it's more far from the truth. There are some exercises - like shading or depth testing - when the graphical pipeline needs surfaces (2D element) instead of lines (1D element). These are evaluated for each pixel covered by the triangle so there's no point speaking about lines. For more details search the method mentioned above.
The method uses homogeneous linear transformations to change between different coordinate systems and it can be done easily if you have only polygons. The reason of using triangles instead of more complicated polygons is that they are the simplest and - as sy mentioned sooner - they are always convex and three points must be coplanar which isn't necessary true for four.
When you have a triangle you have only three vertices so you can consider it as three lines if you want but it's more far from the truth. There are some exercises - like shading or depth testing - when the graphical pipeline needs surfaces (2D element) instead of lines (1D element). These are evaluated for each pixel covered by the triangle so there's no point speaking about lines. For more details search the method mentioned above.
The method uses homogeneous linear transformations to change between different coordinate systems and it can be done easily if you have only polygons. The reason of using triangles instead of more complicated polygons is that they are the simplest and - as sy mentioned sooner - they are always convex and three points must be coplanar which isn't necessary true for four.
Quote:
Original post by Extrarius Quote:You can't create a filled triangle from lines, and wire-frame hasn't been popular since raster displays became affordable.
Original post by ebikhan
Well since u can create a triangle from three lines then why not create a complex model from lines ?
[lol]
Exactly. :D
You might be able to draw the outline of a triangle from 3 lines, but how do you fill it in? [wink]
Just another random thing if you're interested... Triangles are convex and coplanar, which are useful mathematical properties when it comes to rendering [smile]
Jack
Jack
Try texturing a line in any meaningful way ;)
And arguing about being able to make three lines into a triangle is silly in regards to the original argument of simplicity. Of course you can, but when you've got a wireframe of three lines making a triangle you lose the entire argument of lines being simpler to work with because guess what? You've just made a triangle, congrats. Now just build yourself some functions to do scanlines to determine the polygon's shape and the pixels within so that you can texture it and... Wait, why don't we just save these three line endings (6 points in total) as a 3 vertex triangle instead of dealing with three individual line objects? I agree, that sounds like a better plan.
I'm just presenting a silly situation here, not trying to attack anyone, just trying to be humorous.
And arguing about being able to make three lines into a triangle is silly in regards to the original argument of simplicity. Of course you can, but when you've got a wireframe of three lines making a triangle you lose the entire argument of lines being simpler to work with because guess what? You've just made a triangle, congrats. Now just build yourself some functions to do scanlines to determine the polygon's shape and the pixels within so that you can texture it and... Wait, why don't we just save these three line endings (6 points in total) as a 3 vertex triangle instead of dealing with three individual line objects? I agree, that sounds like a better plan.
I'm just presenting a silly situation here, not trying to attack anyone, just trying to be humorous.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement