There really are an infinite number of interesting things to do when you are a programmer, and every single one of them has the potential to distract you and prevent you from doing the infinite number of boring but necessary things that need to be done.
The JujuSketch snapshot on the right gives away my secret ambition to travel back in time and invent the Flash rendering engine. I just love this type of graphics, with its anti-aliased edges and perfect gradations. Purdy.
Curves
The circles rendered by JujuSketch are not actually perfect circles; they are each composed of 8 quadratic bezier curves . On the left you can see the effect of choosing different numbers of curve segments, starting with the minimum of 3. At this scale there is virtually no visible difference between 8 and 16 segments, but at a larger size (full screen) it may make sense to choose higher numbers.
A quadratic curve is one that can be described by an equation of the form:
P(t) = (Qt + R)t + S
where Q, R and S are vectors. Substituting different values for t will give different points along the curve.
The reason I am sticking with quadratic curves [for now] is that although greater numbers are required to represent complex shapes, they are the easiest types of curves to work with by far. When it comes to calculating area, intersections etc, the equations for shapes composed of quadratic curves are much simpler [and therefore computationally less expensive] than would be required for a mixture of higher order curves, perfect arcs and ellipses.
Advantages
Any quadratic curve can be transformed into any other quadratic curve with an affine transform [ie any transformation that can guarantee the preservation of parallel lines, including scaling, rotation and skewing], and therefore the whole family share the same useful properties.
Eg: given a quadratic curve defined by ABC (where B is the control point) the area contained between the curve and the interval AC is equal to 2/3 of the area of the triangle ABC. It is also fairly easy to mathematically determine whether a point is inside the region.
Quadratic bezier curves also very easy to break down into line segments for rendering… in fact the algorithm to do so is so simple that you can construct a quadratic bezier curve geometrically (ie you could draw it using a ruler and compass, without doing any actual calculations) To attempt the same with a cubic curve would give you an awfully big headache.
Of course, the real reason I like quadratic curves is that they are the very same curves you get from that amazingly tacky arty/crafty trend from the 70’s [which I knew as "string art"] which involved nailing a whole bunch of pins into a slab of wood painted black, and then winding brightly colored thread around the pins to produce abstract shapes [and revolting pictures of schooners.] I remember being keen on this stuff when I was 11 years old, being particularly impressed that one could make curves out of straight lines.