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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nu (from partialSurfaceCharacteristic) | Number of points in u-Dimension | |
| Integer | nv (from partialSurfaceCharacteristic) | Number of points in v-Dimension | |
| Boolean | multiColoredSurface (from partialSurfaceCharacteristic) | false | = true: Color is defined for each surface point |
| SI.Length | R | 1 | Major radius (distance from center of torus to center of tube) |
| SI.Length | r | 0.2 | Minor radius (radius of tube) |
| SI.Angle | opening | 0 | Opening angle of torus |
| SI.Angle | startAngle | -Modelica.Constants.pi | Start angle of torus slice |
| SI.Angle | stopAngle | Modelica.Constants.pi | End angle of torus slice |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| 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 |