supershape.path()
Syntax
path(x, y, w, h, m, n1, n2, n3, points=1000)
Description
Returns a supershape as a path drawable with the drawpath() command. The first four parameters define the path's origin, width and height. The next four (m, n1, n2 and n3) define the path's shape.
Increasing m adds rotational symmetry to the shape: when m is 0 you get a circle, m=2 is an ellipse. m=4 is a square and so on. As the n's are kept equal but reduced the form becomes increasingly pinched. When m=5 and all the n's are 1 you get a pentagon, reducing all the n's to 0.3 you get a five-pointed star. If n1 is slightly larger than n2 and n3 then bloated forms result. See http://local.wasp.uwa.edu.au/~pbourke/curves/supershape/ for more information.
Example
supershape = ximport("supershape")
nofill()
stroke(0)
strokewidth(0.5)
x = y = 100
w = h = 100
p = supershape.path(x, y, w, h, 5, 0.3, 0.3, 0.3)
drawpath(p)