Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/226803750

A mathematical framework for rigid contact detection between quadric and


superquadric surfaces

Article  in  Multibody System Dynamics · April 2012


DOI: 10.1007/s11044-010-9220-0

CITATIONS READS

63 527

4 authors:

Daniel Simões Lopes Miguel T. Silva


Instituto Superior Técnico University of Lisbon
85 PUBLICATIONS   260 CITATIONS    105 PUBLICATIONS   1,214 CITATIONS   

SEE PROFILE SEE PROFILE

Jorge A.C. Ambrósio Paulo Flores


University of Lisbon University of Minho
303 PUBLICATIONS   5,065 CITATIONS    460 PUBLICATIONS   4,687 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Numerical study of pulsatile blood flow in a bifurcation View project

Patelofemoral View project

All content following this page was uploaded by Jorge A.C. Ambrósio on 21 May 2014.

The user has requested enhancement of the downloaded file.


7th EUROMECH Solid Mechanics Conference
J. Ambrósio et.al. (eds.)
Lisbon, Portugal, September 7-11, 2009

A MATHEMATICAL FRAMEWORK FOR CONTACT DETECTION


BETWEEN QUADRIC AND SUPERQUADRIC SURFACES
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

IDMEC/Instituto Superior Técnico, Technical University of Lisbon


Av. Rovisco Pais, 1049-001 Lisboa, Portugal
{danlopes, jorge}@dem.ist.utl.pt, MiguelSilva@ist.utl.pt

Keywords: Multibody Dynamics, Distance Calculation, Contact Detection, Superquadric


Surfaces, Contact Force Models, Surface Fitting.

Abstract. Distance calculation between surfaces plays an important role in computational


mechanics, namely, in the study of constrained multibody systems where contact forces take
part. In this paper, a general contact detection methodology for non-conformal surfaces,
described as quadric and superquadric surfaces, is presented. The mathematical framework
relies on algebraic and differential geometry, vector calculus, and on the C2 continuous
implicit and parametric representations of the surfaces. The proposed methodology
establishes a set of collinear and orthogonal contraints between vectors defining the
contacting surfaces that, allied to loci contraints, formulate the contact problem. This set of
non-linear equations is solved numerically with the Newton-Raphson method for which the
Jacobian matrices are calculated analytically. The outputs consists on the coordinates of the
pair of points with common normal vectors and, consequently, the minimum distance between
both surfaces. Reactive forces appear whenever contact occurs and are inserted within the
framework of multibody dynamics. The normal contact forces are evaluated, here, with a
continuous contact force model, which is based on the Hertzian elastic contact and on the
Hunt and Crossley dissipation model. For mechanical systems presenting more complex
shapes, that are more accurately modeled with freeform surfaces, a fitting algorithm is
exploited to approximate a superquadric to a set of points that belong to the generalized
surface. Basically, the fitting algorithm consists on the optimization problem of minimizing
the distances between the points within the neighbourhood of the contact site and the
approximate surface. Several mathematical and computational aspects, regarding the contact
detection methodology, are described.
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

1 INTRODUCTION
Contact is an omnipresent phenomenon in any mechanical system. Physically, it can be
defined as the tendency of two bodies on sharing a common locus in space in which reactive
forces are generated to oppose body intersection and energy is dissipated, usually, in the form
of heat.
To accurately design and simulate a mechanism, that is either interacting with the
surrounding environment or devising relative joint motion among the articulated bodies that
compose it, contact forces must be utterly considered [1]. Within multibody dynamics, contact
analysis is a computational methodology used to describe the behaviour of a constrained
mechanical system induced by reactive forces that are produced during body collision.
Contact analysis focuses on the resolution of three fundamental issues: (i) minimum distance
calculation between surfaces; (ii) contact detection; and (iii) establishment of a force model
that depends on material properties and (pseudo-)penetration depth. Such analysis requires a
representative geometric description of the bodies boundaries.
Given a non-conformal (or convex) surface representation of the colliding bodies, together
with their position and spatial orientation, the resolution of the minimum distance calculation
problem is purely geometric. The unknown variables of such problem are the spatial
coordinates of the candidate contacting pair of points. Usually, contact between two surfaces
is established by the resolution of a set of non-linear equations that expresses collinear and
orthogonal constraints between vectors defining the contacting surfaces, namely, the normal,
tangent, binormal and distance vectors [1-3]. Another type of equation that is important for
the geometric accuracy of contact analysis is hereafter called as the locus condition or
isosurface condition (isoline condition, in two-dimensional space). The solution of this type of
equations are the points that satisfy a geometric property. As an example, the locus condition
of a sphere is the location of all the points equally distanced from a point, i.e., the center point.
The intersection of rigid bodies geometries, although physically impossible, can be
considered as a motif for the mathematical concept of contact: two surfaces (or lines) are in
contact when their intersection is not a null set of points. Contact detection consists on
determining if the referred bodies are in physical contact, thus, three contact status are
possible: (i) no contact; (ii) external contact or contact at a sigle point; and (iii) contact with
pseudo-penetration. From a mechanical point of view, whenever contact occurs it is said that
the rigid bodies overlap or present pseudo-penetration. Here, contact detection relies on
evaluating the minimum distance between surfaces, i.e., contact is detected when the
minimum distance is lesser or equal to zero and positive when surfaces are apart. By
convention, negative distances imply surface overlap.
The magnitude of the contact reaction forces, which depends on the minimum distance,
can be calculated only when pseudo-penetration occurs. Within the equations of motion,
contact forces are seen as external forces that act upon interacting or interlinked bodies.
Different formalisms can be used to describe the continuous contact forces, including penalty
and linear complementary contact formulations. A common model for the continuous contact
forces was proposed by Lankarani and Nikravesh, which is based on the Hertzian non-linear
elastic contact [4]. Hunt and Crossley proposed a more general and continuous contact force
model that also accounts for energy disspation [5]. Although other formalisms, such as the
linear complementary problem, can be used to evaluate the contact forces, taking advantage of
the proposed geometric description of contact presented here, such methodologies are not
considered in this work.
For non-conformal contact analysis, the surface associated to the rigid body must be
described with a mathematically well-defined and C2 continuous geometric representation, so

2
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

