# This script demonstrates how to generate arena, and dual zone assets for a petri dish # Dimensions are in mm. Assets can be found as .bmp files in assets directory after running the script # For this script to work you must have first run the calibration script with your black 96-well calibration plate DEFINE SHOWTIME 2 DEFINE DRAWDELAY 0.5 # Geometric definition for plate DEFINE X_OFFSET 67 # moves across horizontal plane DEFINE Y_OFFSET 43 # moves across vertical plane DEFINE COL_STEP 19.304 # Spacing between wells, X DEFINE ROW_STEP 19.304 # Spacing between wells, Y DEFINE RADIUS 44 # Radius of well DEFINE RADIUS_DZ 31.8 # Radius of inner zone (for 50% area, radius/sqrt(2)) # Generate arena and zone files ACTION MAIN INVOKE(G1A,1) # Draw arenas WAIT(SHOWTIME) # Delay for (auto) display of asset SaveDrawing("aPD") # Save result to disk INVOKE(G1DZ,1) # Draw zones (dual) WAIT(SHOWTIME) # Delay for (auto) display of asset SaveDrawing("dzPD") # Save result to disk COMPLETE # Generate arenas ACTION G1A ResetDrawing() # Restore everything to default (ClearDrawing just clears the image) ShapeType(DISC,RADIUS) # Template for arena overlay @200 = 0 # Select arenas mode INVOKE(G1_DRAW,1) # Generate arenas SaveDrawing("TEMP") # Save temporary result to disk to see arenas drawn across on screen WAIT(DRAWDELAY) # Wait time between next arena drawn COMPLETE # Generate dual zones per well ACTION G1DZ ResetDrawing() # Restore everything to default (ClearDrawing just clears the image) ShapeType(DISC,RADIUS) # Shape template radius (well diameter/2) @200 = 1 # Outer zone INVOKE(G1_DRAW,1) # Generate zones ShapeType(DISC,RADIUS_DZ) # Inner zone template (for 50% area, diameter * sqrt(1/8)) @200 = 2 # Select zones mode INVOKE(G1_DRAW,1) # Generate zones COMPLETE # Generate petridish arena. Uses @200 to select between arenas mode (if 0) # and zones mode (in which case the variable contains the zone number). ACTION G1_DRAW @102 = 0 # Row counter @101 = Y_OFFSET # Y position @110 = 1 # Arena while @102 < 1 # While more rows to do... @103 = 0 # Column @100 = X_OFFSET # X Position while @103 < 1 # While more columns to do.... if @200 = 0 # Arena or zones mode? SET(DrawArena,@110) # Arena else SET(DrawZone,@200) # Zone endif ShapeDraw(@100,@101) # Put shape at current position SaveDrawing("TEMP") # Save temporary result to disk to see arenas drawn across on screen WAIT(DRAWDELAY) # Wait time between next arena drawn @100 = @100 + COL_STEP # Update X @103 = @103 + 1 # Update Column @110 = @110 + 1 # Update arena counter endwhile # ...columns @101 = @101 + ROW_STEP # Update Y position @102 = @102 + 1 # Update row number endwhile # ...rows COMPLETE