image thumbnail


version 1.1.0 (1.99 MB) by Adam Danz
Creates vertices for stars with customizable number of rays, position, size, and orientation.


Updated 28 Mar 2021

View License

xy = createStarVertices(nrays)
Creates vertices of a star with nrays number of rays. xy is an mx2 matrix of (x,y) vertices.

[xy, h] = createStarVertices(ax, nrays)
Plots the star on axes ax as a patch object.

createStarVertices(__,nrays, center, diameters, orientation)
Specifies the position of the star (center = [x,y]), the size (diameters = [inner, outer]), and the orientation (degrees rotation).

Cite As

Adam Danz (2021). createStarVertices (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!