that analytical expressions of the distance vector and the normal, tangential and binormal
surface vectors can be deduced. The surface representation can be either implicit or explicit
(parametric). This being, the mathematical framework presented hereafter relies on vector
calculus, algebraic and differential geometry. One of the main requirements to model the
geometry of a three-dimensional object, in this case the outer surface of a rigid body, is the
usage of a mathematical description that provides high geometric representativity. Quadric or
superquadric surfaces are geometric entities that provide such a description for a variety of
shapes, both natural and manmade objects.
For mechanical systems presenting freeform shapes, superquadrics surfaces can be fitted to
a set of points that belong to the generalized surface by solving the following optimization
problem: minimizing the distances between the points within the neighbourhood of the
contact site and the approximate surface. This strategy is suitable to handle contact problems
in which the contacting surfaces either have geometries close to a superquadratic surface or
the contact points do not depart from a small neigborhood of the surface.
Contact analysis has many important applications in other areas of applied sciences such as,
molecule simulation in computational physics [6], modeling discontinuous mechanical
systems (discrete element method) in geomechanics [7], humanoid design in biomechanics [8],
virtual reality simualtion and computer animation. From such a variety of applications,
several methods have been developed for distance computation and contact detection based
on quadric and superquadric surfaces.
Based on an interior point algorithm, Chakraborty et al. [9] formulated the distance
computation for convex bodies as an optimization problem to minimize the euclidean distance
subjected to the condition that candidate points lie on the surfaces. Such method presents
global convergence properties that are robust even in the absence of any initial information
about the closest points. The method is also quite accurate since the determined points belong
to the surface. Its main drawback is a lesser computational efficiency compared to other
methods [7,8].
For discrete element modeling, Lin and Ng [7] applied contact detection algorithms for
ellipsoids based on the common normal vector concept, which states that two points are the
candidate contact pair of points if the normal directions at these points are parallel to the
intersecting line. A set of non-linear equations obtained from equaling both normal vectors
and from equaling the normal vector to the distance vector, is solved numerically. Two
additional conditions of the points lying on the ellipsoids are also considered. This method
was tested only for ellipsoids and does not regard other vector relationships that are
fundamental for numerical robustness and accuracy.
For biomechanical applications, Kwak et al. [8] developed multibody models of
diarthrodial joints, such as the knee. The models include articular contact of freeform surfaces
with a parametric representation. Contact detection is also founded on the common normal
vector concept. Here, it is pointed out that the computational efficiency of their contact model
is enhanced by the use of analytical Jacobians.
Wang et al. [10] presented an algebraic condition for real-time continuous collision
detection for ellipsoids moving under rigid body transformations. The algebraic condition is a
quartic polynomial equation, also named as separation condition or characteristic equation,
that relates the geometric parameters of shape, spatial orientation, and position of two
ellipsoids. Depending on the sign of all four roots it is possible to determine the contact status.
The resolution of the characteristic equation is strightfoward, leading to a simple and yet
efficient algorithm for contact detection of ellipsoidal bodies that computes the exact time
interval of the collision [11].

3
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

In this paper, a general non-conformal contact detection methodology for rigid bodies,
described by quadric and superquadric surfaces, is presented. The proposed contact detection
methodology establishes a set of geometric conditions that, once fulfilled, render the pair of
points of possible contact. The resulting methodology consists in a set of non-linear equations
that is solved numerically with the Newton-Raphson method for which the Jacobian matrices
are calculated analytically, without resorting to optimization algorithms. This way, contact
detection comes naturally from the minimum distance calculation. The theoretical
formulations of the geometric description and the computational implementation aspects of
contact detection are described in the following sections.

2 CONTACT DETECTION METHODOLOGY AND MULTIBOY DYNAMICS


Within the multibody dynamics formulation, the second-order ordinary differential
equations that describe the motion of a constrained mechanical system are given by:
⎧⎪Mq + ΦTq λ = g
⎨ (1)
⎪⎩ Φq q = γ

where M is the global mass matrix, q  is the acceleration vector, Φq is the Jacobian matrix of
the kinematic constraints, λ is the vector of Lagrangian multipliers, γ is the right-hand side
vector of the acceleration equation and g is the external force vector. Contact forces are,
therefore, included in the g vector that contains all the external forces applied to the system.
The relative position and orientation of the bodies are obtained by integrating in time the
equations of motion given by Eq. 1. Spatial data, such as translational coordinates and euler
angles, varies with time and are contained within vector q, the vector of generalized
coordinates.
Contact mechanics relies on the geometric constraint that expresses the common normal
principle (although Lin and Ng [7] have referred it as a ‘concept’ it should be understood as a
geometric principle). Restriction to body movement by such a constraint is imposed by the
application of a pair of forces that appear when surfaces overlap, and not by the conditioning
of a DOF within the mechanical system.
For every time step, contact detection is evaluated by determining the minimum Euclidean
distance between the surfaces or, to test if the bodies are apart, by evaluating proximity
queries [9]. When two moving surfaces overlap, a pair of opposite contact normal forces
appear, each one applied on the contact points of the intervining bodies and with the direction
of the minimum distance vector. The reaction force magnitude is proportional to the pseudo-
penetration. Although the contact detection methodology regards bodies as being rigid, the
pseudo-penetration is an estimate of the deformation that results from the overlap of the
surfaces. This way, not only is it possible to predict the contact forces but also to estimate the
contact areas and contact stresses.
In Fig. 1, a generalized multibody model [1] of a contact pair is presented. Each rigid body
is defined with at least three points and can contain more than one contact surface. The
coordinate systems employed to describe the motion and configuration of a contact pair are:
the global coordinate system XYZ; the coordinate systems ξkηkζk of rigid bodies k ∈ {α,β}; and
the local coordinate systems xmymzm of surfaces m ∈ {i,j}. Position vectors and transformation
matrices, obtained from the multibody dynamics calculations, are represented, respectively,
by r and A where the subscripts indicate the corresponding coordinate systems, e.g., AOβ
represents the coordinate transformation from the local coordinate system of body β to the
global coordinate system. Position vectors in the local reference system of the contacting
surface are represented by s. Each body has a fixed coordinate system that must not be

4
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

confused with the local coordinate systems of the surfaces that compose it. Note that, contact
calculation is performed using the outward surface normals and that all vectorial relationships,
that define the geometric constraints, are referenced to the global coordinate system.

Figure 1: Multibody model of a contact pair and vector entities envolved in contact analysis.

3 MATHEMATICAL FORMULATION FOR DISTANCE CALCULATION AND


CONTACT DETECTION
Contact detection between two rigid and convex surfaces is a geometric problem that has
an unique solution. Accordingly, consider two non-deformable bodies α and β whose global
positions and orientations are given. Rigidly coupled to each body are non-conformal C2
continuous surfaces i and j that bear implicit and/or parametric representations. The common
normal principle states that two points are a contact pair, if and only if, the normal vectors at
these points are collinear relatively to each other and collinear with the minimum distance
vector that connects the two points. From this enunciation, one can infer that contact
formulation is intimately related to the surface representation. Implict and parametric surface
representations are written, in a general form, as:

'i ( xi , yi , zi ) = 0,
(2)
' j ( x j , y j , z j ) = 0,
and
p i = p i ( s, u ) ,
(3)
p j = p j ( w, v ) ,

where Fi and Fj are implicit scalar functions that define the locus of points belonging to
surfaces i and j, respectively; pi and pj are the parametric position vectors of the referred

5
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

