Command of the Week - Curves (Week 27)
This series is called the command of the week, but it could also explain a feature. The explanations will tend to explain the technical parts of the command, and is intended to highlight the basics (and complexities) of the command, and information about how to use it, but won't be a detailed tutorial. It is up to you to use it creatively in your maps.
Week 27 - CurvesMost people will be familiar with the smooth path (and smooth polygon) which is probably the most used curve in CC3+. But there are other options.
One of the great things about curves in CC3+ is that they are based on mathematical formulas. The advantage of this is that they retain their smooth shape no matter how much you zoom in on them, they will never break down into straight segments, nor will they be pixelated*.
* Note that because a computer display is built up from a grid of pixels, everything which is not strictly horizontal or vertical will appear pixelated when rendered on screen. Anti-aliasing can help mitigate this, but CC3+ doesn't apply anti-aliasing to the image rendered on screen. Do note that since this pixelation is a limitation of your screen and not the actual line, it will ot increase as you zoom in to the line, as opposed to a line in a raster editor, where the pixels would be more and more pronounced as you zoom in. You can apply a weak blur to the line, this will have the same effect as anti-aliasing. In this case, I recommend using a blur size expressed in percentage of view width, thereby having the same size of the blur no matter your zoom level. Also note that when you render the CC3+ map out to an image, that image will be a regular raster image, without any of the nice features the curve has in CC3+, like unlimited pixel-free zooming
Where to find them?Toolbar: (right click) [Image_9010], (right click) [Image_9011], (right click) [Image_9012], (right click) [Image_9013]
Menu: Draw -> Path, Draw -> Arc, Draw Polygon, Draw -> Circle
Command Line: PATHD, ARCD, POLYD, SPLINE, SPLINE2, PSPLINE, BEZ, ARCB, ARC3, ARCS, ARCR, CARCD, ARCW, ELIPA, CIRP, CIRR, CIRD, CIR2, CIR3, DONUT, ELIPP
How to use themThe interesting parts of a curve is how it is drawn on screen depending on the nodes you place. Beginners may get a bit frustrated, because it seems like the smooth polygon never covers the area you specify. Truth be told, smooth entities can be a bit tricky, but knowing how they work certainly help. Let us discuss the various basic options we have.
Curve aidsThe best aid to use when working with curves is frames (Tools -> Drawing Aids -> Toggle Frames). Frames shows a thin line between the nodes, which helps to pinpoint the exact positions of these. Frames typically manifests like a straight "border" around our smooth entity. For all my screenshots below, I have turned frames on.
Paths vs PolygonsA polygon is basically just a closed path. The behavior when it comes to smoothing is basically the same, so I'll be talking most about paths here, as to avoid repeating myself. The main difference is that a polygon doesn't have any special start/end points, all nodes are treated as middle nodes.
Cubic curveWhen you use the default smooth path or smooth polygons in CC3+, you are using a cubic curve. This is characterized by touching the start and end point, but for all other points, the position of the line is averaged between the points. What this means in practice is that when you place a point, the shape of that segment of the path isn't determined until you place the next point, because it needs to average the position between these. Note that with a cubic curve, the line itself will never touch any nodes except the first and last node. You can however make a sharp corner in a specific place by placing two nodes on top of each other in that point. You can see that point in my example to the left at the sharp turn where the frame actually meets the bend of the line.
You can check if a line uses cubic curves by using list on it and check if it's smoothing method property is Cubic B-Spline
Parabolic CurveA path using parabolic smoothing will touch all the nodes. The path itself is drawn the same way as a cubic curve, but the result typically results in sharper angles. Just as with the cubic smoothing, the exact shape of a segment is only determined when you place the next node in the chain, since the smoothing computation depends on it. It is also worth nothing that you cannot use double node trick to get sharp corners with parabolic smoothing, as can clearly be seen in the example image to the left. However, this is less needed with parabolic curves anyway, since the curve touches the nodes anyway.
You can check if a line uses parabolic smoothing if the smoothing method property is Parabolic Spline.
Bezier CurveA bezier curve in CC3+ consists of four nodes. The first two placed are the start and end nodes, while the third and fourth modifies the shape of the curve. Node that it can never have more than these four points, so a bezier curve cannot be used for a longer path, nor can it be closed to make a polygon. Forthe mathematics behind a bezier curve, check out this wikipedia article.
You can check if a line uses bezier smoothing if the smoothing method property is Cubic Bezier.