# Center Position for the origin (0,0) center_x=250 center_y=250 # Color of the X & Y line axis_color=black # Thickness of the X & Y Line axis_weight=.5 # Color of X & Y text axis_label_color=black # Show X & Y text axis_label=true # Thickness of the grid lines grid_weight=1 # Color of the grid lines grid_color=lightgray # Number of pixels that make up a single unit of measure pixels_per_unit=50 draw_axis = () -> stroke axis_color, axis_weight # Draw Axis Lines Y moveTo 0 , center_y line 500, 0 # Draw Axis Lines Y moveTo center_x , 0 line 0, 500 draw_grid = () -> # Draw X lines stroke grid_color, grid_weight for pos in [ center_y-pixels_per_unit .. 0 ] by -pixels_per_unit moveTo 0 , pos line 500, 0 for pos in [ center_y+pixels_per_unit .. 500 ] by pixels_per_unit moveTo 0 , pos line 500, 0 for pos in [ center_x-pixels_per_unit .. 0 ] by -pixels_per_unit moveTo pos , 0 line 0, 500 for pos in [ center_x+pixels_per_unit .. 500 ] by pixels_per_unit moveTo pos , 0 line 0, 500 draw_labels = () -> color axis_label_color bold true font 15 moveTo center_x , center_y move (500-center_x)-7 , -3 text "X" moveTo center_x , 0 move 7, 15 text "Y" draw_plane = -> draw_grid() draw_axis() draw_labels() moveTo 0 , 0 draw_plane()