surfaces; (x,y,z) the cartesian coordinates of a point belonging to the surface; and (s,u) and
(w,v) parametric coordinates. The distance vector that connects the two contact points
candidates located on the surfaces, dPQ, is defined as the difference of the global vector
positions of points P and Q, given by rOP and rOQ. Thus, one has,

d PQ = rOQ − rOP , (4)

where rOP and rOQ are unknown quantities. The normal vector at each point is derived by
partial differentiation of the surface equation in order to the spatial coordinates. If the implicit
surface representation is considered (Eq. 2), the normal vector is the surface gradient. A plane
that contains the tangent vectors can then be deduced since a plane can be defined by a point
and a normal vector. In the case of parametric surfaces (Eq. 3), differentiation of the surface
expression gives the tangential vectors along each spatial parameter. Therefore, surface
normals are calculated by the cross product of the tangent vectors.
Contact detection is formulated by a set of geometric constraints, including the
aforementioned common normal principle, which is written as a vector ΦG = ΦG (q G ) that
depends on the vector of the unknown points,

qG = ⎡ rOP ⎤ . (5)
⎢r ⎥
⎣ OQ ⎦

For convinience of the methodology, vector qG can also be expressed in local coordinates of
the intervining surfaces, as it will be described in the next section. In general, three types of
non-linear algebraic equations define a geometric constraint:

• orthogonal constraint (relative constraint between two perpendicular vectors);


• collinear contraint (relative constraint between two parallel vectors);
• locus or isosurface constraint (a point in space that lies on a contact surface).

It should be noticed that the latter type of constraint is only introduced for contact detection
regarding implicit surfaces.
As it was mentioned before, contact between surfaces is enunciated as the problematic of
encountering the location of the pair of points in which the distance vector, dPQ, is aligned to
the surface normals niP and njQ, and has a minimum value. This can be written as two cross
product equations relating vectors dPQ, niP, and njQ. Equivalently, the collinearity condition
can be expressed as an orthogonal constraint involving vector dPQ, surface tangent vectors tiP
and tjQ, and binormal vectors biP and bjQ. Eq. 6 presents the equivalency of both constraints,

⎧ d PQ ⋅ t iP = 0
d PQ × niP = 0 ⇔ ⎨
⎩d PQ ⋅ biP = 0
. (6)
⎧ d PQ ⋅ t jQ = 0
d PQ × n jQ = 0 ⇔ ⎨
⎩d PQ ⋅ b jQ = 0

In 3-D space, whether one considers the collinear or orthogonal constraint definition, Eq. 6
always renders a system of four non-linear independent equations. According to the
orthogonal constraint, Eq. 6 can be solved for the 4 unknown surface parameters (s,u,w,v) in

6
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

the case of parametric surfaces, or when the surface representation follows an implicit
definition, 2 additional locus contraints given by Eq. 2, one for each rigid body, must be
added to the set of orthogonal constraints. In this case, one has 4+2 equations for the 6
cartesian coordinates (xi, yi, zi) and (xj, yj, zj) of the candidate contact points. Redunt
constraints must be avoided so that all the equations are linearly independent.
The vector of geometric constraints ΦG is built with C2 continuous functions and the dot
and cross product operators do not introduce any discontinuity for an arbitrary point in the
domain, therefore, ΦG is a twice-differentiable vector function. The vector equation that
contains non-redundant geometric constraints,

ΦG (qG ) = 0, (7)

can then be solved using the Newton-Raphson iterative procedure which, theoretically,
converges quadratically near the solution. Since ΦG has, at least, a C2 mathematical
expression, one can exploit the numerical behaviour with analytical Jacobians.
The distance vector magnitude, d, is calculated as the signed Euclidean distance of vector
dPQ, thus, ‘negative distances’ are considered. At a given time instant, the signed magnitude d
indicates one of the three possible contact situtations (Table 1): (i) no contact; (ii) contact at a
single point or external contact (rOP = rOQ) and (iii) contact with pseudo-penetration.

Minimum distance
Contact type d = sign ( niP ⋅ d PQ ) d PQ 2
No contact d>0
External contact d=0
Contact with pseudo-penetration d<0

Table 1: Contact detection situations according to the minimum distance value.

3.1 Vector of geometric constraints and analytical Jacobian matrix


There is more than one way to formulate distance computation via geometric contraint
equations. The formulation deeply depends on the surface representation. Thus, mathematical
modeling for contact detection exploits certain geometric properties associated to the surface
representation in order to define the geometric entities (e.g., vectores and surface functions)
that participate in the constraint equations. All in all, these equations serve to restrict the
solution space to the desired solution, i.e., the solution with most physical meaning for contact.
For 3-D convex objects represented implicitly (Fig. 1), the abovementioned geometric
constraints of orthogonality and isosurface are grouped in a 6x1 vector ΦG which is written in
the matrix form as,
ΦG ( qG ) = 0 ⇔ ⎡ nTOP ⋅ t OQ ⎤ = ⎡ 0 ⎤ ,
⎢ T ⎥ ⎢ ⎥ (7)
⎢nOP ⋅ bOQ ⎥ ⎢ 0 ⎥
⎢ T ⎥ ⎢ ⎥
⎢ d PQ ⋅ t OQ ⎥ ⎢ 0 ⎥
⎢dT ⋅ b ⎥ ⎢ 0 ⎥
⎢ PQ OQ ⎥ ⎢ ⎥
⎢ Fi ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢⎣ Fj ⎥⎦ ⎣⎢ 0 ⎦⎥

7
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

where
T
qG = ⎡⎣ xi , yi , zi , x j , y j , z j ⎤⎦ . (8)

The last two geometric constraints in Eq. 7 are the implicit surface equations given in the
canonical form. i.e., the surface principal axis are aligned with the local coordinate axis and
the surface centroid is coincident with the local origin. All vectors in Eq. 7 are defined in
global coordinates except for the vector of unknown cartesian coordinates, qG. In fact, all
surface vectors in Eq. 7 depend on qG and on the position and orientation of the reference
systems. This being, the surface vectors can be expressed in local surface coordinates as (see
Fig. 1):
d PQ = rOQ − rOP =
= rOβ + A Oβ rβ j + A Oβ A β j s jQ − ( rOα + A Oα rα i + A Oα Aα i siP ) ,
n OP = A Oα Aα i niP , (9)
t OQ = A Oβ A β j ( n jQ × v jQ ) = A Oβ A β j n jQ v jQ ,

( )
b OQ = A Oβ A β j n jQ × ( n jQ × v jQ ) = A Oβ A β j n jQn jQ v jQ ,

where niP, njQ, and vjQ depend the position vectors of points P and Q in local surface
coordinates, siP and sjQ; the tilde sign (~) above the vectors is the skew-symmetric matrix
associated with the corresponding vector; and vjQ is an auxiliary vector applied to the
calculation of the tangent and binormal vectors to the surface, that is calculated in such a way
that is not collinear to the normal vector. In fact, any vector that respects the following two
conditions,

