meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:design_guide_torus [2020/11/28 02:40] Admin |
en:design_guide_torus [2022/04/13 06:56] (current) rozek included "require" statement |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| A three dimensional shape made by revolving a small circle (inner) along the circumference a bigger circle (outer). | A three dimensional shape made by revolving a small circle (inner) along the circumference a bigger circle (outer). | ||
| - | {{ : | + | {{ : |
| // | // | ||
| Line 9: | Line 9: | ||
| A torus is defined as such: | A torus is defined as such: | ||
| * Inner Circle | * Inner Circle | ||
| - | * ri = inner radius | + | * inner radius |
| - | * fni = inner resolution | + | * inner rotation before rotating about the outer circle |
| - | * roti = inner rotation | + | * inner segments |
| * Outer Circle | * Outer Circle | ||
| - | * ro = outer radius | + | * outer radius |
| - | * fno = outer resolution | + | * outer segments |
| - | + | * Rotation | |
| - | //Note: See the start of 3D Primitives for information about the resolution of three dimensional shapes.// | + | |
| + | * outer rotation | ||
| Defaults: | Defaults: | ||
| - | * ri : 1 | + | * innerRadius |
| - | * fni : 16 | + | * innerRotation |
| - | * roti : 0 | + | * innerSegments |
| - | * ro : 4 | + | * outerRadius |
| - | * fno : 32 | + | * outerSegments |
| + | * startAngle : 0 | ||
| + | * outerRotation : PI * 2 | ||
| <code javascript> | <code javascript> | ||
| - | torus() | + | const { torus } = require(' |
| - | torus({ ri: 1.5, ro: 3 }) | + | |
| - | torus({ ri: 0.2 }) | + | |
| - | torus({ fni:4 }) // make inner circle fn = 4 => square | + | const myshape |
| - | torus({ | + | |
| - | torus({ fni: | + | |
| - | torus({ fni:4,fno:5,roti:45 }) | + | |
| </ | </ | ||