02_user_tutorials:21_exercices:03_exercises_binary_ternary_tree
From binary to ternary tree
Solution
02_user_tutorials/21_exercices/03_exercises_binary_ternary_tree.txt · Last modified: 2025/12/10 16:22 by gaetan
solution
solution
To achieve this, we need to add another branch and explicitly rotate the branches to (0, 120, and 240) degree.
public void run3() [ A(x) ==> F(x) [RH( 0) RU(45) RH(90) A(x*0.8)] // first branch [RH(120) RU(45) RH(90) A(x*0.8)] // second branch [RH(240) RU(45) RH(90) A(x*0.8)]; // third branch ]