An implementation of Superellipse and Supershapes.
local shape = SuperShape.new([type, color, numberOfPoints])
- type(string): one of SuperShape's types [default: SuperShape.SHAPE]:
- SuperShape.SHAPE - Supershape
- SuperShape.ELLIPSE - Superellipse
- SuperShape.CIRCLE - Regular circle
- SuperShape.HEART - Heart shape
- color(number): shape color [default: 0xffffff]
- numberOfPoints(number): Number of edge points [default: 128]
shape:build(params)
params - a set of params that depends on shape type
- SuperShape.SHAPE - r, a, b, m, n1, n2, n3 (see Supershape for more detail)
- SuperShape.ELLIPSE - a, b, m, n (see Superellipse for more detail)
- SuperShape.CIRCLE - r (radius)
- SuperShape.HEART - r (radius SCALE)