v = n ⇒ v = 0 ∧ n = 0, (10)
v n
⋅ ≠ 1, (11)
v n

is a valid auxiliary vector. The first condition (Eq. 10) implies that both vectors are equal if
and only if they are the zero vector. As for the second condition (Eq. 11), it implies that the
vectors must not be collinear.
The Newton-Raphson method relies on the Taylor series expansion of ΦG. This demands
the calculation of the geometric contraints Jacobians. Each row of the Jacobian matrix is the
first partial derivate of ΦG in order to qG. Hence,


ΦGqG ( qG ) = ΦG ( qG ) ⇔ ΦGqG ( qG ) = ⎡ tTOQ ( n OP ) G + nTOP ( t OQ ) ⎤ (12)
∂q G
⎢ q

qG

⎢b OQ ( n OP ) G
T
+ nTOP ( b OQ ) G ⎥
⎢ q q

⎢ t OQ ( d PQ ) G
T
+ d PQ ( t OQ ) G ⎥
T

⎢ q q

⎢b OQ ( d PQ ) G
T
+ d PQ ( b OQ ) G ⎥
T

⎢ q q

⎢ T
n iP 01×3 ⎥
⎢ 01×3 T
n jQ ⎥
⎣ ⎦
where

8
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

(d )
PQ qG = A Oβ A β j ( s jQ ) G − A Oα Aα i ( siP )qG ,
q

( nOP )q G = A Oα Aα i ( niP )qG ,

(t )
OQ qG = A Oβ A β j ( n jQ × v jQ ) =
qG (13)
= A Oβ A β j ⎡n jQ ( v jQ ) G + v jQ ( n jQ ) G ⎤ ,
⎣ q q ⎦

(b )
OQ qG (
= A Oβ A β j n jQ × ( n jQ × v jQ ) ) qG
=

= A Oβ A β j ⎡n jQn jQ ( v jQ ) G − n jQ v jQ ( n jQ ) G −
⎣ q q

− ( n jQ v jQ − v jQn jQ )( n jQ ) G ⎤ ,
q ⎦

are 3x6 matrices and

( siP )q G = ⎡1 0 0 0 0 0 ⎤ = [ I 0] , (s )jQ qG = ⎡0 0 0 1 0 0⎤ = [0 I ]. (14)


⎢ ⎥ ⎢ ⎥
⎢0 1 0 0 0 0 ⎥ ⎢0 0 0 0 1 0⎥
⎢0 0 1 0 0 0 ⎥ ⎢0 0 0 0 0 1 ⎥
⎣ ⎦ ⎣ ⎦

The equations presented in this section are generic to any implicit surface that is C2
continuous. Once equations Eq. 7 and Eq. 12 are implemented, extending the methodology to
other surfaces simply requires the deduction of the analytical expressions for niP, njQ, and vjQ
( niP )qG , ( n jQ ) G , and ( v jQ ) G which is usually a straightfoward process.
q q

4 RIGID BODY SURFACE REPRESENTATIONS AND 3-D VISUALIZATION


The selection of a surface model to represent and visualize the body geometry is of crucial
importance for contact analysis. The most important aspects to take under consideration are
the geometric representivity of the surface and the analyticity of the surface functions.
Preferably, the surface model must provide a compact representation (i.e., a small set of
geometric parameters) that can uniquely define a surface. Quadric and superquadrics surfaces
are geometric descriptions that are used to model a large variety of 3-D shapes, presenting
great shape fidelity for many natural and manmade objects. In this work, the outer surface or
certain regions of a bodies boundary are modeled as quadric or superquadric surfaces.
In this work, we will only take into account the implicit surface representation for the
contact detection methodology, whereas parametric surface functions are deduced solely for
visualization purposes. The surfaces are defined as a polynomial function in x, y and z
cartesian coordinates. For this reason, such functions are called algebraic surfaces. Quadrics
are second-degree polynomials while superquadrics are polynomials with non-negative real
expoents. Some of the surface family members are (super)ellipsoids, and one and two sheet
(super)hyperboloids. Associated to each surface function are geometric parameters or
coefficients that affect the shape, surface dimensions, and overall curvature in a
comprehensible manner.

9
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

4.1 Quadric Surfaces


The implict definition of a quadric surface in the canonical form, i.e., the spatial
configuration in which the surface is centered at the origin and the main axis are aligned to the
local coordinate system, is expressed as a real valued scalar function,

F ( x, y, z ) = a11 x 2 + a22 y 2 + a33 z 2 + a1 x + a2 y + a3 z − 1 = 0, (15)

with
a11a1 = a22 a2 = a33 a3 = 0, (16)

where {a11, a22, a33} are shape coefficients and {a1, a2, a3} are unit or zero valued coefficients
that define the quadric surface family type (Table 2). Dimension parameters along the x, y,
and z directions are given by the following formulas:
1 1 1
a= , b= , c= . (17)
a11 a22 a33

Quadric surface type Coefficients


Ellipsoid a11 > 0, a22 > 0, a33 > 0
Hyperboloid (1 sheet) a11 > 0, a22 > 0, a33 < 0
Hyperboloid (2 sheets) a11 < 0, a22 < 0, a33 > 0
Paraboloid (elliptic) a11 > 0, a22 > 0, a33 = 0, a3 < 0
Paraboloid (hyperbolic) a11 > 0, a22 < 0, a33 = 0, a3 < 0

Table 2: Quadric family classification according to the coefficient values.

Eq. 15 can also be expressed in a matricial form F ( x, y, z ) = xT Ax = 0, where

x = ⎡ x ⎤ , and A = ⎡ a11 0 0 1
2 a1 ⎤ . (18)
⎢ y⎥ ⎢ 0 a22 0 1
a2 ⎥⎥
⎢ ⎥ ⎢ 2

⎢z⎥ ⎢ 0 0 a33 2 a3
1 ⎥
⎢ ⎥ ⎢1 ⎥
⎣1 ⎦ ⎣ 2 a1
1
2 a2 1
2 a3 −1 ⎦

The separation condition heavily depends on the matricial form expressed in the above
equation [10,11].
Due to the radial symmetry of the surface, an angle-center parametrization can deduced by
expressing the quadric surface in spherical coordinates as:

s quad (ϕ ,θ ; a11 , a22 , a33 , a1 , a2 , a3 ) = rquad (ϕ ,θ ) ⎡sθ cϕ ⎤ , ϕ ∈ [ϕo , ϕi ] (19)


⎢ sθ sϕ ⎥ θ ∈ [θ o , θi ]
⎢ ⎥
⎢⎣ cϕ ⎥⎦
with
−r1 + r12 + 4r2 ⎧ r1 = a1sθ cϕ + a2sθ sϕ + a3cθ
rquad (ϕ ,θ ) = , ⎨ , (20)
2r2 ⎩r2 = a11s θ c ϕ + a22s θ s ϕ + a33c θ
2 2 2 2 2

