Understanding the star shape calculator — concept and principle
This calculator works out the geometry of a regular star polygon {p/q}, such as the five-pointed star {5/2}. From the number of points, the step and the outer radius it gives the star's area, the share of the circle it covers, the perimeter of its outline, the inner radius, the angle at each point and the lengths of the drawn lines. Use it for drawing and cutting stars, sewing and quilting patterns, signage, woodwork and geometry projects.
How it is calculated
For p points on a circle of radius R, joining every q-th point:
- Line (chord) length = 2R·sin(πq/p); total drawn length = p × chord.
- Angle at each point = 180° × (p − 2q) ÷ p.
- Inner radius r = R·cos(πq/p) ÷ cos(π(q − 1)/p).
- Area of the outline = p·R·r·sin(π/p).
- Outline perimeter = 2p·√(R² + r² − 2Rr·cos(π/p)).
p and q must share no common factor, and 2 ≤ q < p/2.
The principle
The star's tips sit evenly on a circle, and each drawn line is a chord that skips q − 1 points. The lines cross at inner corners that also lie evenly on a smaller circle of radius r. The outline is therefore a 2p-sided polygon that alternates between a tip and an inner corner. It can be split into 2p identical triangles from the centre, each with sides R and r and an angle π/p between them, which gives the area formula. The perimeter uses the law of cosines on one of those edges.
Worked example
Default inputs: p = 5, q = 2, R = 10 cm.
- Chord = 2 × 10 × sin 72° ≈ 19.0211 cm; all five lines ≈ 95.1057 cm.
- Angle at each point = 180° × (5 − 4) ÷ 5 = 36°.
- Inner radius r = 10 × cos 72° ÷ cos 36° ≈ 3.81966 cm.
- Area = 5 × 10 × 3.81966 × sin 36° ≈ 112.257 cm², about 35.73% of the circle (314.16 cm²).
- Outline perimeter = 10 × √(100 + 14.59 − 76.39 × cos 36°) ≈ 72.6543 cm.
| Outer radius R (centre to a tip, cm) | Area of the star |
|---|---|
| 2.5 | 7.01606 |
| 5 | 28.0642 |
| 7.5 | 63.1446 |
| 10 | 112.257 |
| 12.5 | 175.402 |
| 15 | 252.578 |
| 20 | 449.028 |
How to read the result
The area is the solid star shape, as if cut from paper. The outline perimeter is the length of the cut around it; the drawn lines total is the ink or wire needed to draw the star with straight lines through the middle. A larger step q makes sharper, thinner points and a smaller inner radius.
Common mistakes
- Using p and q with a common factor, such as {6/2}, which gives two separate triangles rather than one star.
- Confusing the outline perimeter with the total length of the drawn lines.
- Entering the diameter instead of the radius.
- Expecting a 4-point star from this formula; with p = 4, no q satisfies 2 ≤ q < 2.
Frequently asked questions
What is the angle at the tip of a five-pointed star?
36°, and the five tip angles add up to 180°.
What does {5/2} mean?
Five points on a circle, joining every second point.
Why must p and q have no common factor?
Otherwise the path returns to the start before visiting every point, and the figure splits into separate polygons.
Sources: Weisstein, E. W., "Star Polygon", Wolfram MathWorld