Beispiel #1
0
def test_save_c(filename, r, tablename="data",comments="//-- Figure (ext. degrees)"):
    """Save the figure as a c-table for including into the 
    arduino files"""
    
    #-- Create a box
    a = fig.box(40,20).translate(r.center)
    
    #-- Subdivide into smaller points
    #a = a.divide(5)
    #a.plot(True)
    
    #--- Save the figure as a file
    a.save_c(filename,r,"data","//-- a Box. Resolution 5", ares=0.01)
Beispiel #2
0
def recursive_cube(r):
    rc = []
    for l in range(40,2,-1):
        a=fig.box(l,l).divide(2).translate(r.center)
        r.draw(a, ares=1.0)
        a.plot()
        
        #rc.extend(a.lp)
    #test = fig.Figure(rc) 
    #test = test.divide(2)
    #test.plot()
    #test.save_c("rcube.h",r,"data","//-- Recursive cube")
    return 
Beispiel #3
0
def recursive_cube(r):
    rc = []
    for l in range(40, 2, -1):
        a = fig.box(l, l).divide(2).translate(r.center)
        r.draw(a, ares=1.0)
        a.plot()

        #rc.extend(a.lp)
    #test = fig.Figure(rc)
    #test = test.divide(2)
    #test.plot()
    #test.save_c("rcube.h",r,"data","//-- Recursive cube")
    return
Beispiel #4
0
def test_save_c(filename,
                r,
                tablename="data",
                comments="//-- Figure (ext. degrees)"):
    """Save the figure as a c-table for including into the 
    arduino files"""

    #-- Create a box
    a = fig.box(40, 20).translate(r.center)

    #-- Subdivide into smaller points
    #a = a.divide(5)
    #a.plot(True)

    #--- Save the figure as a file
    a.save_c(filename, r, "data", "//-- a Box. Resolution 5", ares=0.01)
Beispiel #5
0
def test_save_st(filename):
    """Save a figure to the st format. Read it and display to
    test if the save_st method works"""
    
    #-- Create a box
    a = fig.box(40,20).translate(r.center)
    
    #-- Subdivide into smaller points
    a = a.divide(5)
    a.plot()
    
    #--- Save the figure as a file
    a.save_st(filename)
    
    #-- Read the file
    b = fig.fromfile(filename)
    b.plot(True)
Beispiel #6
0
def test_save_st(filename):
    """Save a figure to the st format. Read it and display to
    test if the save_st method works"""

    #-- Create a box
    a = fig.box(40, 20).translate(r.center)

    #-- Subdivide into smaller points
    a = a.divide(5)
    a.plot()

    #--- Save the figure as a file
    a.save_st(filename)

    #-- Read the file
    b = fig.fromfile(filename)
    b.plot(True)
Beispiel #7
0
def cube_test(r):
    """Draw a test cube"""
    a=fig.box(40,25).divide(5.0).translate(r.center)
    r.display_draw(a, ares=5.0, display_points=True)
    r.draw(a,ares=5.0)
Beispiel #8
0
def cube_test(r):
    """Draw a test cube"""
    a = fig.box(40, 25).divide(5.0).translate(r.center)
    r.display_draw(a, ares=5.0, display_points=True)
    r.draw(a, ares=5.0)