node regular polygon center - blossommerz/locus-hub GitHub Wiki
Home > Primitives > Regular Polygon: Center
< Previous: Regular Polygon: Edge | Next: Rectangular Grid >
A regular polygon around a center, sized by a second point.
Category: Primitives | Add menu: Primitives > Regular Polygon: Center
Give it a center, a second point and a side count. The second point sets the size, and Measured To decides how that point is read: as a corner of the polygon, or as the middle of a side.
Those two readings are the whole difference between this node and one you could build by hand. The center and the second point are the same in both. A corner sits further from the center than the middle of a side does, so reading the point one way gives a polygon that fits inside the circle through it, and the other way gives a larger one whose sides touch that circle. The diagram above shows both, from the same two points.
- Center (point): the middle of the polygon.
- Through (point): the point that sets the size.
- Sides (number, editable, default 6): how many sides the polygon has.
- Measured To: a pulldown, set to Vertex until you change it. Vertex reads Through as a corner, Edge Midpoint reads it as the middle of a side. Wire something in and the node graph chooses instead.
- Region (region): one polygon per pair of points.
- Edges (curve): its sides, as separate curves, grouped per polygon.
- Points (point): its corners, grouped the same way.
Leave it alone and it is a pulldown on the node. Wire a number into it and the node graph picks the reading, and a list of numbers picks one per polygon: 0 for Vertex, 1 for Edge Midpoint. One node can therefore lay down corner-sized and side-sized polygons across the same pattern, which is why this is one node rather than two.
The model window cannot do that, because a tool is a click sequence rather than a wiring. That is why you will find three Regular Polygon tools there and only two nodes here.
Other programs call these two readings inscribed and circumscribed, describing the polygon's relation to a circle that is never drawn. They are reported as the most commonly reversed pair of buttons in CAD, because the one called circumscribed produces the smaller radius. Locus names what you give it instead: a corner, or the middle of a side.
The two point lists pair index-for-index, and Sides pairs alongside them or broadcasts a single value to all. A pair that cannot describe a polygon, because the two points sit on top of each other, contributes nothing rather than a guess.
< Previous: Regular Polygon: Edge | Next: Rectangular Grid >
- Regular Polygon: Edge: the same shape raised on a side you give, rather than sized from the middle.
- Circle: Center Radius: the same center-and-distance idea, without the corners.
- Explode: what the polygon was built from, rather than what it is.

