particle_template superquadric command
Purpose
Command for defining superquadric particles such as capsules, ellipsoids, tablets or the like (examples).
Warning
GPU support for this command has not been tested and may not work as expected.Syntax
particle_template [general_keywords] shape superquadric keyword value
General particle_template keywords are documented here. This document only describes
the specific keywords for the definition of superquadric particles.
Return to the particle_template documentation.
Keyword |
Description |
|---|---|
obligatory; superquadric semi-axes along x, y and z |
|
obligatory; superquadric blockiness parameters (n1, n2) |
|
scale * |
factor for scaling up or down the semiaxis
default: 1; range: (0,∞); units: [-]
|
scale_axes * |
vector with factors for scaling up or down the semiaxis in x, y and z direction
default: (1,1,1); range: (0,∞); units: [-]
|
* The keywords scale and scale_axes are mutually exclusive.
^ The contact detection algorithm that is employed for superquadrics is stable and accurate for
. For higher blockiness parameters, stability and accuracy is not guaranteed.
Examples
particle_template id mySuperquadric material tablets shape superquadric &
semiaxis (0.05,0.04,0.06) blockiness (3,4)
Description
Superquadric shaped particles can be used to represent various shapes, such as
spheres, (almost) dices, ellipsoids, tablets, etc. The semiaxis keyword defines
the length of the three semi-axis along x, y and z in the used length units
(by default, si), while the blockiness keyword defines the two blockiness
parameters. The superquadric equation is given as follows:

where a, b and c are the semi-axis lengths along x, y and z, while
and
are the blockiness parameters. In the present
implementation, the blockiness parameters must be 2 or larger. A particle with
the parameters
and
represents a sphere,
while higher values of blockiness lead, qualitatively, to “blockier” particles.
The superquadric surface can be also expressed using the following parametric equations:

where
and
.