OpenSCAD Parametric Star example

OpenSCAD examples
/

Parametric Star

Intermediate

Profiles & patterns

Lesson 13 of 22

Generate polygon vertices with a list comprehension and twist the extrusion.

Try changing:

pointsouter_radiusinner_radiusheighttwist

Medium compile complexity. Triangles scale with star points and extrusion slices.

How this model works

Alternating inner and outer radii creates twice as many vertices as star points. OpenSCAD trigonometry uses degrees. slices controls interpolation along the extrusion, while the polygon's point count controls its outline; $fn does not smooth polygon corners. Use a small twist while inspecting before increasing final slices.

main.scad

Loading draft

Ctrl/Cmd+Enter or F5: preview · F6: render · Ctrl/Cmd+F: search · Ctrl+Space: complete · Tab: leave editor

0 messages

Make it your own

Make a five-point star with no twist, then compare it with a 90-degree twist. Keep inner_radius smaller than outer_radius so the star does not invert.

Change one parameter at a time and inspect the result. Use the workspace reset action to return to this lesson’s original model.

FAQ