小枝の形状

 小枝の形状を定義します。
 //**********************************************************************************
  #local T_x1 = 0; #local T_y1 = 0;
  #local T_x2 = (T_r1+T_r2)*cos(radians(T_a1))+T_x1;
  #local T_y2 = (T_r1+T_r2)*sin(radians(T_a1))+T_y1;
  #local T_x3 = (T_r2+T_r3)*cos(radians(T_a2))+T_x2;
  #local T_y3 = (T_r2+T_r3)*sin(radians(T_a2))+T_y2;
  #local R_z1 = T_a1; #local R_z2 = T_a2; #local R_z3 = T_a3;
  #local Torus_s1 =
  object {
   torus { T_r1,T_w0 sturm rotate -90*x }
   clipped_by { plane { x, 0 } rotate (-90)*z }
   clipped_by { plane { x, 0 } rotate (-90+R_z1)*z }
  translate < T_x1, T_y1, 0 > }
  #local Torus_s2 =
  object {
   torus { T_r2,T_w0 sturm rotate -90*x }
   clipped_by { plane { x, 0 } rotate (90+R_z1)*z }
   clipped_by { plane { x, 0 } rotate (90+R_z2)*z }
  translate < T_x2, T_y2, 0 > }
  #local Torus_s3 =
  object {
   torus { T_r3,T_w0 sturm rotate -90*x }
   clipped_by { plane { x, 0 } rotate (-90+R_z2)*z }
   clipped_by { plane { x, 0 } rotate (-90+R_z3)*z }
  translate < T_x3, T_y3, 0 > }
  #declare Tran_x = T_r3*cos(radians(R_z3)) +T_x3;
  #declare Tran_y = T_r3*sin(radians(R_z3)) +T_y3;
  #declare Twig_seg =
  union {
   object { Torus_s1 }
   object { Torus_s2 }
   object { Torus_s3 }
   cone { < 0, 0, 0 >, T_w0, < 0, T_l0, 0 >, T_w0/2
              rotate R_z3*z translate < Tran_x, Tran_y, 0 > }
  translate < T_r1, Ground_level, 0 > }
  #local Twig_obj = object { Twig_seg texture { T_twig } }
 //**********************************************************************************