Step by step to create curves (arcs, spline curves, continuous spline curves, bezier curves)
The tutorial introduces the three types of curves in the Process: arcs, spline curves, and bezier curves.
ARC
Curve is the simplest to draw. Processing defines an Arc as part of an ellipse.
Functions with the parameters:
Arc (x, y, width, height, start, stop)
Four parameters = existing ellipse, specify boundary box for arc. The last two parameters are the starting and ending angles of the arc.
This angle, like any other angle in Processing, is given in radians. The angle is measured in a clockwise direction, with a degree of zero heading east. Using the fact that Pradian equals 180 °.
SPLINE CURVES
The bow is good, but the color is plain. The function of spline curve, drawing curves that are not necessarily, is part of the arc. rferring to what is technically called Rom-Catmull Spline. To draw a curve, you must specify the coordinates (x, y) from the point where the curve is started and terminated.
Determine the two control points that determine the direction and number of curvatures. For spline curve.
An example showing a curve. Control points are indicated in red and blue curved dots:
CURVA SPLINE KONTINYU
In isolation, one curve, is not very interesting. To draw a continuous curve over multiple points, you'd better use a Vertex curve.
You can only use this function when you create a form with the begin Shape, and end Shape.
curves connecting points (40, 40), (80, 60), (100, 100), (60, 120), and (50, 150):
BEZIER CURVES
Though better than the arc, the spline curve does not seem to have a graceful curve and dive that says "art." For them, you need to draw a Bezier curve with bezier.
Just like spline curves, bezier, has eight parameters, but the order is different:


Although it is difficult to visualize how the control point affects the curve, it is slightly easier to see how the control point affects the Bezier curve.
Two poles and some rubber bands. The poles connect the control point to the end point of the curve.
A rubber band connects the top of the pole. Two rubber bands connect the midpoint of the poles to the midpoint of the first rubber band. One rubber connects more midpoints. The center of the last rubber band is tied to the curve.
To make two curves A and B well, the last control point A, and the first control point B must be in a straight line. Here is an eligible example.
Points in the line are indicated in bold.
CONCLUSION
Use arc, when you need segments of circles or ellipses. You can not create a continuous arc or use it as part of a form.
Use curve, you need a small curve between two points. Use the Vertex curve, to create a continuous curve circuit as part of the form.
Use bezier, you need a long and smooth curve. Use bezier Vertex to make the continuous bezier curve sequence a part of the form.
Happy to share, follow me @feryhusaini