10
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

where c = cos(.), s = sin(.), rquad is the radial coordinate, φ and θ are the azimuth and zenith
angular coordinates. If rquad = 1 for all the angular domain, we obtain the unit sphere. Note
that Eq. 19 is a parametric equation that is valid for all quadric surface family members listed
in Table 2. This is extremely important in terms of computational implementation of the
visualization of the contact surfaces since only one expression represents all surface members.
Given the implicit representation of the surface in the canonical form (Eq. 15), the normal
vector of a quadric surface is the gradient vector of the scalar function F. For surfaces i and j,
the normal vectors are given by:

niP = ∇Fi ( xi , yi , zi ) = ⎡ 2ai ,11 xi + ai ,1 ⎤ , n jQ = ∇Fj ( x j , y j , z j ) = ⎡ 2a j ,11 xi + a j ,1 ⎤ . (21)


⎢ ⎥ ⎢ ⎥
⎢ 2ai ,22 yi + ai ,2 ⎥ ⎢ 2a j ,22 yi + a j ,2 ⎥
⎢ 2a z + a ⎥ ⎢ 2a z + a ⎥
⎣ i ,33 i i ,3 ⎦ ⎣ j ,33 i j ,3 ⎦

The associated Jacobians are deduced by differential calculus:

( n iP ) q G = 2 ⎡ ai ,11 0 0 0 0 0 ⎤ , ( n jQ ) G = 2 ⎡0 0 0 a j ,11 0 0 ⎤. (22)


q
⎢ ⎥ ⎢ ⎥
⎢ 0 ai ,22 0 0 0 0 ⎥ ⎢0 0 0 0 a j ,22 0 ⎥
⎢ 0 0 ai ,33 0 0 0 ⎥⎦ ⎢0 0 0 0 0 a j ,33 ⎥⎦
⎣ ⎣

The auxiliary vector is defined as the signed permutation of the normal vector coordinates,
T
v jQ = ⎡⎣ − n j , z n j , x n j , y ⎤⎦ , (23)

where nj,x, nj,y, and nj,z are the normal vector coordinates in the local surface reference system.
Note that, any other signed permutation that respects the conditions in Eq. 10 and Eq. 11 is a
valid auxiliary. Attention must be made for the possibility of geometric singularities. For
example, Eq. 23 presents a geometric singularity for n = τ[1 -1 1]T, with τ ∈ \ . The Jacobian
matrix of vjQ is given by:

(v )
jQ qG = 2 ⎡0 0 0 0 0 − a j ,33 ⎤ . (24)
⎢ ⎥
⎢0 0 0 a j ,11 0 0 ⎥
⎢0 0 0 0 a 0 ⎥⎦
⎣ j ,22

In order to increase the efficiency of the contact detection algorithm, proximity queries are
usually considered [9]. They consist on simple tests to averiguate if the surfaces are apart for a
given instant of time. When dealing with closed surface quadrics, such as spheres and
ellipsoids, the most commonly used proximity query is the bounding sphere test. Such
technique allows rapid tests for collision detection but are not quite precise, and are often
evaluated to determine if a more detailed testing is required. A bounding sphere, as the name
suggests, is a 3-D sphere that contains all the points of the quadric surface and share the same
centroid. Basically, the test consists on evaluating the inequality between the sum of the semi-
major axis of the quadric surfaces and the distance between their centroids. If the distance is
lesser or equal to the sum of the semi-major axis then a more detailed testing must be

11
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

conducted. An elegant and efficient algorithm for detecting contact between two ellipsoids
was presented by Choi et al. [11]. This algorithm is based on the separation condition of two
ellipsoids, which is a necessary and sufficient condition that states that the characteristic
equation has positive roots if and only if the ellipsoids do not have common interior points
[10].

4.2 Superquadric Surfaces


Superquadrics are a generalization of quadric surfaces with the expoent replaced by an
arbitrary non-negative number. Relatively to quadric surfaces, the expoent consists in the
introduction of a new degree of freedom for geometric modeling. By varying the expoent
value one can create rounded, squared, filleted or pinched shapes. In the particular case of
superellipsoids, since the proposed contact methodology refers to convex objects, the surface
shape is mediated between circular and rectangular shapes.
The implicit surface representation of a superquadric, in the canonical form, is given by the
following expression:
γ1
F ( x, y, z ) = ( a11 x + a22 y
γ2 γ2 γ
)
2 + a33 z γ1 − 1 = 0, (25)

where {a11, a22, a33} are shape coefficients, and γ1 and γ2 are the expoents. Depending on the
signal value of shape coefficients, one can define the family type of the superquadric (Table
3). If γ 1 = γ 2 with γ 1 , γ 2 ∈ {1, 2} then Eq. 25 falls in to a quadric implicit function. Barr [12]
introduced a spherical product operator through which a surface is created given two
parametric curves that lay upon two orthogonal planes. In fact, it is merely a generalization of
the spherical to rectangular coordinate transformation. Basically, γ1 and γ2 are the expoents
the orthogonal curves that lay on yOz and xOy, respectively. The formulas for the dimension
parameters along the x, y, and z directions are given by:
1 1 1
⎛ 1 ⎞ γ2 ⎛ 1 ⎞γ2 ⎛ 1 ⎞ γ1
a = ⎜⎜ ⎟⎟ , b = ⎜⎜ ⎟⎟ , c = ⎜⎜ ⎟⎟ . (26)
⎝ a11 ⎠ ⎝ a22 ⎠ ⎝ a33 ⎠

Superquadric surface type Coefficients


Superellipsoid a11 > 0, a22 > 0, a33 > 0
Superhyperboloid (1 sheet) a11 > 0, a22 > 0, a33 < 0
Superhyperboloid (2 sheets) a11 > 0, a22 < 0, a33 < 0
Table 3: Superquadric family classification according to the coefficient values.

The angle-center parametrization is deduced in the same way as for the quadric surfaces.
This being, the parametric superquadric representation ssuper is given by:

ssuper (ϕ , θ ; a11 , a22 , a33 , γ 1 , γ 2 ) = rsuper (ϕ , θ ) ⎡sθ cϕ ⎤ , ϕ ∈ [ϕo , ϕi ] (27)


⎢ sθ sϕ ⎥ θ ∈ [θ o ,θi ]
⎢ ⎥
⎣⎢ cϕ ⎦⎥
with
1
rsuper (ϕ ,θ ) = , (28)
(s θ ( a c )
1
γ1
11
γ2
ϕ + a22s ϕ ) + a33c θ
γ2 γ1 γ1

12
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

