Now Experiment!

You’ve covered a lot in Lesson 1. Here’s what you now know how to do:

The cell below is your sandbox. It starts with a simple scene — a sky, a ground, and one sphere. The rest is up to you.

Ideas to try: - Add more shapes — a box, a cylinder, another sphere - Give each shape a different material or color - Change the sky and ground to match a theme (space, a meadow, a city) - Use set_scale to squash or stretch shapes into something new - Define constants at the top to describe your scene’s “material library”

Open In Jupyter K-12

import scene3d

SKY    = scene3d.Sky.CLOUDS
GROUND = scene3d.Material.Grass.Bright
SPHERE = scene3d.Material.Planets.Earth

scene = scene3d.Scene()
scene.set_sky(SKY)

ground = scene.set_ground(length=20, width=20)
ground.set_material(GROUND)
ground.set_tiling(8)

sphere = scene3d.Shapes.Sphere(diameter=2, segments=32)
sphere.set_material(SPHERE)
sphere.set_position(0, 1, 0)
scene.add(sphere)