def __init__(self, handle): super(PeterActivity, self).__init__(handle) # Build the activity toolbar. toolbox = activity.ActivityToolbox(self) activity_toolbar = toolbox.get_activity_toolbar() activity_toolbar.keep.props.visible = False activity_toolbar.share.props.visible = False toolbox.show() self.set_toolbox(toolbox) # Create the game instance. self.game = Trails.Trails() # Build the Pygame canvas. self._pygamecanvas = \ sugargame.canvas.PygameCanvas(self) # Note that set_canvas implicitly calls # read_file when resuming from the Journal. self.set_canvas(self._pygamecanvas) self.game.canvas=self._pygamecanvas # Start the game running. self._pygamecanvas.run_pygame(self.game.run)
def __init__(self): self.trails = Trails.Trails()
def __init__(self): self.diff1 = Diff.Diff() self.diff2 = Diff.Diff() self.trails = Trails.Trails() self.wrap109 = Wrap109.Wrap109()
cap = cv2.VideoCapture(0) def nothing(x): pass # Create a black image, a window cv2.namedWindow('image') # create trackbars for color change cv2.createTrackbar('low threshold', 'image', 0, 255, nothing) cv2.createTrackbar('high threshold', 'image', 0, 255, nothing) # cv2.createTrackbar('kernel size','image',0,255,nothing) trails = Trails.Trails() trails2 = Trails.Trails() diff = Diff.Diff() wrap = Wrap109.Wrap109() blacklines = Blacklines2.Blacklines2() blackboard = Blackboard3.Blackboard3() paint109 = Paint109.Paint109() # blackboard3 and paint109 are the main modes while (True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
import Trails import Writer import Curves import Noise for ex_method in [Curves.extrude_nn]: trail_map, curve_pts = Trails.gen_trail_map(512, extrude_method=ex_method) Writer.plot(trail_map) Writer.save_trail(trail_map, 65000, "ridges") Writer.save_trees(curve_pts, "ridges") Writer.show() """ img = Noise.GradientNoise(512, 10) cv2.imshow("hi", img) cv2.waitKey(0) """
def __init__(self): self.first = True self.delay = Delay.Delay() self.trails = Trails.Trails()