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_scale [2020/12/01 00:12] JSCAD Project |
en:design_guide_scale [2020/12/08 06:52] JSCAD Project |
||
---|---|---|---|
Line 1: | Line 1: | ||
==== Scale ==== | ==== Scale ==== | ||
- | Shapes can be scaled by any factor. Shapes are enlarged | + | Shapes can be scaled by any factor, enlarging |
// | // | ||
Defaults: | Defaults: | ||
- | * factor | + | * factors |
<code javascript> | <code javascript> | ||
- | let myshape = sphere({radius: | + | const myshape = sphere({radius: |
- | let newshape = scale([1, 2, 3], myshape) | + | const newshape = scale([2, |
</ | </ | ||
+ | In addition, there are simple versions of the same function for scaling about a single axis. | ||
+ | |||
+ | <code javascript> | ||
+ | const myshape = sphere({radius: | ||
+ | let newshape = scaleX(2, myshape) | ||
+ | newshape = scaleY(4, newshape) | ||
+ | newshape = scaleZ(6, newshape) | ||
+ | </ |