meta data for this page
  •  

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_star [2020/11/30 04:37]
JSCAD Editor
en:design_guide_star [2022/04/13 07:22] (current)
rozek included "require" statement
Line 1: Line 1:
 ==== Star ==== ==== Star ====
 +
 +{{ :wiki:jscad-star.svg?nolink | Star }}
  
 A two dimensional shape made from straight rays extending from a center. All vertices are the same distance from the center. A two dimensional shape made from straight rays extending from a center. All vertices are the same distance from the center.
Line 6: Line 8:
  
 Defaults: Defaults:
-  * vertices: 5 +  * vertices : 5 
-  * density: 2 +  * density : 2 
-  * outerRadius:+  * outerRadius : 1 
-  * innerRadius:+  * innerRadius : 0 
-  * startAngle: 0 +  * startAngle : 0 
-  * center: [0, 0, 0]+  * center : [0, 0, 0]
  
 <code javascript> <code javascript>
-const myshape = star({vertices: 8, outerRadius: 10})+const { star } = require('@jscad/modeling').primitives 
 + 
 +let star1 = star({vertices: 8, outerRadius: 10}) // star with 8/2 density 
 +let star2 = star({vertices: 12, outerRadius: 40, innerRadius: 20}) // star with given radius
 </code> </code>