[chiplotle-discuss] Superformula for Supershapes
Victor Adan
vga2102 at columbia.edu
Sun Mar 14 21:12:42 EDT 2010
very cool! will check it out.
v.
On Sun, Mar 14, 2010 at 08:48:00PM +0100, architetto francesco fantoni <hva - hermanitos verdes architetti> wrote:
> I've committed to the repo a new class:
>
> Supershape, it uses the 'superformula', a generalization of
> superellipses first proposed by Johan Gielis.
> It can be used to make nice shapes often found in nature.
> see this:
> http://en.wikipedia.org/wiki/Johan_Gielis
>
> the compound command is:
> Supershape(xy, width, height, m, n1, n2, n3, points=1000,
> percentage=1.0, range=None)
>
> width and height, well, are width and height
> m, n1, n2, n3 are the parameters tha control the curve
> points is the number of points we use (less is less accurate)
> percentage (0.0-1.0) is how many of this points we use (0.5 will draw
> half of the curve)
> range is the angle we cover with the curve, default is 2*pi for a closed
> curve.
>
> for example you could try something like:
> s = Supershape((0,0), 1000, 1000, 1, 0.5, 0.5, 0.5)
> that draws a drop-like shape, or
> s = Supershape((0,0), 1000, 1000, 8, 0.5, 0.5, 8)
> for some sort of cloverleaf
>
> best,
> francesco
>
> _______________________________________________
> chiplotle-discuss mailing list
> chiplotle-discuss at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/chiplotle-discuss
>
More information about the chiplotle-discuss
mailing list