[ELI5] Why can computers not make curves?

903 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

Because for the software to render the polygones, it needs to compute a lot of calculations to determinate their position and orientation(how they would appear), mostly matrix multiplications. Those work best with line because their mathematical representation is easier to store and compute. Curves usually need 4 control points to be defined (the types of curves would fall out of eli5) while lines only need 2.

Other properties such as the normal vector (used for illumination and reflexion) and interpolation (shaders) are also more straight forward using simple polygones. Try to calculate the average value of a polygon, you just average the values of its corners. Now try to do it with a curved shape…

So yeah, simple shapes like triangle are better for this sort of stuff. Plus, we can add texture and shading to **simulate** the curveness afterwards.

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.

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

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

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

Fun thing.

How long is a coast line? Measure it with a meter stick you get one measurement. Measure it with a centimeter stick and convert to meters you get a different larger measurement. Measure with a kilometer stick and convert to meters you get a smaller measurement. Measure with a millimeter stick, or a micrometer stick you get larger and larger measurements. As you decrease the length of your measuring stick you increase the resolution of your measurements. Your micrometer stick can get into all the little tiny crevasses and overall the bumps. Your kilometer stick skips huge gaps and even the whole shore line of a bay.

So what? It’s just cool.

But… the real world has “pixels” just like a monitor. They are spherical-like and are 3 dimensional. Usually they are called atoms.

If you measure with a planck-length stick you can measure the circumference of the atoms and add those to your coastline measurement too.

Now your monitor has sub-pixels that are square and much much larger than atoms. You don’t have to work as hard to make a circle look smooth on a monitor because you will never make one smoother than the sub-pixels. So approximating the curve with straight lines does a pretty good enough job.