User Tools

Site Tools


tutorials:exercises_binary_tree_3d2d

From 3D binary tree to 2D binary tree

Change the default 3d binary tree to a 2d version, growing planar in one plane.

Solution

To remove the 3rd dimension, we just need to remove the RU(90) commands from the original code.

public void run1() [
  A(x) ==> F(x)
    [RU( 30) A(x*0.8)]  // first branch
    [RU(-30) A(x*0.8)]; // second branch
]
tutorials/exercises_binary_tree_3d2d.txt · Last modified: 2025/10/28 17:42 by MH