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_spheroid [2020/11/29 05:48]
JSCAD Editor
en:design_guide_spheroid [2022/04/13 06:51] (current)
rozek included "require" statements, corrected mistake
Line 1: Line 1:
 ==== Ellipsoid ==== ==== Ellipsoid ====
  
-An ellipsoid is a surface that has three pairwise perpendicular axes of symmetry which intersect at a center.+A three dimensional surface that has three pairwise perpendicular axes of symmetry which intersect at a center.
  
-{{ :wiki:mathisfun-ellipsoid.svg?nolink | Sphere }}+{{ :wiki:jscad-ellipsoid.png?nolink | Sphere }}
  
-The 'radius' determines the size of the ellipsoid about the X, Y, and Z axis. Ellipsoids can be created at a requested 'center'. The 'segments' specify the number of segments to create per full rotation.+The ''radius'' determines the size of the ellipsoid about the X, Y, and Z axis. Ellipsoids can be created at a requested ''center''. The ''segments'' specify the number of segments to create per full rotation.
  
 Defaults: Defaults:
Line 13: Line 13:
  
 <code javascript> <code javascript>
-let myshape = ellipsoid({radius: [5, 10, 20]}) +const { ellipsoid } = require('@jscad/modeling').primitives 
-let myshape = ellipsoid({radius: [5, 10, 20], center: [5, 5, 5], segments: 64})+ 
 +const myshape = ellipsoid({radius: [5, 10, 20]}) 
 +const myshape = ellipsoid({radius: [5, 10, 20], center: [5, 5, 5], segments: 64})
 </code> </code>
  
Line 21: Line 23:
 A three dimensional shape like a ball, where every point on the surface is the same distance from the center. A three dimensional shape like a ball, where every point on the surface is the same distance from the center.
  
-{{ :wiki:mathisfun-sphere.svg?nolink | Sphere }}+{{ :wiki:jscad-sphere.png?nolink | Sphere }}
  
 //[[http://www.mathsisfun.com/geometry/sphere.html|Learn about spheres at MathIsFun.com]]// //[[http://www.mathsisfun.com/geometry/sphere.html|Learn about spheres at MathIsFun.com]]//
  
-The 'radius' determines the size of the sphere. Spheres can be created at a requested 'center'. The 'segments' specify the number of segments to create per full rotation.+The ''radius'' determines the size of the sphere. Spheres can be created at a requested ''center''. The ''segments'' specify the number of segments to create per full rotation.
  
 Defaults: Defaults:
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>
  
 === Geodesic Sphere === === Geodesic Sphere ===
 +
 +{{ :wiki:jscad-geodesicSphere.png?nolink | Geodesic Sphere }}
  
 A three dimensional shape formed by a convex polyhedron consisting of triangles. The base form is the icosahedron polyhedron with 20 faces.  A three dimensional shape formed by a convex polyhedron consisting of triangles. The base form is the icosahedron polyhedron with 20 faces. 
  
-The 'radius' determines the size of the sphere. The 'frequency' specifies the division of each face. A frequency of one (1) reveals the base form, icosahedron.+The ''radius'' determines the size of the sphere. The ''frequency'' specifies the division of each face. A frequency of one (1) reveals the base form, icosahedron.
  
 Defaults: Defaults:
Line 48: Line 54:
  
 <code javascript> <code javascript>
-let myshape = geodesicSphere({radius: 15, frequency: 18}) // frequency should be a multiple of 6+const { geodesicSphere } = require('@jscad/modeling').primitives 
 + 
 +const myshape = geodesicSphere({radius: 15, frequency: 18}) // frequency should be a multiple of 6
 </code> </code>