For the complete documentation index, see llms.txt. This page is also available as Markdown.

scale()

Scales Object in 3D from the Origin

Example

Original Shape (Front View)
Original Shape (Side View)
scaling by 1.5 in x-direction
scaling by 0.5 in y-direction
scaling by 3 in z-direction

Syntax

Input
Description

x

scaling factor of edges and faces in the x-direction

y

scaling factor of edges and faces in the y-direction

z

scaling factor of edges and faces in the z-direction

Full Example

Example Full Code

Description

Increases or decreases the size of a shape by expanding or contracting its edges and faces in a specific direction. Objects always scale from their relative origin to the coordinate system. Scale values are specified as decimal percentages. For example, the function call scale(2.0, 1, 1) increases the x dimension of a shape by 200%.

If a negative number was specified, the shape will flip, then scale. For example, scale(-2.0, 1, 1) first flips the shape, then increases the dimensions by 200%.

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!

We'd love to hear your Feedback/Comments here.

Last updated