where rsuper is the radial coordinate, φ and θ are the azimuth and zenith angular coordinates.
Note that Eq. 27 is a parametric equation that is valid for all the mentioned superquadric
family members in Table 3.
Barr’s [12] implicit definition of the superquadric surface is composed by a function raised
to γ 1 γ 2 . By twice differentiating Eq. 25, the expoent γ 1 γ 2 − 2 appears in the resulting
expressions. As a consequence, only values of γ 1 ≥ 2γ 2 are permissible, so that non-negative
expoentes are preserved. This deeply hampers the desired geometric representativity and
excludes the particular case of the quadric surfaces. For contact analysis with implicit surfaces,
the superquadric definition proposed by Barr is quite limited, although it is entirely applicable
when considering the parametric version of the geometric constraints. Therefore, an
alternative quadric surface generalization is considered:

F ( x, y, z ) = a11 xγ1 + a22 y γ 2 + a33 z γ 3 − 1 = 0, (29)

where {a11, a22, a33} are shape coefficients, and γ1, γ2, and γ3 are real non-negative expoents.
In any computational implementation involving polynomials with rational expoents, one
must be aware of the numerical evaluation of superquadric equations [16]. The correct order
of evaluation of these exponential terms is ( x 2 ) , with γ = 2/ε, to assure that the result is not

a complex number when x < 0. In order to prevent divisions by zero, the expoent must be
greater or equal to zero. The values of γ1, γ2, and γ3 are normally bounded between 2 and
infinity so that only convex shapes, with no geometric singularities, are modeled.
The normal vector to a superquadric surface is also given by the gradient vector and the
Jacobian matrices are obtained in the same fashion:
(30)
⎡ 2 ε −1 ⎤
1
⎡ 2 ε −1 ⎤
1
niP = ∇Fi ( xi , yi , zi ) = ⎢ ai ,11γ i ,1 xi ( xi ) i ,1 ⎥ , n jQ = ∇Fj ( x j , y j , z j ) = ⎢ a j ,11γ j ,1 x j ( x j ) j ,1 ⎥ ,
⎢ 1 ⎥ ⎢ 1 ⎥
⎢ a γ y ( y 2 ) ε i ,2 −1 ⎥ ⎢ a γ y ( y 2 ) ε j ,2 −1 ⎥
⎢ i ,22 i ,2 i i ⎥ ⎢ j ,22 j ,2 j j ⎥
⎢ 1 ⎥ ⎢ 1 ⎥
⎢⎣ ai ,33γ i ,3 zi ( zi ) ε i ,3 ⎥⎦ ⎢⎣ a j ,33γ j ,3 z j ( z j ) ε j ,3 ⎥⎦
2 −1 2 −1

(31)
⎡ 1

= ⎢ ai ,11γ i ,1 ( γ i ,1 − 1) ( xi 2 ) ε i ,1
−1
( niP )q G 0 0 0 0 0⎥ ,
⎢ 1 ⎥
⎢ 0 ai ,22γ i ,2 ( γ i ,2 − 1) ( yi ) i ,2
2 ε −1
0 0 0 0⎥
⎢ ⎥
⎢ 1 ⎥
ai ,33γ i ,3 ( γ i ,3 − 1) ( zi 2 ) ε i ,3 0 0 0 ⎥⎦
−1
⎢⎣ 0 0

⎡ 1

(n ) = ⎢0 0 0 a j ,11γ j ,1 ( γ j ,1 − 1) ( x j 2 ) ε j ,1
−1
jQ qG 0 0 ⎥.
⎢ 1 ⎥
⎢0 0 0 0 a j ,22γ j ,2 ( γ j ,2 − 1) ( y j ) j ,2
2 ε −1
0 ⎥
⎢ ⎥
⎢ 1 ⎥
a j ,33γ j ,3 ( γ j ,3 − 1) ( z j 2 ) ε j ,3 ⎥⎦
−1
⎢⎣0 0 0 0 0

13
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

The problem in generalizing the proposed contact methodology to superquadrics is that


they lead to polynomial equations with fractional expoents, which are very difficult to solve
numerically. When two local surface coordinates are close to zero, the Jacobian matrices in
Eq. 31 become ill-conditioned which can potentially jeoperdize the non-singularity of the
Jacobian matrix of geometric contraints (Eq. 12). Unfortunatly, an elegant proximity query,
such as the separation condition for ellipsoids, is not, to our knowledge, available. Bounding
spheres are the only proximity query here considered.

4.3 Fitting superquadric surfaces to a set of points


To apply the proposed contact methodology for mechanical systems with freeform surfaces,
superquadrics need to be fitted in the neighbourhood of the points of contact. Notice that for
complex objects, a decomposition into sub-objects is necessary for effective superquadric
approximation [9]. Superquadric fitting consists on determining the geometric coefficients of
the surface that minimizes the Euclidean distances between the modeled shape and each point
of the data set. After selecting an appropriate superquadric implicit function to model the
point data, the problem of approximating the 3-D object reduces to the least square
minimization of the non-linear algebraic function over the space of parameters of the function.
The approximation procedure relies on the minimization of an error-of-fit function which has
the general form:
N
LMS = ∑ ( F ( xk , yk , zk ) − 1) ,
2
(32)
k =1

where N is the number of points and F the superquadric implicit function.


The Levenberg–Marquardt algorithm [13,14] is a robust approximation method,
commonly used for surface fitting, that confers a numerical solution to the problem of
minimizing a non-linear function. Being an iterative procedure, it is necessary to provide an
initial guess for the surface parameters. For highly non-linear error-of-fit functions, the
algorithm converges only if the initial guess is close to the final solution.

5 CONTACT FORCE MODELS


The computational simulation of the contact phenomenon is strongly dependent on the
reactive force model used to represent the interaction between the system components and its
environment. Together with the systems dynamical response, the contact force model must
consider the material and geometric properties of the colliding bodies, and account for some
level of energy dissipation. These characteristics are ensured with a continuous contact force
model, in which the deformation and contact forces are considered to be continuous functions
during the complete period of contact. The response of the dynamic system is obtained by
simply including updated forces into the equations of motion. The contact force models can
include elastic, viscous, and friction force components. Friction will not be considered in this
work.
The Hunt-Crossley contact force model extended Hertz contact law, which is purely elastic,
as a non-linear function of the penetration that includes energy loss due to internal damping,
in which the histeresis damping factor expresses the energy dissipated during an impact.
According to Hunt and Crossley [5], the contact normal force is given by the sum of the
elastic and damping forces:

FN = K δ n + λδ nδ (33)

14
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

where K is the generalized stiffness parameter, δ is the (pseudo-)penetration value that is


