// fork from tw:ina_ani:quadToテスト
// fork from tw:ina_ani:シンプル

!th = 0.03
scale(0.6)
  fig(0)
   !a = 0
   !r2 = 1/cos(th)
   write('moveTo ' + cos(0) + ' ' + sin(0))
   loop(3)
    write('bezierTo' + ' ' + r2*cos(a/3 + th) + ' ' + r2*sin(a/3 + th) + ' ' + r2*cos((a+1)/3-th) + ' ' + r2*sin((a+1)/3-th) + ' ' + cos((a+1)/3) + ' ' + sin((a+1)/3))
    !a = a + 1

  col("black")
   !a = 0
   shift(cos(0),sin(0))
    scale(0.05)
     rect()
   !r2 = 1/cos(th)
   loop(3)
    shift(r2*cos(a/3 + th), r2*sin(a/3 + th))
     scale(0.01)
      col("red")
       rect()
    shift(r2*cos((a+1)/3 - th), r2*sin((a+1)/3 - th))
     scale(0.01)
      col("blue")
       rect()
    shift(cos((a+1)/3), sin((a+1)/3))
     scale(0.01)
      col("green")
       rect()
    !a = a + 1
tw:ina_ani
mce2
1382485539