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)
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
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
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)
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)
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)
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)
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)