Jump to content

Superquadrics: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
AnnaBSP (talk | contribs)
No edit summary
 
(36 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{Short description|Family of geometric shapes}}
[[File:Ex_sq.png|right|320px|thumb|Some superquadrics.]]
[[File:Ex_sq.png|right|300px|thumb|Some superquadrics.]]
In [[mathematics]], the '''superquadrics''' or '''super-quadrics''' (also '''superquadratics''') are a family of [[geometry|geometric shapes]] defined by formulas that resemble those of [[ellipsoid]]s and other [[quadric]]s, except that the [[square (algebra)|squaring]] operations are replaced by arbitrary powers. They can be seen as the three-dimensional relatives of the [[superellipse]]s. The term may refer to the solid object or to its [[Surface (mathematics)|surface]], depending on the context. The equations below specify the surface; the solid is specified by replacing the equality signs by less-than-or-equal signs.
In [[mathematics]], the '''superquadrics''' or '''super-quadrics''' (also '''superquadratics''') are a family of [[geometry|geometric shapes]] defined by formulas that resemble those of [[ellipsoid]]s and other [[quadric]]s, except that the [[square (algebra)|squaring]] operations are replaced by arbitrary powers. They can be seen as the three-dimensional relatives of the [[superellipse]]s. The term may refer to the solid object or to its [[Surface (mathematics)|surface]], depending on the context. The equations below specify the surface; the solid is specified by replacing the equality signs by less-than-or-equal signs.


