[ELI5] Why can computers not make curves?

897 views

Every 3D modelling software simply uses a series of flat polygons, small enough to appear curved, to created spheres etc. Why? Why can technology even today find it easier to render literally millions of little triangles, than just one curve?

In: Technology

16 Answers

Anonymous 0 Comments

[deleted]

Anonymous 0 Comments

Polygons come with depth and normal information, so you know what is in front or behind, and so you can take advantage of texturing and lightning effects in terms of how the algorithms are implemented.

Anonymous 0 Comments

***There isn’t really such a thing as a curve.*** Just things that look so much like curves from far away, that’s what we call them.

Paint a curve on a wall? It’s just millions of drops of paint. Letters on paper? Millions of little blots of ink. The round bottoms of glass cups? Through a microscope, you’ll see the individual grains of glass – more like a beach than a smooth line. The curve around the edge of the moon? It only looks like a perfect circle from down here. Up there, it’s thousands of mountains.

The same goes for all shapes. There’s no such thing. There are no triangles or squares. Just triangle-shaped, square-shaped things.

In the real world it’s easy to find trillions of things, because things can be as small as a dust speck. In the computer world, everything must be counted before it is drawn. A computer can count high and fast, but it can’t go forever. Eventually it has to stop counting and tell the monitor what to show you. If it works hard and draws ten million points and you can still see where each point is, it still won’t look much like a curve. It will look pointy!

But we have a few tricks up our sleeve. We tell computers to draw better curves by automatically snipping lines and curving them themselves. The more time we give them, the better this works, so expensive time-consuming CGI can have pretty realistic curves, whereas your average day-to-day computer experience will not be very curvy at all.

Anonymous 0 Comments

To add to some other answers, triangles are the simplest 2D shape. They’re the easiest to render.

Anonymous 0 Comments

They can. In 2D, [vector graphics](https://en.wikipedia.org/wiki/Vector_graphics) can draw curves using [splines](https://en.wikipedia.org/wiki/Spline_(mathematics)). If you use a vector graphics program like Adobe Illustrator, or an image format like [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) you’ll see first-hand that you’re working with smooth curves that never become jagged no matter how much you zoom in.

For 3D graphics, one common technique is called [Constructive Solid Geometry](https://en.wikipedia.org/wiki/Constructive_solid_geometry). You can zoom into a CSG model as far as you want and it will continue to be smooth. Many CAD programs use a technique called [NURBS](https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline) to specify curve surfaces like airplane wings and car bodies.

But developers often don’t use these techniques because it’s slower to render. The root cause is that polygons are natural fit for the kind of parallelization a modern graphics card can do, while techniques for dealing with curved surfaces are not. A modern graphics card will have over 1,000 processors working in parallel. A modern graphic pipelines will take the vertices of a 3D model, rotate and scale it in the scene, transform it into triangles, use a texture to paint it to a 2D screen with a z-buffer, then apply various shaders and effects on top of that, all inside the GPU, all at a parallelization factor of 1,000. It’s very hard for fancier techniques to compete with that!

Anonymous 0 Comments

We do NOT love in an analog world. We love in a digital world. There always exists a point n/2.

Anonymous 0 Comments

Your premise is incorrect. Not all 3D modeling software is limited to triangles. 3D Studio Max, for example, can model shapes with true curved surfaces.

As for why most 3D engines use triangles instead of curves though, it’s simply because they’re faster and easier to deal with. A spline curve is exponentially more mathematically complex than a flat triangle. “Technology even today” isn’t going to change that mathematical fact.

And individual curved surfaces are rarely approximated with “millions” of triangles. With Gouraud or [Phong](https://en.wikipedia.org/wiki/Phong_shading) shading an object can be made to look realistically curvy with only a few hundred or even dozen polygons.

Anonymous 0 Comments

They can make curves. However rarely do you as a user see them. In that I mean it is easier and more efficient to draw a curve as segments that connect. There is less math involved this way and remember a computer is ultimately an advanced calculator.

So let’s say you want to draw a circle using points. Well how many points do you want. Technically there are infinite number of points that can be used and always still be an open object as there is a gap between them. However using lines, let’s say it takes 360 (or 1 per degree) to “appear” on screen as a smooth shape, the computer can quickly calculate this and it is now a closed shape.

Where this gets tricky is when using a computer to make something in real life. Say on a CNC machine on various types. Even though you drew a circle that was represented with lines, the computer still knows its a circle. There are g-codes that allow machines to create circles, thus in the real world, you are back to having a circle.

Now there are cases and softwares that are designed for this and they to can make true arcs and circles. However they also have the logic in them to delineate what the shape is and how to treat it (open or closed).

Anonymous 0 Comments

They can. NURBS. Non Uniform Rational B-Splines. Also vector graphics use it too. The graphics drivers translate that into a raster for your screen or printer, but the curves themselves are mathematical equations.

Not all 3D software is limited to polygons (specifically triangles and quads) Cinema 4D, for one, has full NURBS modeling tools.

Edit: IMO this is the biggest missing thing from Blender. Being able to model with sweep NURBS, lathe, extrude and more all defined by vectors. It’s amazing.

Anonymous 0 Comments

Truth is every major 3d package has a method to model with curves, splines, etc. When you render you’re just describing the curve as a number of steps/angles into pixels. Calculating lighting, reflections, refractions you speed up calculations breaking up the model into flat planes of triangles, same for deformations, physics, etc. it’s all about simplifying and speed. A circle built out of 40 (8degree) triangles looks like a circle and you don’t even need half that many if it’s in the background and/or motion.