TINKER PiEDESIGN IN INDIA
Intermediate

Night Forest WalkGrow a random forest under the stars and walk through it in VR.

You write a short TinkerPie Python program by following the Code guide in the workspace, then press Run. The sample program and step-by-step guide are always there to help.

What you will learn

  • Random positions
  • Loops that build worlds
  • Exploring a scene in VR

What you need

  • Any laptop, tablet or phone. For VR: a phone and a phone VR viewer (TinkerPie VR viewer or any phone headset)

Steps

  1. Type the program from the Code guide, then press Run.
  2. Drag or turn your phone to look around.
  3. Run it again: the forest is different every time.

How it works

tp.random(a, b) picks a whole number between a and b. Using it for positions makes a new forest every run, the same way games make random levels.

Coding concepts

Random
Different numbers on each run.
Hex colour
"#fff8d0" is a colour written as a code.

Expected output

About 40 trees around you at night, a glowing moon and a "Night Forest" sign.

Challenges

  • Make 100 trees.
  • Add balls as glowing mushrooms.
  • Change it to a snowy forest.

More AR/VR projects

Intermediate20 minAR / VR, Gesture Recognition

AR Air Drawing

Draw glowing lines in the air with your fingertip; open your hand to wipe the picture.

  • Fingertip tracking
  • Drawing with points
  • Pen up / pen down logic
Hardware: Laptop, tablet or phone cameraAI Cube: Virtual Cube only · Virtual Cube: laptop or phone camera
Intermediate15 minAR / VR, Gesture Recognition

AR Magic Hands

Make stars appear on your hands, and hearts when you show a thumbs up.

  • Stickers on hands
  • Gestures that change AR
  • Counting hands
Hardware: Laptop, tablet or phone cameraAI Cube: Virtual Cube only · Virtual Cube: laptop or phone camera
Intermediate20 minAR / VR

Spinning Shape Gallery

Make a row of colourful shapes and spin them for ever with a loop.

  • Lists of objects
  • for loops with range()
  • Animation with small steps
Hardware: Any device; a phone VR viewer for headset modeAI Cube: Virtual Cube only · Virtual Cube: laptop or phone camera