
Superformula - GuiA
https://en.wikipedia.org/wiki/Superformula
======
Animats
Aw, they're concave.

Many years ago, when Symbolics LISP machines roamed the earth, Alex Pentland
wrote the first animation physics engine. Everything was a deformed
superellipse, or rather the solid of rotation of one. You could apply a bend
and a taper to a superellipse-generated solid. These were called
"superquadrics".[1] I spent much time trying to come up with an analytical
formula for the closest distance between two such objects, for collision
detection. This was a dead end; polyhedra and meshes, although they required
much more bookkeeping, were more useful in programs. Interest in superquadrics
died out.

~~~
restalis
Did you intended to leave a reference for note [1]?

~~~
Animats
Sorry. [1]

[1]
[http://www.cs.toronto.edu/~dt/papers/pami91/pami91.pdf](http://www.cs.toronto.edu/~dt/papers/pami91/pami91.pdf)

------
bluetidepro
I am guessing this is being posted in relation to the new PS4 game coming out,
"No Man's Sky". See controversial article about it here (published yesterday):
[http://www.pcgamer.com/company-claims-no-mans-sky-uses-
its-p...](http://www.pcgamer.com/company-claims-no-mans-sky-uses-its-patented-
equation-without-permission/)

~~~
cs702
Wait, mathematical functions are _patentable_!?

~~~
Jtsummers
May not survive, but it's really their application that's patented. You can
patent inventions and processes (how software patents came into being, and
also how someone patented a "method for exercising cats" \- a laser pointer
mounted to a platform that moved it randomly).

~~~
woliveirajr
In some countries you can't patent formulas or processes or even ideas...

~~~
madethemcry
Ideas aren't patentable at all.

In no country I guess. You have to transform your idea in something more
concrete first. A piece of hardware, a process, a composition of matter you
name it.

Imagine all those stupid ideas from just lying in the bed and thinking about
being patented. Nothing would have been created but everything would have been
patented. That's worse than patenting a formula or a piece of software.

~~~
restalis
One can argue that that thought requires effort as well as a number of other
preconditions which are not guaranteed to occur without heavy investment. Not
all ideas are equal. Some ideas may be just a mindless combination that can be
otherwise obtained from a machinal set up, whereas others can be the result of
years of work or of some genius visionary. What I consider necessary is a
rating system and a qualification threshold for what is worth to be considered
a thing that can be claimed and what can not. I'm aware that a deep rabbit
hole is opening here around this issue, but the question is if it's worth
having it nevertheless compared to what we have now.

------
pavel_lishin
> _Currently, the superformula is patented by Gielis, [2] but the patent was
> withdrawn in 2006 because of the patent fees not being paid.[3]_

I did not know you could patent a mathematical formula.

~~~
tsomctl
Especially one that is obvious. I remember drawing similar things using a
TI-84 in high school math, probably when we learned about polar coordinates.

~~~
SlashmanX
Well in this case the developer of NMS specifically said he was struggling
with planet generation until he discovered that exact formula, so you can
understand why there is _some_ (not a lot mind) reasoning for the company who
owns this patent (who are making a game involving it iirc) are making this
claim. Judging by their statement though it seems they want more of a
'partnership' type thing (knowledge sharing, ride on NMS coattails for a bit
etc)

------
taserian
Play with the superformula in d3.js:
[http://bl.ocks.org/mbostock/1021103](http://bl.ocks.org/mbostock/1021103)

~~~
taserian
Also, tweening between superformula shapes in d3.js:
[http://bl.ocks.org/mbostock/1020902](http://bl.ocks.org/mbostock/1020902)

------
mcphage
If the superformula itself is patented, what protection does that give to a
generalization of it, like replacing m with y & z as presented in the article?

~~~
AstralStorm
None really, it is just prior art. The modification is substantial enough.

Caveat: not a patent lawyer.

------
BoudewijnE
> You can, however, patent the practical application of a mathematical formula

> Genicap's patent calls out the formula's potential use in "graphics programs
> (e.g., 2D, 3D, etc.); CAD software; finite element analysis programs; wave
> generation programs; or other software," it doesn't specifically mention
> game design (procedurally generated or otherwise).

[http://arstechnica.com/gaming/2016/07/no-mans-sky-faces-
pote...](http://arstechnica.com/gaming/2016/07/no-mans-sky-faces-potential-
patent-fight-over-use-of-superformula/)

------
arcanus
How hard is it to invert? e.g. given a set of points along a particular curve,
how difficult is it to find the values of the 6 parameters that generated it?

~~~
vinchuco
If you know a,b,m,n1,n2,n3, and use sufficient points, you may be able to get
an interpolated approximation.

In general, one can fit many such curves through a finite set of points.
[http://math.stackexchange.com/questions/65970/can-a-
function...](http://math.stackexchange.com/questions/65970/can-a-function-be-
found-to-fit-any-set-of-points)

A question originally asked by Leibniz to determine the measure of usefulness
of a law. [https://plus.maths.org/content/omega-and-why-maths-has-no-
to...](https://plus.maths.org/content/omega-and-why-maths-has-no-toes).

If you don't have the 6 parameters, good luck. A unique inverse is defined
only for injective functions.

------
sethx
For even more gielis visualization pleasure, check this out:
[https://www.thregr.org/~wavexx/software/gte/](https://www.thregr.org/~wavexx/software/gte/)

------
iamcreasy
This reminds me of the polygon tool of Inkscape .

Video :
[https://www.youtube.com/watch?v=pBLy9KDPMHk](https://www.youtube.com/watch?v=pBLy9KDPMHk)

------
LolWolf
> While the above equation, dubbed the "superformula" by Gielis (2003), is
> clearly capable of describing a number of diverse biological shapes having a
> variety of symmetries, it seems unlikely that this formula has any
> particularly fundamental biological significance (Peterson 2002, Whitfield
> 2003) beyond as a possibly convenient parametrization. [1]

I'm not a huge fan of these random parametrizations; overall, it seems like
they have no physical significance (yay! it can describe a bunch of things! I
can do that anyways by picking a linear space with enough dimensions or a nice
non-linear kernel and projecting into the first few principal components, and
best of all, it's going to be fit directly to my problem). I'd like to be
enlightened as to why this is such a big deal and why anyone would do this
instead of parametrization of meshes for procedural generation? It seems a few
comments here are referencing NMS, hence the question.

[1]
[http://mathworld.wolfram.com/Superellipse.html](http://mathworld.wolfram.com/Superellipse.html)

------
calebm
Seems kind of like taking the fourier transform to the polar space.

------
ii
If I made a formula that is more generalized, patents still apply?

Here it is in complex numbers:

    
    
        p = (r1*cos(ph1 + th) + 1.0*I*r2*sin(ph2 + th))*
       (Abs(cos(m*th/4)/a)**n2 + Abs(sin(m*th/4)/b)**n3)**(-1/n1)
    

This can produce a number of interesting shapes that original Gielis
transforms can't.

------
darkstalker
I wonder if there is a distance function to it, so you can render it in 3D
using sphere tracing.

~~~
Impossible
This Shadertoy
([https://www.shadertoy.com/view/4llGWM](https://www.shadertoy.com/view/4llGWM))
uses sphere tracing it but doesn't use a real distance function, the author
asks the same question.

------
mgalka
For any D3 users, there is a superformula plugin. Very handy.
[http://bl.ocks.org/mbostock/1020902](http://bl.ocks.org/mbostock/1020902)

------
kordless
The variations are interesting in relation to the approach and recession of
the point on the line from the origin.

~~~
carl_corder
This is my take away:

PolarPlot[(Abs[Cos[2 _(t - Pi /2)/4]] + Abs[Sin[44_(t -
Pi/2)/4]])^(-1/(-0.2)), {t, 0, 2*Pi}, PlotRange -> {{-20, 20}, {-5, 32}},
PlotStyle -> Darker[Green, 0.2], PlotTheme -> "Marketing"]

------
kgdinesh
Can we formulate Mobius Strip using this?

------
dotraul
very cool

------
known
Bang !

