예제 #1
0
 def _map_point( point ):
     line = two_point_line( point, zero_3d )
     for hit in d20.face_hit( line ):
         # print hit[0]
         mapped_point = mappings.map_point( hit[0], hit[1] )
         if mapped_point:
             new_x, new_y = mapped_point
             c.circle( sx(new_x), sy(new_y), 0.5, stroke=0, fill=1  )
예제 #2
0
    def _plot_skeleton():
        th = (s.sqrt(3)/2).evalf()

        c.line( sx(0), sy(2 * th) , sx(0.5), sy(3 * th) )
        c.line( sx(0.5), sy(th) , sx(1.5), sy(3 * th) )
        c.line( sx(1), sy(0) , sx(2.5), sy(3 * th) )
        c.line( sx(2), sy(0) , sx(3.5), sy(3 * th) )
        c.line( sx(3), sy(0) , sx(4.5), sy(3 * th) )
        c.line( sx(4), sy(0) , sx(5), sy(2 * th) )
        c.line( sx(5), sy(0) , sx(5.5), sy(th) )

        c.line( sx(0), sy( 2 * th ), sx(1), sy(0) )        
        c.line( sx(0.5), sy( 3 * th ), sx(2), sy(0) )        
        c.line( sx(1.5), sy( 3 * th ), sx(3), sy(0) )        
        c.line( sx(2.5), sy( 3 * th ), sx(4), sy(0) )        
        c.line( sx(3.5), sy( 3 * th ), sx(5), sy(0) )        
        c.line( sx(4.5), sy( 3 * th ), sx(5.5), sy( th ) )   
        
        c.line( sx(0), sy( 2 * th), sx( 5 ), sy( 2*th ) )     
        c.line( sx(0.5), sy(th), sx( 5.5 ), sy( th ) )