-- Laban
Dancer =  class(); dancer = {}
numDancers = 10

for i=1, numDancers do
   dancer[i] = Dancer
end

function Dancer.drawDancer(x,y,size,lhp,rhp)
   --of.pushMatrix()
   of.noFill()
   of.setColor(255,255,245,255)
   of.setLineWidth(size/10)
   of.drawLine(x,y,x,y-size)--neck
   of.drawBezier(x,y,x+lhp,y+0.2*lhp,x-lhp,y-lhp, x-size, y)--Lh
--   of.drawLine(x,y,x-lhp*size,y)--lh
   of.drawLine(x,y,x+size,y-rhp*size)--rh
   of.drawLine(x,y,x,y+size)
   of.drawLine(x,y+size,x+size,y+2*size)--rf
   of.drawLine(x,y+size,x-size,y+2*size)--lf
   of.fill()
   of.setColor(255,0,0,255)
   of.drawEllipse(x,y-size,0.6*size,0.7*size)
   --of.popMatrix()
end

function Dancer.drawDancewLeftHand(x,y,x1,y1,x2,y2)

end


function draw()
   of.fill()
   of.setColor(0,0,0,20)
   of.drawRectangle(0,0,of.getWidth(), of.getHeight())

   for i=1, numDancers do
      dancer[i].drawDancer(of.getWidth()-100*i, 100,30,-2*of.getFrameNum()%30,0)
      --dancer[i].drawDancerLeftHand(of.getWidth()-50*i, 100, 10,0,10,20)--.40*(of.getFrameNum()%40),1,0)--0.03*(of.getFrameNum()))--of.getFrameNum()%100)--math.random(-1,1))
      --dancer[i].drawDancer(of.getWidth()-50*i, 200,20,1,-1)
      --dancer[i].drawDancer(of.getWidth()-50*i, 300,20,1,1)
   end
end
blog comments powered by Disqus