equal to calculated minimum Euclidean distance d, δ is the relative normal penetration
velocity, and λ the histeresis damping factor. The expoent n is close to unity and depends on
the contacting surface geometries. The generalized stiffness depends on the material
properties (Poisson ratio and the Young modulus) and on the geometry of the contacting
bodies. As shown in Eq. 33, damping also depends on the penetration. This assures that the
contact forces present no discontinuity at zero valued penetration. The model proposed by
Lankarani and Nikravesh is a particular case of the one proposed by Hunt and Crossley. On
the other hand, the coefficient of restituition depends on the energy dissipated during impact
and, consequently, also relates to the coefficient of damping [15]. This being, Lankarani and
Nikravesh established, for central direct contacts with no friction, the following expressions
for coefficient of restituition e and relative initial impact velocity δ0 :

2λ 
e = 1− δ0 (34)
3K

The force expressed by Eq. 33, when drawn versus penetration, results in a hysteresis loop
as shown in Fig. 2. The area of the hysteresis loop is equal to the energy loss due to the
internal damping of the material. The hysteresis damping function assumes that the loss in
energy during impact is due to the material damping of t he colliding bodies, which dissipates
energy in the form of heat.

Figure 2: Hunt and Crossley contact force model.

The occurrence of surface overlap is the basis to evaluate the local deformation of the
contacting bodies. Then, a constitutive contact law, such as the continuous contact force
model proposed by Hunt and Crossley or by Lankarani and Nikravesh can be applied to
evaluate the contact force developed in the direction perpendicular to the plane of collision.
Within the contact region, the surface deformation and resulting contact stresses are
approximated by a function of the proximity (i.e., the overlap) of the originally undeformed
surfaces.

6 CONTACT DETECTION ALGORITHM


Within the framework of multibody dynamics, the contact detection algorithm takes the
bodies positions and orientations calculated from the equations of motion, and returns the

15
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

location of the pair of contact points together with the contact forces. The algorithm consists
on the following steps:

(i) Establish the time interval [t0, tend] for the analysis;
(ii) At time step t0, establish the initial conditions for the position vector,
q 0 = q(t0 ), velocity vector, q 0 = q (t0 ) , and contact candidate pair of points qG0 = qG (t0 );
(iii) Evaluate the proximity queries; if the surfaces are sufficiently close then go to (iv),
otherwise go to (vii);
(iv) Run the Newton-Raphson method with analytical Jacobians to obtain the vector of the
contact points qG;
(v) Compute the signed distance magnitude d and check for contact; if there is contact,
evaluate contact forces; if not go to step (vii);
(vi) Add the contact forces to the vector of applied forces g;
(vii) Solve the equations of motion deduced from the multibody dynamics formulation in
order to obtain the body positions and orientations for the new time step t + Δt ;
(viii) Update the system time variable t and use the vector qG obtained in (iii) as the initial
guess for the Newton-Raphson method;
(ix) Go to step (iii) and proceed with the whole process for the new time step;
(x) Exit the main algorithm’s loop when the final time step is reached.

Note that the contact detection algorithm is ran n times for each time step, where n is the
number of rigid contact pairs within the multibody system. Fig. 3 shows the flowchart of the
contact methodology. The numerical implementation of this methodology leads to an efficient
algorithm since the information of the previous time step is used as an initial guess to find the
solution of the non-linear equations and, therefore, only a few iterations are required to obtain
the solution.

Figure 3: Flowchart of the proposed contact detection algortithm.

7 RESULTS
The results here presented refer to the distance computation between a contact pair
represented as ellipsoidal (quadric) surfaces as depicted in Fig. 4(A). No proximity queries or

16
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

multibody dynamics calculations are undertaken in order to evaluate the distance computation
efficiency during the analysis. The contact analysis is performed for a time interval of 200
timesteps with a tolerance of 10-6 for the Newton-Raphson accuracy. Both surfaces are
initially aligned with the global coordinate system axes, and the centroids of surface i and j
are positioned at the origin and at [0 4 0]T, respectively. The prescribed motion induced upon
surface i and j are a 360º rotation along the X axis and along the vector [1 1 1]T, respectively,
as represented in Fig. 4(B). The initial approximation, qG(t0), consisted on the half distance
between the centroids. For the remaning timesteps, the Newton-Raphson approximations are
the resulting vector from the previous timestep, qG(t). The analysis evaluation took 0.9960
seconds, corresponding to a total of 987 Newton-Raphson iterations required for the 200
timesteps, without diverging. Approximately 5 iterations per timestep are necessary to solve
the non-linear system of equations (Eq. 7). Fig. 5(A) and Fig. 5(B) show the influence of the
initial approximation of the Newton-Raphson method in which the initial points for t = 0 did
not lie on the surfaces. Both plots show that the residual error follows, approximately, a
quadratic convergence. When the approximation is closer to the solution, a supra-quadratic
convergence is noticed. A test was performed for distance computation between a contact
pair of superquadrics which failed when the coordinates were close to zero. However, for a
contact pair made up by a quadric and a superquadric the method did not fail and presented a
computational behaviour close to the quadric case here presented.

A B

t=0 t = 20 t = 35

t = 50 t = 68 t = 100

Figure 4: (A) Initial configuration of the surface pair. (B) 3D graphics of the contact region and its vinicity in six
different timesteps. (blue surface – i, red surface – j; red vectors – normals, grey vector – auxiliary, blue vector –
tangent, green vector – binormal)
2 0
10 10
A G
Φ1 B G
Φ1
0
10 G G
Φ2 -2
10 Φ2
G G
-2
10 Φ3 Φ3
G G
Φ4 -4
10 Φ4
log10(abs(Φ G))
log10(abs(Φ G))

-4
10 G G
Φ5 Φ5
G G
-6
10 Φ6 -6
10 Φ6

-8
10 -8
10
-10
10
-10
-12
10
10

-14 -12
10 10
1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 1 1.5 2 2.5 3 3.5 4
Iteration Index Iteration Index

Figure 5: (A) Semi-log plot of vector ΦG at t = 0. (B) Semi-log plot of vector ΦG at t = 50.

17
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

