You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 2: Digital Drawing (25)
Staffyirenng

Question: explain how other polygons might not be planar? Could this happen even for quadrilaterals?

Staffyirenng

Question: explain how other polygons may not have a well-defined interior?

Sicheng-Pan

An intuitive approach would be looking at the dolphin provided. We can select two adjacent triangles, and join them to form a quadrilateral. Such a quadrilateral is not likely to stay on a single plane, according to the shape of the dolphin. For polygons other than triangles, it is possible for them to have edges crossing each other, even if the vertices live on the same plane, and such polygons may not have well-defined interiors.

bronyayang

For the first question, since three noncolinear points determine a plane, the vertices of a triangle form a plane. Other polygons, even for quadrilaterals, have more than 3 vertices. If 3 out of 4 vertices form a plane, then the extra vertex lies outside of the existing plane, and this quadrilateral is indeed not planar. Thus, triangles are guaranteed to be planar and other polygons might not be.

bronyayang

What is the definition of well-defined interior?

qjiberkeley

For those interested in barycentric interpolation, check this link!

NicholasJJ

Depending on how you set it up, Blender (and I assume other 3d modeling software) sometimes looks like it's meshes are constructed from quadrilaterals, and shifting the vertices of these meshes gives a solid example why quadrilaterals are not planar and have a poorly defined interior. By default a quad might be planar, but shifting one vertex moves it out of the plane defined by the other 3. At this point its revealed Blender was treating the quad as 2 triangles all along! You either get a ridge between the vertex you moved and the opposite one, or a valley connecting the other two vertices. Both triangle arrangements look fine when the quad is planar, but since the software always has to choose between the two the interior is not well defined.

Staffyirenng

@NicholasJJ -- great real-world example!

Staffyirenng

@Sicheng-Pan -- great explanation.

@bronyayang -- that is a good question! I think @Sicheng-Pan has a good description of some potential tricky cases to consider in thinking about that question.

Mathematically, what are common theoretical definitions of the interior of a polygon in 2D? Can these be extended to 3D in some way, or why not? How does this compare to using a mesh of triangles?

Engineering-wise, we got to this discussion in considering what "instructions" we shoud use to command an abstract graphics drawing machine. What is the specification of OpenGL when we use GL_POLYGON to draw? What kinds of problems could this create? Why do you think GL_POLYGON was defined this way?

davidmwei

If my understanding of a well-defined interior is correct, I believe we are alluding to the idea that there can be discrepancies for calculating the area of an object (in a 2D space) versus calculating the volume of an object (in a 3D space). Since 3 points constitute a plane and ~only a single plane, we can use the simple area formula for a triangle to calculate the interior. This is not the case for non-triangles.

4 points in the same plane creates a quadrilateral: if we assume this quadrilateral is a square, then the area is a simple calculation. If one of the points is skewed, we no longer have a single plane, and the interior is no longer "well defined" as we would need to determine how best to calculate this new volume.

As such, it seems practical to use triangles: planarity is guaranteed, formula for interior is guaranteed and well-defined, and any "non-triangle" can be broken down into triangles.

Staffhangg7

@davidmwei You are definitely correct on this one!

Just to have a bit more fun here since a lot of folks have contributed great ideas, let me play a bit devil's advocate: since triangles are good for numerious reasons, why does "quad mesh" (quadratic mesh) ever exist? A nice visualization is this one.

AlbertScribblenaut

In my high school AP Calculus BC class, I was challenged with an end of year project to investigate math-related impacts in the real world, and I chose to talk about this Scientific American paper, which discussed the use of triangles in graphics and demonstrated the tradeoff of using triangles with the Schwarz Lantern, which I also made. If you click the article, you will also see this dolphin on the left too. It's good that we are not using regular polygons because we would otherwise never approach the surface area of curved surfaces we are trying to rasterize. Using irregular polygons enables us to converge on that surface area.

joyyy26

To add on to how triangles “optimize one implementation,” algorithms used for rasterization of triangles are efficiently and natively supported in hardware/gpu. Hence often quadrilaterals or other polygons are broken down and converted to triangles during rasterization, interpolation, and texturing.

xgao0613

@bronyayang Your explanation of the first question helped me a lot when I was trying to understand why quadrilaterals may not be planar. Indeed, one of the four points may not be on the same plane as the other three. Thanks for your answer!

xgao0613

@qjiberkeley Thanks for the link to barycentric interpolation! I explored the website and found a lot more information and terms about triangles such as normal and coplanar. It definitely helped me in understanding triangles better!

Staffyirenng

@ AlbertScribblenaut -- thank you for the link to this delightful Scientific American article, and the Schwarz Lantern thought-experiment. I think it's quite relevant to this comment discussion. This topic is something we will return to in the Geometry module of this course -- we will look at recursive algorithms for subdividing such tesselations to approximate smooth "limit" surfaces. (These are called Subdivision Surfaces).

I'm impressed with the quality of the discussion in this comment thread!

Staffyirenng

@xgao0613 -- excellent! In a couple of lectures we will study barycentric interpolation, as well as interpolation of normals across triangle meshes.

Staffyirenng

@hangg7 (one of our course TAs!): good question!

christinemegan

I think that as you add more side lengths with each polygon, there is more room for ambiguity of what is in the middle of the boundary. As a result, you would have to define more and more cases for how to define your shape.

Through the 3d modeling that I have done, usually, meshes are broken down into quads because it creates an edge flow that makes editing the mesh with the tools of the program a lot cleaner. Is there a reason why the application of triangles is not preferred in that case?

andersonkimlam

Looking at renders and video games, having the triangle shape becomes more apparent. I wonder what things would look like if we decided to use rectangles instead or any other shape. I remember watching this video (https://www.youtube.com/watch?v=U93RImC-by4), that really gave me an insight into this topic. Triangles also have so many other applications such as triangulation and then using it for face morphing.

andersonkimlam

@christinemegan It seems like meshses are also broken down into triangles instead, but more often into quads when sculpting. It seems like this is the case because some work better than others in certain situations. The case of the quads is better for tracking edge loops, and triangles are preferred when we want a it to be clear where some face falls (no deformations).

lucywan

I found this slide really interesting. In my head, I always assumed quadrilaterals were the most basic polygon since they seem to be so common in everyday items. However it never occurred to me that triangles are more efficient. Now every time I see graphical objects such as video game characters, I notice that the triangle mesh is more apparent.

Waterstar1

I totally agree with Lucy. Quadrilaterals seem like a good base to me as well. I've also used Blender for 3d modeling, including making this exact dolphin which I believe is in the recommended tutorial intro series to using Blender. Even then, I've always looked at it as quadrilaterals with an additional diagonal rather than just the triangle. It makes much more sense that the computer sees the triangles, and they are not artifacts.

melodysifry

Since a triangle only has 3 points, it's only possible for it to exist in one plane- no matter how you rearrange, push or pull the points around in 3d space, the triangle will always be planar. For a quadrilateral on the other hand, moving any of the points can result in having more than one plane

You must be enrolled in the course to comment