MINIATURE / STUDY / LEVEL 1 OF 5

Three
trees.

Two decisions come before any matrix. First, units: everything on the table is built in real inches, so the classroom table really is 60 × 24 inches, and the miniature's world is the same table seen at twelve times the size. Second, where scale is allowed to live. The scene hangs everything from three branches. The world, holding the floor, table and house, can grow. The body can shrink. The buttons, labels and controller beams never change size, because they must stay usable in both modes. Nothing below those two branch nodes knows that scaling exists.

worldfloor, table, house, in real inches; identity in mode 1, grows ×12 in mode 2
+
stagemy body at full size; shrinks ×1/12 onto the table in mode 1, hidden in mode 2
+
the restmode button, labels, beams, the floor ring: always real size

The room, from beside it

drag to orbit · the grey figure is the real me, which the headset never draws

The scene graph

who holds which matrix right now

world's matrix

stage's matrix

Orange cells are the translation, green cells are zero. In mode 1 the world is the identity and the stage carries the shrink; in mode 2 they swap roles.

Units

miniatureModel.js

The engine works in metres. One constant converts inches, and the table, the spot where the miniature stands, and the house are all written in inches. The scale is a fraction, not a decimal, so 1/12 is exact in the reading even where the float is not.


      

The three branches

miniature.js

The world is built once at full size. The stage gets a body at full size. Everything after that, the ring, the beams, the mode button and the labels, is added straight to model, outside both branches.


      
    

What you should be able to explain

  1. Real units make the brief checkable. The assignment says a 6 ft person's model should reach 6 in above the table. With inches as the unit, that is a single multiplication you can read off this page.
  2. Scale lives in one node per branch. The house never multiplies by 12 and the body never divides by 12. Changing the scale is one constant, and switching modes is two matrices.
  3. A child sees its parent's matrix first. A cube's position on screen is root × world × house × wall. Put a new matrix on world and every wall, door and window moves with it, with no change to their own code.
  4. Some things must not scale. If the mode button were under world, mode 2 would make it twelve times bigger and put it somewhere behind you.

Exercises: ① Set your head height to 1.83 m: how many inches is your model's head above the table, and why is that the same number as your head height in feet? ② Which branch holds the house's lamp, and what happens to its size in mode 2? ③ The floor ring that marks your origin is under model, not world. What would go wrong in mode 2 if it were under world?