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_scale [2020/12/01 00:12]
JSCAD Project
en:design_guide_scale [2020/12/08 06:52] (current)
JSCAD Project
Line 1: Line 1:
 ==== Scale ==== ==== Scale ====
  
-Shapes can be scaled by any factor. Shapes are enlarged (increases) or shrunk (diminishes) by a scale factor. The result of scaling is a similar shape (in the geometric sense) to the original.+Shapes can be scaled by any factor, enlarging (increasing) or shrinking (diminishingshapes by the ''factors'' about X, Y, and Z axis. The result of scaling is a similar shape (in the geometric sense) to the original.
  
 //[[https://en.wikipedia.org/wiki/Scaling_(geometry)|Learn about the scaling shapes at Wikipedia.org]]// //[[https://en.wikipedia.org/wiki/Scaling_(geometry)|Learn about the scaling shapes at Wikipedia.org]]//
  
 Defaults: Defaults:
-  * factor : [1.0, 1.0, 1.0]+  * factors : [1.0, 1.0, 1.0]
  
 <code javascript> <code javascript>
-let myshape = sphere({radius: 5}) +const myshape = sphere({radius: 5}) 
-let newshape = scale([1, 2, 3], myshape)+const newshape = scale([2, 4, 6], myshape)
 </code> </code>
  
 +In addition, there are simple versions of the same function for scaling about a single axis.
 +
 +<code javascript>
 +const myshape = sphere({radius: 5})
 +let newshape = scaleX(2, myshape)
 +newshape = scaleY(4, newshape)
 +newshape = scaleZ(6, newshape)
 +</code>