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/28 07:09] JSCAD Editor |
en:design_guide_spheroid [2022/04/13 06:51] (current) rozek included "require" statements, corrected mistake |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Spheroid | + | ==== 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 dimenional 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 Sphere === |
| - | The CSG library functions can also be used. //NOTE Deprecated in the V2 API// | + | {{ : |
| + | |||
| + | A three dimensional shape formed by a convex polyhedron consisting of triangles. | ||
| + | |||
| + | The '' | ||
| + | |||
| + | Defaults: | ||
| + | * radius : 1 | ||
| + | * frequency : 6 | ||
| <code javascript> | <code javascript> | ||
| - | CSG.sphere({ | + | const { geodesicSphere } = require(' |
| - | center: [0, 0, 0], | + | |
| - | radius: 2, | + | const myshape = geodesicSphere({radius: 15, frequency: 18}) // frequency should |
| - | resolution: 128 | + | |
| - | }); | + | |
| </ | </ | ||