The superquadrics include many shapes that resemble [[cube]]s, [[octahedron|octahedra]], [[Cylinder (geometry)|cylinders]], [[lozenge]]s and [[spindle torus|spindle]]s, with rounded or sharp corners. Because of their flexibility and relative simplicity, they are popular [[geometric model]]ing tools, especially in [[computer graphics]].
The superquadrics include many shapes that resemble [[cube]]s, [[octahedron|octahedra]], [[Cylinder (geometry)|cylinders]], [[Lozenge (shape)|lozenge]]s and [[spindle torus|spindle]]s, with rounded or sharp corners.<ref name="barr81" /> Because of their flexibility and relative simplicity, they are popular [[geometric model]]ing tools, especially in [[computer graphics]]. It becomes an important geometric primitive widely used in computer vision,<ref name=":1" /><ref name=":0" /> robotics,<ref>{{Cite journal |last1=Ruan |first1=Sipu |last2=Wang |first2=Xiaoli |last3=Chirikjian |first3=Gregory S. |date=2022 |title=Collision Detection for Unions of Convex Bodies With Smooth Boundaries Using Closed-Form Contact Space Parameterization |journal=IEEE Robotics and Automation Letters |volume=7 |issue=4 |pages=9485–9492 |doi=10.1109/LRA.2022.3190629 |s2cid=250543506 |issn=2377-3766|doi-access=free }}</ref> and physical simulation.<ref>{{Cite journal |last1=Lu |first1=G. |last2=Third |first2=J. R. |last3=Müller |first3=C. R. |date=2012-08-20 |title=Critical assessment of two approaches for evaluating contacts between super-quadric shaped particles in DEM simulations |url=https://www.sciencedirect.com/science/article/pii/S0009250912003223 |journal=Chemical Engineering Science |language=en |volume=78 |pages=226–235 |doi=10.1016/j.ces.2012.05.041 |bibcode=2012ChEnS..78..226L |issn=0009-2509}}</ref>

Some authors, such as [[Alan H. Barr|Alan Barr]], define "superquadrics" as including both the [[superellipsoid]]s and the [[supertoroid]]s.<ref name="barr81">Alan H. Barr (January 1981), ''Superquadrics and Angle-Preserving Transformations''. IEEE_CGA vol. 1 no. 1, pp. 11–23</ref><ref name="barr92">Alan H. Barr (1992), ''Rigid Physically Based Superquadrics''. Chapter III.8 of ''Graphics Gems III'', edited by D. Kirk, pp. 137–159</ref> However, the (proper) supertoroids are not superquadrics as defined above; and, while some superquadrics are superellipsoids, neither family is contained in the other.
Comprehensive coverage of geometrical properties of superquadrics and a method of their recovery from [[range image]]s is covered in a monograph <ref>Aleš Jaklič, Aleš Leonardis, Franc Solina (2000) ''Segmentation and Recovery of Superquadrics''. Kluwer Academic Publishers, Dordrecht</ref>.


Some authors, such as [[Alan H. Barr|Alan Barr]], define "superquadrics" as including both the [[superellipsoid]]s and the [[supertoroid]]s.<ref name="barr81">{{cite journal|last1=Barr|title=Superquadrics and Angle-Preserving Transformations|url=https://ieeexplore.ieee.org/document/1673799|journal=IEEE Computer Graphics and Applications|issn=0272-1716 |pages=11–23|volume=1|issue=1|date=1 January 1981|doi=10.1109/MCG.1981.1673799|s2cid=9389947 }}</ref><ref name="barr92">Alan H. Barr (1992), ''Rigid Physically Based Superquadrics''. Chapter III.8 of ''Graphics Gems III'', edited by D. Kirk, pp. 137–159</ref> In modern computer vision literatures, superquadrics and [[Superellipsoid|superellipsoids]] are used interchangeably, since [[Superellipsoid|superellipsoids]] are the most representative and widely utilized shape among all the superquadrics.<ref name=":1">{{Cite book |last1=Paschalidou |first1=Despoina |last2=Ulusoy |first2=Ali Osman |last3=Geiger |first3=Andreas |title=2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) |chapter=Superquadrics Revisited: Learning 3D Shape Parsing Beyond Cuboids |date=2019 |chapter-url=https://ieeexplore.ieee.org/document/8953499 |pages=10336–10345 |doi=10.1109/CVPR.2019.01059|arxiv=1904.09970 |isbn=978-1-7281-3293-8 |s2cid=128265641 }}</ref><ref name=":0" /> Comprehensive coverage of geometrical properties of superquadrics and methods of their recovery from [[range image]]s and [[Point cloud|point clouds]] are covered in several computer vision literatures.<ref name="barr81" /><ref name=":0">{{Cite book |last1=Liu |first1=Weixiao |last2=Wu |first2=Yuwei |last3=Ruan |first3=Sipu |last4=Chirikjian |first4=Gregory S. |title=2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) |chapter=Robust and Accurate Superquadric Recovery: A Probabilistic Approach |date=2022 |chapter-url=https://ieeexplore.ieee.org/document/9878948 |pages=2666–2675 |doi=10.1109/CVPR52688.2022.00270|arxiv=2111.14517 |isbn=978-1-6654-6946-3 |s2cid=244715106 }}</ref><ref>Aleš Jaklič, Aleš Leonardis, Franc Solina (2000) ''Segmentation and Recovery of Superquadrics''. Kluwer Academic Publishers, Dordrecht</ref><ref>{{Cite book |last1=Wu |first1=Yuwei |last2=Liu |first2=Weixiao |last3=Ruan |first3=Sipu |last4=Chirikjian |first4=Gregory S. |title=Computer Vision – ECCV 2022 |chapter=Primitive-Based Shape Abstraction via Nonparametric Bayesian Inference |date=2022 |editor-last=Avidan |editor-first=Shai |editor2-last=Brostow |editor2-first=Gabriel |editor3-last=Cissé |editor3-first=Moustapha |editor4-last=Farinella |editor4-first=Giovanni Maria |editor5-last=Hassner |editor5-first=Tal |chapter-url=https://link.springer.com/chapter/10.1007/978-3-031-19812-0_28 |series=Lecture Notes in Computer Science |volume=13687 |language=en |location=Cham |publisher=Springer Nature Switzerland |pages=479–495 |doi=10.1007/978-3-031-19812-0_28 |arxiv=2203.14714 |isbn=978-3-031-19812-0}}</ref>


== Formulas ==
== Formulas ==
Line 29: Line 28:


=== Parametric description ===
=== Parametric description ===
Parametric equations in terms of surface parameters ''u'' and ''v'' (longitude and latitude) are
Parametric equations in terms of surface parameters ''u'' and ''v'' (equivalent to longitude and latitude if m equals 2) are
:<math>\begin{align}
:<math>\begin{align}
x(u,v) &{}= A g\left(v,\frac{2}{r}\right) g\left(u,\frac{2}{r}\right) \\
x(u,v) &{}= A g\left(v,\frac{2}{r}\right) g\left(u,\frac{2}{r}\right) \\
Line 36: Line 35:
& -\frac{\pi}{2} \le v \le \frac{\pi}{2}, \quad -\pi \le u < \pi ,
& -\frac{\pi}{2} \le v \le \frac{\pi}{2}, \quad -\pi \le u < \pi ,
\end{align}</math>
\end{align}</math>
where the auxiliary functions are
where the [[auxiliary function]]s are
:<math>\begin{align}
:<math>\begin{align}
f(\omega,m) &{}= \sgn(\sin \omega) |\sin \omega|^m \\
f(\omega,m) &{}= \sgn(\sin \omega) \left|\sin \omega \right|^m \\
g(\omega,m) &{}= \sgn(\cos \omega) |\cos \omega|^m
g(\omega,m) &{}= \sgn(\cos \omega) \left|\cos \omega \right|^m
\end{align}</math>
\end{align}</math>
and the [[sign function]] sgn(''x'') is
and the [[sign function]] sgn(''x'') is
Line 48: Line 47:
\end{cases}</math>
\end{cases}</math>


===Spherical product===

Barr introduces the ''spherical product'' which given two plane curves produces a 3D surface. If
<math display="block">f(\mu)=\begin{pmatrix}f_1(\mu) \\ f_2(\mu)\end{pmatrix},\quad g(\nu)=\begin{pmatrix}g_1(\nu)\\g_2(\nu)\end{pmatrix}</math>
are two plane curves then the spherical product is
<math display="block">h(\mu,\nu) = f(\mu)\otimes g(\nu) = \begin{pmatrix} g_1(\nu)\ f_1(\mu) \\ g_1(\nu)\ f_2(\mu) \\ g_2(\nu) \end{pmatrix}</math>
This is similar to the typical parametric equation of a [[sphere]]:
<math display="block">\begin{align}
x&=x_{0}+r\sin \theta \;\cos \varphi \\
y&=y_{0}+r\sin \theta \;\sin \varphi \qquad (0\leq \theta \leq \pi ,\;0\leq \varphi <2\pi )\\
z&=z_{0}+r\cos \theta
\end{align}</math>
which give rise to the name spherical product.

Barr uses the spherical product to define quadric surfaces, like [[ellipsoid]]s, and [[hyperboloid]]s as well as the [[torus]],
[[superellipsoid]], superquadric hyperboloids of one and two sheets, and supertoroids.<ref name="barr81"/>
<!-- Fix this for superquadrics:
<!-- Fix this for superquadrics:
==Properties==
==Properties==
Line 64: Line 79:
<!-- Is this code worth including? The equation is enough! -->
<!-- Is this code worth including? The equation is enough! -->
<syntaxhighlight lang="matlab">
<syntaxhighlight lang="matlab">
function retval=superquadric(epsilon,a)
function superquadric(epsilon,a)
n=50;
n = 50;
etamax=pi/2;
etamax = pi/2;
etamin=-pi/2;
etamin = -pi/2;
wmax=pi;
wmax = pi;
wmin=-pi;
wmin = -pi;
deta=(etamax-etamin)/n;
deta = (etamax-etamin)/n;
dw=(wmax-wmin)/n;
dw = (wmax-wmin)/n;
[i,j] = meshgrid(1:n+1,1:n+1)
[i,j] = meshgrid(1:n+1,1:n+1)
eta = etamin + (i-1) * deta;
eta = etamin + (i-1) * deta;
Line 80: Line 95:


mesh(x,y,z);
mesh(x,y,z);
end
endfunction;
</syntaxhighlight>
</syntaxhighlight>


Line 112: Line 127:
</code>
</code>
-->
-->
== See also ==
* [[Superegg]]
* [[Superellipsoid]]
* [[Ellipsoid]]


== References ==
== References ==


{{reflist}}
{{reflist}}

== See also ==
* [[Superegg]]


== External links ==
== External links ==
Line 127: Line 143:
* [http://demonstrations.wolfram.com/Superquadrics/ Superquadrics] by Robert Kragler, [[The Wolfram Demonstrations Project]].
* [http://demonstrations.wolfram.com/Superquadrics/ Superquadrics] by Robert Kragler, [[The Wolfram Demonstrations Project]].
* [https://github.com/pratikmallya/Superquad Superquadrics in Python]
* [https://github.com/pratikmallya/Superquad Superquadrics in Python]
* [https://github.com/bmlklwx/EMS-superquadric_fitting Superquadrics recovery algorithm in Python and MATLAB]




[[Category:Computer graphics]]
[[Category:Computer graphics]]
[[Category:Computer vision]]
[[Category:Geometry]]
[[Category:Geometry in computer vision]]
[[Category:Robotics engineering]]

Latest revision as of 14:59, 21 November 2024

Some superquadrics.

In mathematics, the superquadrics or super-quadrics (also superquadratics) are a family of geometric shapes defined by formulas that resemble those of ellipsoids and other quadrics, except that the squaring operations are replaced by arbitrary powers. They can be seen as the three-dimensional relatives of the superellipses. The term may refer to the solid object or to its surface, depending on the context. The equations below specify the surface; the solid is specified by replacing the equality signs by less-than-or-equal signs.

The superquadrics include many shapes that resemble cubes, octahedra, cylinders, lozenges and spindles, with rounded or sharp corners.[1] Because of their flexibility and relative simplicity, they are popular geometric modeling tools, especially in computer graphics. It becomes an important geometric primitive widely used in computer vision,[2][3] robotics,[4] and physical simulation.[5]

Some authors, such as Alan Barr, define "superquadrics" as including both the superellipsoids and the supertoroids.[1][6] In modern computer vision literatures, superquadrics and superellipsoids are used interchangeably, since superellipsoids are the most representative and widely utilized shape among all the superquadrics.[2][3] Comprehensive coverage of geometrical properties of superquadrics and methods of their recovery from range images and point clouds are covered in several computer vision literatures.[1][3][7][8]

Formulas

[edit]

Implicit equation

[edit]

The surface of the basic superquadric is given by

where r, s, and t are positive real numbers that determine the main features of the superquadric. Namely:

  • less than 1: a pointy octahedron modified to have concave faces and sharp edges.
  • exactly 1: a regular octahedron.
  • between 1 and 2: an octahedron modified to have convex faces, blunt edges and blunt corners.
  • exactly 2: a sphere
  • greater than 2: a cube modified to have rounded edges and corners.
  • infinite (in the limit): a cube

Each exponent can be varied independently to obtain combined shapes. For example, if r=s=2, and t=4, one obtains a solid of revolution which resembles an ellipsoid with round cross-section but flattened ends. This formula is a special case of the superellipsoid's formula if (and only if) r = s.

If any exponent is allowed to be negative, the shape extends to infinity. Such shapes are sometimes called super-hyperboloids.

The basic shape above spans from -1 to +1 along each coordinate axis. The general superquadric is the result of scaling this basic shape by different amounts A, B, C along each axis. Its general equation is

Parametric description

[edit]

Parametric equations in terms of surface parameters u and v (equivalent to longitude and latitude if m equals 2) are

where the auxiliary functions are

and the sign function sgn(x) is

Spherical product

[edit]

Barr introduces the spherical product which given two plane curves produces a 3D surface. If are two plane curves then the spherical product is This is similar to the typical parametric equation of a sphere: which give rise to the name spherical product.

Barr uses the spherical product to define quadric surfaces, like ellipsoids, and hyperboloids as well as the torus, superellipsoid, superquadric hyperboloids of one and two sheets, and supertoroids.[1]

Plotting code

[edit]

The following GNU Octave code generates a mesh approximation of a superquadric:

function superquadric(epsilon,a)
  n = 50;
  etamax = pi/2;
  etamin = -pi/2;
  wmax = pi;
  wmin = -pi;
  deta = (etamax-etamin)/n;
  dw = (wmax-wmin)/n;
  [i,j] = meshgrid(1:n+1,1:n+1)
  eta = etamin + (i-1) * deta;
  w   = wmin + (j-1) * dw;
  x = a(1) .* sign(cos(eta)) .* abs(cos(eta)).^epsilon(1) .* sign(cos(w)) .* abs(cos(w)).^epsilon(1);
  y = a(2) .* sign(cos(eta)) .* abs(cos(eta)).^epsilon(2) .* sign(sin(w)) .* abs(sin(w)).^epsilon(2);
  z = a(3) .* sign(sin(eta)) .* abs(sin(eta)).^epsilon(3);

  mesh(x,y,z);
end

See also

[edit]

References

[edit]
  1. ^ a b c d Barr (1 January 1981). "Superquadrics and Angle-Preserving Transformations". IEEE Computer Graphics and Applications. 1 (1): 11–23. doi:10.1109/MCG.1981.1673799. ISSN 0272-1716. S2CID 9389947.
  2. ^ a b Paschalidou, Despoina; Ulusoy, Ali Osman; Geiger, Andreas (2019). "Superquadrics Revisited: Learning 3D Shape Parsing Beyond Cuboids". 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 10336–10345. arXiv:1904.09970. doi:10.1109/CVPR.2019.01059. ISBN 978-1-7281-3293-8. S2CID 128265641.
  3. ^ a b c Liu, Weixiao; Wu, Yuwei; Ruan, Sipu; Chirikjian, Gregory S. (2022). "Robust and Accurate Superquadric Recovery: A Probabilistic Approach". 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 2666–2675. arXiv:2111.14517. doi:10.1109/CVPR52688.2022.00270. ISBN 978-1-6654-6946-3. S2CID 244715106.
  4. ^ Ruan, Sipu; Wang, Xiaoli; Chirikjian, Gregory S. (2022). "Collision Detection for Unions of Convex Bodies With Smooth Boundaries Using Closed-Form Contact Space Parameterization". IEEE Robotics and Automation Letters. 7 (4): 9485–9492. doi:10.1109/LRA.2022.3190629. ISSN 2377-3766. S2CID 250543506.
  5. ^ Lu, G.; Third, J. R.; Müller, C. R. (2012-08-20). "Critical assessment of two approaches for evaluating contacts between super-quadric shaped particles in DEM simulations". Chemical Engineering Science. 78: 226–235. Bibcode:2012ChEnS..78..226L. doi:10.1016/j.ces.2012.05.041. ISSN 0009-2509.
  6. ^ Alan H. Barr (1992), Rigid Physically Based Superquadrics. Chapter III.8 of Graphics Gems III, edited by D. Kirk, pp. 137–159
  7. ^ Aleš Jaklič, Aleš Leonardis, Franc Solina (2000) Segmentation and Recovery of Superquadrics. Kluwer Academic Publishers, Dordrecht
  8. ^ Wu, Yuwei; Liu, Weixiao; Ruan, Sipu; Chirikjian, Gregory S. (2022). "Primitive-Based Shape Abstraction via Nonparametric Bayesian Inference". In Avidan, Shai; Brostow, Gabriel; Cissé, Moustapha; Farinella, Giovanni Maria; Hassner, Tal (eds.). Computer Vision – ECCV 2022. Lecture Notes in Computer Science. Vol. 13687. Cham: Springer Nature Switzerland. pp. 479–495. arXiv:2203.14714. doi:10.1007/978-3-031-19812-0_28. ISBN 978-3-031-19812-0.
[edit]