functiontorus

Function defining the surface characteristic of a torus

Extends from Modelica.Mechanics.MultiBody.Interfaces.partialSurfaceCharacteristic (Interface for a function returning surface characteristics).

Information

Function torus computes the X, Y and Z arrays to visualize a torus with model Torus. The left image below shows a torus with R = 0.5 m and r = 0.2 m. The right images below shows the torus with the additional parameter settings:

opening    =   45 degree
startAngle = -135 degree
stopAngle  =  135 degree

Inputs

TypeNameDefaultDescription
Integernu (from partialSurfaceCharacteristic)Number of points in u-Dimension
Integernv (from partialSurfaceCharacteristic)Number of points in v-Dimension
BooleanmultiColoredSurface (from partialSurfaceCharacteristic)false= true: Color is defined for each surface point
SI.LengthR1Major radius (distance from center of torus to center of tube)
SI.Lengthr0.2Minor radius (radius of tube)
SI.Angleopening0Opening angle of torus
SI.AnglestartAngle-Modelica.Constants.piStart angle of torus slice
SI.AnglestopAngleModelica.Constants.piEnd angle of torus slice

Outputs

TypeNameDefaultDescription
SI.Position[nu,nv]X (from partialSurfaceCharacteristic)[nu,nv] positions of points in x-Direction resolved in surface frame
SI.Position[nu,nv]Y (from partialSurfaceCharacteristic)[nu,nv] positions of points in y-Direction resolved in surface frame
SI.Position[nu,nv]Z (from partialSurfaceCharacteristic)[nu,nv] positions of points in z-Direction resolved in surface frame
Real[if multiColoredSurface then nu else 0,if multiColoredSurface then nv else 0,3]C (from partialSurfaceCharacteristic)[nu,nv,3] Color array, defining the color for each surface point