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
en:design_guide_spheroid [2020/12/08 06:46]
JSCAD Editor
en:design_guide_spheroid [2022/04/13 06:51] (current)
rozek included "require" statements, corrected mistake
Line 13: Line 13:
  
 <code javascript> <code javascript>
 +const { ellipsoid } = require('@jscad/modeling').primitives
 +
 const myshape = ellipsoid({radius: [5, 10, 20]}) const myshape = ellipsoid({radius: [5, 10, 20]})
 const myshape = ellipsoid({radius: [5, 10, 20], center: [5, 5, 5], segments: 64}) const myshape = ellipsoid({radius: [5, 10, 20], center: [5, 5, 5], segments: 64})
Line 33: Line 35:
  
 <code javascript> <code javascript>
 +const { sphere } = require('@jscad/modeling').primitives
 +
 const myshape = sphere({radius: 3.5}) const myshape = sphere({radius: 3.5})
-const myshape = sphere({radius: 3.5}, center: [5, 5, 5], segments: 64)+const myshape = sphere({radius: 3.5, center: [5, 5, 5], segments: 64})
 </code> </code>
  
Line 50: Line 54:
  
 <code javascript> <code javascript>
 +const { geodesicSphere } = require('@jscad/modeling').primitives
 +
 const myshape = geodesicSphere({radius: 15, frequency: 18}) // frequency should be a multiple of 6 const myshape = geodesicSphere({radius: 15, frequency: 18}) // frequency should be a multiple of 6
 </code> </code>