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_ellipse [2020/12/01 04:04] JSCAD Editor |
en:design_guide_ellipse [2022/04/13 07:19] (current) rozek included "require" statements, corrected mistakes |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Ellipse ==== | ==== Ellipse ==== | ||
| + | |||
| + | {{ : | ||
| A two dimensional shape that surrounds two focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. | A two dimensional shape that surrounds two focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. | ||
| - | The ' | + | The '' |
| Defaults: | Defaults: | ||
| Line 11: | Line 13: | ||
| * endAngle : PI * 2 | * endAngle : PI * 2 | ||
| * segments: 32 | * segments: 32 | ||
| + | |||
| + | <code javascript> | ||
| + | const { ellipse } = require(' | ||
| + | |||
| + | const myshape = ellipse({radius: | ||
| + | const myshape = ellipse({radius: | ||
| + | </ | ||
| === Circle === | === Circle === | ||
| Line 16: | Line 25: | ||
| A two dimensional shape made by drawing a curve that is always the same distance from a center. All points are the same distance from the center. | A two dimensional shape made by drawing a curve that is always the same distance from a center. All points are the same distance from the center. | ||
| - | {{ :wiki:mathisfun_circle.svg?nolink | Circle }} | + | {{ :wiki:jscad-circle.svg?nolink | Circle }} |
| // | // | ||
| - | The radius specifies the size. The resolution option determines | + | The '' |
| Defaults: | Defaults: | ||
| Line 28: | Line 37: | ||
| <code javascript> | <code javascript> | ||
| - | let c1 = circle(1) | + | const { circle |
| - | let c2 = circle({r: 2, fn:5}) // fn = number of segments to approximate the circle | + | |
| - | let c3 = circle({r: 3, center: | + | const myshape |
| + | const myshape | ||
| </ | </ | ||