from pysketcher import * L = 8.0 H = 1.0 xpos = 2.0 ypos = 3.0 drawing_tool.set_coordinate_system(xmin=0, xmax=xpos+1.2*L, ymin=0, ymax=ypos+5*H, axis=True) drawing_tool.set_linecolor('blue') drawing_tool.set_grid(True) drawing_tool.set_fontsize(22) P0 = point(xpos,ypos) main = Rectangle(P0, L, H) h = L/16 # size of support, clamped wall etc support = SimplySupportedBeam(P0, h) clamped = Rectangle(P0 + point(L, 0) - point(0,2*h), h, 6*h).set_filled_curves(pattern='/') F_pt = point(P0[0]+L/2, P0[1]+H) force = Force(F_pt + point(0,2*H), F_pt, '$F$').set_linewidth(3) L_dim = Distance_wText((xpos,P0[1]-3*h), (xpos+L,P0[1]-3*h), '$L$') beam = Composition({'main': main, 'simply supported end': support, 'clamped end': clamped, 'force': force, 'L': L_dim}) beam.draw() beam.draw_dimensions() drawing_tool.display() #test_Dashpot(xpos+2*W) raw_input()