RobWorkProject
24.12.4-
|
Torus defined as an implicit surface. More...
Classes | |
class | ImplicitTorus |
Torus defined as an implicit surface. More... | |
Namespaces | |
rw | |
Deprecated namespace since 16/4-2020 for this class. | |
rw::geometry | |
Loading and storing of CAD models. | |
Torus defined as an implicit surface.
The torus is described as an implicit surface of the form:
\( \left(x^T x + R^2 - r^2 \right)^2 - 4 R^2 x^T \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} x = 0\)
or equivalently:
\( \left(x^T x - R^2 - r^2 \right)^2 - 4 R^2 (r^2 - {x_3}^2) = 0\)
where R is the distance from the center of the torus to the center of the tube, r is the radius of the tube, and \( x \in \mathbb{R}^3\).
Alternatively, a torus with an elliptic tube can be specified. This surface has the more generic form:
\( \left( x^T \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \frac{{r_1}^2}{{r_2}^2} \end{bmatrix} x + R^2 - {r_1}^2 \right)^2 - 4 R^2 x^T \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} x = 0\)
or equivalently:
\( \left( x^T \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & \frac{{r_1}^2}{{r_2}^2} \end{bmatrix} x - R^2 - {r_1}^2 \right)^2 - 4 R^2 \left({r_1}^2 - \frac{{r_1}^2}{{r_2}^2} {x_3}^2 \right) = 0\)
The elliptic torus with elliptic tube has the much more complex form:
\( \left( ({R_2}^2+t){x_1}^2 + ({R_1}^2+t){x_2}^2 - ({R_1}^2+t)({R_2}^2+t) - 4 R_1 R_2 t \right)^2 - 4 t (R_2 {x_1}^2 + R_1 {x_2}^2 - (R_1+R_2)(R_1 R_2 + t))^2 = 0\)
where
\( t = {r_1}^2 (1-\frac{{x_3}^2}{{r_2}^2}) \)
Notice that many functions are not yet implemented for this last type of elliptic torus. These functions might throw an exception.