Example #1
0
    virtual void onDraw(){ 
        
      getMouse();

      for (auto& i : set.data() ){
          Draw(i);
      }

      initMesh(3,6);


      vector <Point> pnt;

      for (int i = 0; i < poly; ++i ){
        float col = (float)i/poly;
        Draw( initial[i].circle(), col,0,1-col );
       // Draw( initial[i].distA(),0,1,0,.2 );
       // Draw( Ro::dls(initial[i].distB.p,.2),1,1,0,.2 );

        auto p = initial[i].orbit( amt );
        Draw( p, 1,0,0);
        pnt.push_back(p);       
      }
      
      for (int i = 0; i < poly; ++i){
        int next = i < poly - 1 ? i + 1 : 0;
        constraint[i].updateA( pnt[i] );
        constraint[i].updateC( pnt[ next]  );
        Draw( constraint[i](),1,0,0 );
      }

      /*  for (int i = 1; i < numCir-1; ++i){ */
      /*    for (int j = 0; j < poly; ++j){ */
      /*      int idx = i * poly + j; */
      /*      int prev = idx - poly; */ 
      /*      int nprev = prev + 1; */
      /*      constraint[idx].update( constraint[prev](), constraint[prev].c.p, constraint[nprev]() ); */ 

      /*      if (j == 0 ) Draw( constraint[idx](),1,0,0 ); */
      /*    } */
      /* } */
    
      

    
  }