What is a rectangular star?
A rectangular star is a star with n equal rectangular spikes, n at least 3. A regular n-gon of edge a sits in the middle, and a rectangle of width a and length b stands on each of its sides. The length b is fixed by one condition: the 2n outer corners of the rectangles are the corners of a regular 2n-gon. Then the gap between two neighbouring spikes is an isosceles triangle with legs b and base a. The star has n mirror axes and n-fold rotational symmetry.
How to use it
Type the spike width a (the edge of the central polygon) and the number of spikes n, a whole number from 3 to 1,000. The spike length b is not an input: it follows from the condition that the spike corners form a regular polygon. The length unit is only a label: lengths come out in that unit and areas in its square. Each length you type must be from 0.000001 to 1,000,000,000 (a box that allows 0 also accepts 0), each area from 0.000000000001 to 1,000,000,000,000,000,000 and each angle greater than 0° and less than 180°; anything else, including text, is refused with a sentence that says why, and so is a set of values that cannot form the shape.
Derivation of the formulas
At a corner of the central n-gon its interior angle (n − 2)·180°/n and two right angles of the rectangles leave a gap of 360°/n between two spikes. That gap is a triangle with legs b and apex angle 2π/n, and its base must equal a for the outer corners to form a regular 2n-gon with all sides a:
$$ 2b \sin\frac{\pi}{n} = a \quad\Rightarrow\quad b = \frac{a}{2\sin(\pi/n)} $$
So the spike length equals the circumradius of the central polygon. The area is the central polygon, with inradius ρ = a/(2 tan(π/n)), plus n rectangles, and the outline is n spike ends and 2n spike sides:
$$ A = \frac{n a \rho}{2} + n a b, \qquad P = n a + 2 n b $$
A spike corner lies ρ + b out along the axis of its spike and a/2 to the side:
$$ r = \sqrt{(\rho + b)^{2} + \left(\frac{a}{2}\right)^{2}} $$
Worked example
The page opens with spike width a (edge of the central polygon) = 2, number of spikes n = 5. Then area A ≈ 23.894926; perimeter P ≈ 27.013016; spike length b ≈ 1.701302; circumradius r (centre to a spike corner) ≈ 3.236068. Values are shown with up to six decimals; a value below 0.0000005 or of 10¹⁵ and more is shown as its plain 12-digit number instead.
Frequently asked questions
Why is the spike length not an input?
The star is defined by its spike corners lying on a regular polygon with twice as many corners. Only one spike length does that for a given width and number of spikes, so the page works it out.
Why does the unit not change the numbers?
The calculator does not convert between units. Every length is read in the unit you chose, so the unit only labels the results; areas come out in that unit squared.
How accurate are the results?
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
References
H. S. M. Coxeter, Introduction to Geometry, 2nd edition, Wiley, 1969
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd edition, CRC Press, 2018