8 DISCUSSION
The proposed contact methodology relies on a simple geometric principle and on locus
contraints that are quite intuitive. Consequently, the methodology is easily formulated
according to vector calculus and algebraic and differential geometry.
From a mathematical point of view, quadrics detain a better behaviour than superquadrics
since special treatment is not required for continuity singularities and the issues associated
with rational expoents do not take place (divisions by zero and the appearance of complex
numbers for negative domain values). On the other hand, superquadrics possess a higher
geometric representativity since the varying expoents control the overall curvature of the
surface, contrary to quadrics that have a constant power. Notice that the contact formultion
proposed here is limited to convex surfaces. In fact, if one or both of the surfaces are concave,
multiple solutions can be obtained for the geometric constraint vector. In order to apply the
contact detection metholodoly to concave surfaces, a set of superquadrics can be arranjed to
fit the non-convex surface. Quadrics and superquadrics have a small number of geometric
parameters and approximate a wide class of convex objects.
The auxiliary vector chosen for quadric surfaces provides constant Jacobian matrices and a
geometric singularity. For superquadrics it is necessary to guarantee that the normal vector
and auxiliary vector Jacobians are not ill-conditioned, i.e., with not too many zeros, so that
ΦGqG does not become a singular matrix when a pair of local coordinates are close to zero. As
an alternative, instead of considering the implicit surface definition, the parametric
representation provides normal vector, tangent and, binormal information available
continuosly over the surface, even across edges that are very square.
Contact calculations contribute quite significantly to the computational cost of multibody
dynamics analysis. The evaluation of functions describing the superquadrics involves the
computation of trigonometric and exponential functions, and is thus expensive. Proximity
queries help attenuate the computational burden but for superquadric surfaces an efficient test,
such as the separation condition for ellipsoids, is not yet available. The usage of analytical
Jacobians, besides guaranteeing the geometric accuracy of the result, also contributes to the
computational efficiency, since no matrix estimate is required for each iteration.
All in all, the computational efficieny and robustness are the major advantages of the
present model is that it converges rapidly, allowing simulations to be performed interactively.
Though the computational time is dependent on the initial guess (a limitation inherited from
the Newton-Raphson algorithm) 200 timesteps were completed in less than 1.5 seconds.

9 CONCLUSIONS
In this work, an accurate, efficient, and easily implementable algorithm for minimum
distance computation between quadric and superquadric surfaces is presented. This contact
algorithm does not resort on optimization methods or convex polyhedra geometries, making
use of analytical expressions for the surface vectors and associated Jacobian matrices. A
mathematical artifice was introduced to compute tangent and binormal vectors for implicit
surfaces given the normal vector to a surface. The methodology provides a uniform
framework for distance computation between objects described as arbitrary convex implicit
surfaces but geometric singularities still persist. The speed at which distance computation is
performed enables real-time dynamic simulations.
The proposed contact methodology explores the implicit representation of superquadrics
which relies on algebraic expressions with rational expoents, contrary to the parametric
counterpart which involves trigonometric functions raised to rational expoents, i.e.,

18
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

expressions with higher non-linearity. The limitations of the conventional superquadric


implicit function are addressed, leading to further instigation for alternative surface models,
and to the consideration of the parametric representation for contact analysis with
superquadrics. Despite the aforementioned limitations, quadric and superquadric surfaces are
relatively easy to handle mathematically.
Instead of presenting specific parametric expressions for each (super)quadric surface
member [12], the generic (all quadric members and superellipsoid and superhyperboloid
members) angle-center formulas of the parametrized surfaces given by Eq. 19 and Eq. 17
were deduced and are bestowed for visualization and 3-D modeling purposes.
The terms ‘locus contraint’ and ‘isosurface constraint’ are introduced in contact analysis.
As future works, we aim to extend this approach to conformal (or concave) objects
modeled as unions of convex shapes; to develop a non-collinear vector with no geometric
singularities; and to exploit the contact detection methodology for surfaces with a parametric
representation.

ACKNOWLEDGMENTS
The authors would like to acknowledge the support given by the Fundação para a Ciência
e a Tecnologia (FCT), through projects ProPaFe (PTDC/EMEPME/67687/2006) and
DACHOR (MIT-Pt/BS-HHMS/0042/2008). The first author would like to thank FCT for the
PhD grant SFRH/BD/47750/2008.

REFERENCES
[1] P. Nikravesh, Computer-aided analysis of mechanical systems. Prentice-Hall,
Englewood Cliffs, New Jersey, 1988.
[2] R. Schwertassek, T. Klisch, Two Modelling Problems in Multibody Simulation:
Flexible Bodies and Contact of Bodies, Proceedings of the NATO Advanced Study
Institute on Computational Methods in Mechanisms, Invited Lectures, 1, 283-312,
Varna, Bulgaria, 1997.
[3] J. Pombo, J. Ambrósio, M. Silva, A new wheel-rail contact model for railway dynamics,
Vehicle System Dynamics, 45:2,165-189, 2007.
[4] H. Lankarani and P. Nikravesh, Continuous Contact Force Models for Impact Analysis
in Multibody Systems, Nonlinear Dynamics, 5, 193-207, 1994.
[5] K. Hunt, F. Crossley, Coefficient of Restitution Interpreted as Damping in Vibroimpact,
ASME Jornal of Applied Mechanics, 42, pp. 440–445, 1975.
[6] A. Donev, S. Torquato, F.H. Stillinger, Neighbor List Collision-Driven Molecular
Dynamics Simulation for Nonspherical Hard Particles II: Applications to Ellipses and
Ellipsoids, J. Computational Pysics, 202, pp. 765–793, 2005.
[7] X. Lin and T.-T. Ng, Contact Detection Algorithms for Three-Dimnsional Ellipsoids in
Discrete Element Modelling, International Journal for Numerical and Analytical
Methods in Geomechanics, 19, 653-659, 1995.

19
Daniel S. Lopes, Miguel T. Silva and Jorge A. Ambrósio

[8] S. D. Kwak, L. Blankevoort, G. A. Ateshian, A Mathematical Formulation for 3D


Quasi-Static Multibody Models of Diarthrodial Joints, Computer Methods in
Biomechanics and Biomedical Engineering, 3, 41-64, 2000.
[9] N. Chakraborty, J. Peng, S. Akella, J. Mitchell, Proximity Queries between Convex
Objects: An Interior Point Approach for Implicit Surfaces, In Proceedings of the IEEE
International Conference on Robotics and Automation, 1910-1916, 2006.
[10] W. Wang, J. Wang, M.-S. Kim, An algebraic condition for the separation of two
ellipsoids, Computer Aided Geometric Design, 18, Issue 6, 531-539, 2001.
[11] Y.-K. Choi, J.-W. Chang, W. Wang, M.-S. Kim, G. Elber, Continuous Collision
Detection for Ellipsoids, IEEE Transactions on Visualization and Computer Graphics,
15, nº. 2, 311-325, 2009.
[12] A. H. Barr, Superquadrics and Angle-Preserving Transformations, IEEE Computer
Graphics and Applications, 1, Issue 1, 11-23, 1981.
[13] K. Levenberg, A Method for the Solution of Certain Problems in Least Squares, Quart.
Appl. Math. 2, 164-168, 1944.
[14] D. Marquardt, An Algorithm for Least-Squares Estimation of Nonlinear
Parameters, SIAM J. Appl. Math. 11, 431-441, 1963.
[15] P. Flores, J. Ambrósio, J.C. Pimenta Claro and H.M. Lankarani, Kinematics and
Dynamics of Multibody Systems with Imperfect Joints, Lecture Notes in Applied and
Computational Mechanics, Springer, 34, 2008.
[16] A. Jaklic, A. Leonardis, F. Solina. Segmentation and Recovery of Superquadrics.
Computational imaging and vision, Vol. 20, Kluwer, Dordrecth, 2000.

20

View publication stats

You might also like