scale()
Scales Object in 3D from the Origin
Example





Syntax
Input
Description
Full Example

Description
Last updated
Scales Object in 3D from the Origin






Last updated
scale(x, y, z)def setup():
createCanvas(300,300, WEBGL)
def draw():
background(255, 79, 132)
fill(112, 88, 255)
stroke(176, 235, 51)
strokeWeight(2)
orbitControl()
# draw3DAxes(100, (100, 50, 20))
rotateX(frameCount/2)
rotateZ(frameCount)
sX = 1+0.75*cos(frameCount)
sY = 1+0.25*sin(frameCount)
sZ = 1+0.5*sin(frameCount)
scale(sX, sY, sZ)
torus(75, 15)
# rotateY(-2*frameCount)
cone(30, 30)