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_spheroid [2020/11/29 05:15] JSCAD Editor |
en:design_guide_spheroid [2022/04/13 06:51] (current) rozek included "require" statements, corrected mistake |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Ellipsoid ==== | ==== Ellipsoid ==== | ||
| + | |||
| + | A three dimensional surface that has three pairwise perpendicular axes of symmetry which intersect at a center. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The '' | ||
| + | |||
| + | Defaults: | ||
| + | * radius : [1, 1, 1] | ||
| + | * center : [0, 0, 0] | ||
| + | * segments : 32 | ||
| + | |||
| + | <code javascript> | ||
| + | const { ellipsoid } = require(' | ||
| + | |||
| + | const myshape = ellipsoid({radius: | ||
| + | const myshape = ellipsoid({radius: | ||
| + | </ | ||
| + | |||
| + | === Sphere === | ||
| 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 }} |
| // | // | ||
| - | Creates a sphere at the requested center. | + | The '' |
| - | + | ||
| - | //Note: See the start of 3D Primitives for information about the resolution of three dimensional shapes.// | + | |
| Defaults: | Defaults: | ||
| - | * radius : 1 or [1,1,1] | + | * radius : 1 |
| - | * center : [0,0,0] | + | * center : [0, 0, 0] |
| - | * resolution | + | * segments |
| <code javascript> | <code javascript> | ||
| - | sphere(1); | + | const { sphere |
| - | sphere({r: 2}); // Note: center:true is default (unlike other primitives, as OpenSCAD) | + | |
| - | sphere({r: 2, center: true}); // Note: OpenSCAD doesn' | + | const myshape = sphere({radius: 3.5}) |
| - | sphere({r: 2, center: [false, false, true]}); // individual axis center | + | const myshape = sphere({radius: 3.5, center: [5, 5, 5], segments: 64}) |
| - | sphere({r: 10, fn: 100 }); | + | |
| - | sphere({r: 10, fn: 100, type: ' | + | |
| </ | </ | ||
| - | In case of ``type: 'geodesic'`` the fn tries to match the non-geodesic fn, yet, actually changes in steps of 6 (e.g. fn=6..11 is the same), fn = 1 reveals the base form: the icosahedron. | + | === Geodesic Sphere === |
| + | |||
| + | {{ :wiki: | ||
| + | |||
| + | A three dimensional shape formed by a convex polyhedron consisting of triangles. The base form is the icosahedron polyhedron with 20 faces. | ||
| + | |||
| + | The '' | ||
| + | |||
| + | Defaults: | ||
| + | * radius : 1 | ||
| + | * frequency : 6 | ||
| + | |||
| + | <code javascript> | ||
| + | const { geodesicSphere } = require(' | ||
| + | |||
| + | const myshape = geodesicSphere({radius: | ||
| + | </ | ||