This five-cornered polygon makes a simple house shape:
1,0, 1,-1, -1,-1, -1,0,
0,1, END |
|
This is the same house shape, but with the top corner turned into a spline point:
1,0, 1,-1,
-1,-1, -1,0, SPLINE,0,1, END |
|
Same house shape, but with the two roof’s-eve corners turned into spline points:
SPLINE,1,0,
1,-1, -1,-1, SPLINE,-1,0, 0,1, END
Note that this case would not work
without the division-by-zero protection, because the eve points are vertically at the midpoint between the top and
bottom of the house. |
|
Same house shape, with the two bottom corner points turned into spline points:
1,0,
SPLINE,1,-1, SPLINE,-1,-1, -1,0, 0,1, END |
|
Same house shape, with all five corners turned into spline points:
SPLINE,1,0, SPLINE,1,-1,
SPLINE,-1,-1, SPLINE,-1,0, SPLINE,0,1, END |
|
Here’s an example of using the “NEW_LOOP” tag to put two polygons in one. In this case, the smaller
polygon is a hole in the larger one, since it is inside it:
SPLINE,1,1, SPLINE,1,-1,
SPLINE,-1,-1, SPLINE,-1,1, NEW_LOOP, SPLINE,.5,.5, SPLINE,.5,-.5, SPLINE,-.5,-.5,
SPLINE,-.5,.5, END |
|
This uses the “NEW_LOOP” tag to make two loops, but they don’t overlap each other:
-.25,0,
.125,0, .125,-.875, .25,-.875, .25,-1, -.25,-1, -.25,-.875, -.125,-.875,
-.125,-.125, -.25,-.125, NEW_LOOP, SPLINE,-.125,.375, SPLINE,.125,.375,
SPLINE,.125,.25, SPLINE,-.125,.25, END |
|
You can’t do a real circle with splines, but this eight-point polygon makes a sweet
fake:
SPLINE,.4142,1, SPLINE,1,.4142, SPLINE,1,-.4142, SPLINE,.4142,-1,
SPLINE,-.4142,-1, SPLINE,-1,-.4142, SPLINE,-1,.4142, SPLINE,-.4142,1, END
FYI,
.4142 is sqrt(2)-1. |
|