meta data for this page
  •  
Your (re)login has failed.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:design_guide_torus [2020/11/28 02:43]
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).
  
-{{ :wiki:mathisfun-torus.svg?nolink&20|units:vw | Torus}}+{{ :wiki:mathisfun-torus.svg?nolink | Torus}}
  
 //[[http://www.mathsisfun.com/geometry/torus.html|Learn about torus at MathIsFun.com]]// //[[http://www.mathsisfun.com/geometry/torus.html|Learn about torus at MathIsFun.com]]//
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.//+    start angle of rotation 
 +    * outer rotation
  
 Defaults: Defaults:
-  * ri : 1 +  * innerRadius : 1 
-  * fni 16 +  * innerRotation 0 
-  * roti 0 +  * innerSegments 32 
-  * ro : 4 +  * outerRadius : 4 
-  * fno : 32+  * outerSegments : 32 
 +  * startAngle : 0 
 +  * outerRotation : PI * 2
  
 <code javascript> <code javascript>
-torus()  +const { torus } = require('@jscad/modeling').primitives
-torus({ ri: 1.5, ro: 3 }) +
-torus({ ri: 0.2 })+
  
-torus({ fni:4 })           // make inner circle fn 4 => square +const myshape = torus({innerRadius10outerRadius100})
-torus({ fni:4,roti:45 })   // rotate inner circle, so flat is top/bottom +
-torus({ fni:4,fno:4,roti:45 }) +
-torus({ fni:4,fno:5,roti:45 })+
 </code> </code>