[ELI5] Why can computers not make curves?

863 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

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

Anonymous 0 Comments

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

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

[deleted]

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

***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

Triangles are also a very good way to store data. If you boil it down to just geometry, then to draw a triangle you need to store 3 points in 3D space (the most memory) then the order that the edges connect. To draw the NEXT triangle you only need to store one other 3D point, since 2 points already exist. What you end up doing then is usually storing a point list, and some data to describe how to turn those into a surface.

It gets more complicated after that, not all triangles are connected, you are storing directional normal for each point, texcoords and so on…

Anonymous 0 Comments

3D graphics hardware relies on a simple idea – break up the task of producing a picture into lots and lots and lots of very simple tasks, and farm out those tasks to lots and lots of very simple computer processors.

This means that they break up the image into lots and lots of tiny triangles, and farm the rendering of each of those triangles out to the many processors in the graphics chips.

With an actual curve, you have one very large complex object. Rendering that is going to be one very complex task, which graphics hardware isn’t set up for. Dividing the task up, on the fly, into many little tasks is also going to be complex and time consuming. Doing that in the 1/60th of a second you have between frames is just too much. So instead, when the program or game is created, we break up that curve into as many tiny triangles as our hardware can manage, and hide the roughness with a blur filter.

Anonymous 0 Comments

As other people have mentioned you can use curves in 3D modelling software.

If you want to put your 3D model into a game though, most games don’t render curves, so the modelling software will convert your curves into a series of polygons.

Most games don’t render curves because triangles are much easier and still good enough.

Anonymous 0 Comments

It’s not impossible. It’s relatively easy to directly render spheres, cylinders, cones, conic sections and other shapes that can be described in nice mathematical terms. The problem is if you want more general shapes you need building blocks that are general enough to describe almost any shape and nice enough to lend themselves to efficient implementation in hardware/software. Triangles are one or even the simplest shape that fulfills both of these criteria.