# 3D design: making curves from straight edges Programs such as Blender, OpenSCAD and others use a mesh system to render 3 dimensional structures. These meshes can be thought of as a set of connected surfaces that together describe a 3D structure. One implication of creating 3D structures this way is that objects can not have truly curved surface.

Rather than render true curved edges and surfaces, meshes can only approximate curved surfaces by connecting many small, straight planes or faces. The more segments used to approximate the curve, the more curve-like it will be.
To make a circle these programs create a many sided polygon. The more sides, the more circle-like the shape becomes.  The three polygons in the top row of Figure 1 are easily recognized as a triangle, square, and pentagon. Corners are still visible in the 10 and 20 sided polygons. As the number of sides exceeds 30, the shapes become difficult to distinguish from a circle.
Figure 2 shows this same pattern as a stack of polygons. The bottom most ploygon has 3 sides. Each subsequent layer contains a polygon with one more side. The top most shape has 180 sides. From a distance the polygons towards the top of the stack looks like circles (left and top right). Up close they are clearly made up of a series of straight sides (bottom right image). Figure 2 – 3D form showing a series of polygons with progressively more sides. The bottom polygon is a Triangle. The top one has 180 sides.

Other curved shapes are built up in the same way. Figure 3 shows shapes generated from four points using the Bezier Curve formula. Five versions of the same curve are shown. From bottom to top they have three, five, ten, 100 and 1000 segments respectively. As with the circle, the forms with only a few segments look angular. As the number of segments increases, the individual faces blur together and the shapes take on a smooth, curved appearance. Figure 3 – Five shapes based on the same 4 Bezier curve points. The numbers indicate how many straight edged blocks were used to make the final form.

All of these images were created in OpenSCAD and represent forms that could be 3D printed. The model in Figure 2 is a coherent 3D object that could be printed as is. The forms in Figures 1 and 3 are two dimensional shapes. They can’t be printed without additional transformations such as application of the linear or rotate extrude commands in OpenSCAD. The small image at the top of this post is the 1000 face curve from Figure 3 with the rotate_extrude() command applied to it.
 Code for Figure 1   Code for Figure 2   Code for Figure 3   