ellipsoid()

Ellipsoid - Draws an ellipsoid/deformed sphere in 3D s[ace

Example

Syntax

ellipsoid([radiusx], [radiusy], [radiusz], [detailX], [detailY])
ParameterDescription

radiusX

radius of the ellipsoid in the x-direction

radiusY

radius of the ellipsoid in the y-direction

radiusZ

radius of the ellipsoid in the z-direction

Example Full Code
def setup():
  createCanvas(300,300, WEBGL)

def draw():
  background(255, 79, 132)
  orbitControl()
  stroke(176, 235, 51)
  fill(112, 88, 255)
  strokeWeight(2)

  r = frameCount
  rotateX(r)
  rotateY(-r)
  rotateZ(r)
  ellipsoid(50, 75, 50)

Description

draws a UV deformed sphere with a specified radius.

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