Command Palette

Search for a command to run...

Hectal
Phase 2: Just Enough 3D Math
3D Web · Exercise 2 of 5 PreviousNext
Beginner

Take a quarter metre along a direction

A ray goes from the origin towards the point (3, 4, 0). Add a ball named step that is exactly 0.25 m from the origin along that ray.

Normalise first: the direction must have length 1, or the step would be 5 times too long.

What Check tests

  1. A mesh named step exists
  2. It is at (0.15, 0.2, 0)
  3. It is 0.25 m from the origin

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.