diff --git a/puzzle proccessing/screenshot.png b/puzzle proccessing/screenshot.png new file mode 100644 index 0000000..1a1678e Binary files /dev/null and b/puzzle proccessing/screenshot.png differ diff --git a/puzzle proccessing/sketch.properties b/puzzle proccessing/sketch.properties new file mode 100644 index 0000000..2456b0a --- /dev/null +++ b/puzzle proccessing/sketch.properties @@ -0,0 +1,2 @@ +mode=Python +mode.id=jycessing.mode.PythonMode diff --git a/puzzle proccessing/sketch_191210b.pyde b/puzzle proccessing/sketch_191210b.pyde new file mode 100644 index 0000000..099daaf --- /dev/null +++ b/puzzle proccessing/sketch_191210b.pyde @@ -0,0 +1,33 @@ +char_width =20 + +def setup(): + size(400, 400) + +def draw(): + + for i in range(width/char_width): + for j in range (height/char_width): + import random + r= random.randint(0,1) + + draw_slash(r,char_width * i,char_width * j) + + noLoop() + SaveFrame('screenshot.png') +# pip install pyautogui +# import pyautogui + +# pic= pyautogui.screenshot() + +# pic.save('screenshot.png') + + +def draw_slash(fwd_slash,top,left): + if fwd_slash: + line(top,left+char_width/2,top+char_width,left+char_width/2) + else : + line (top+char_width/2,left,top+char_width/2,left+char_width) + + + # draw_slash(1,20,20) + # draw_slash(0,20,20) diff --git a/puzzlefinal .py b/puzzlefinal .py new file mode 100644 index 0000000..2649042 --- /dev/null +++ b/puzzlefinal .py @@ -0,0 +1,26 @@ +char_width =20 + +def setup(): + size(400, 400) + +def draw(): + + for i in range(width/char_width): + for j in range (height/char_width): + import random + r= random.randint(0,1) + + draw_slash(r,char_width * i,char_width * j) + + noLoop() + + +def draw_slash(fwd_slash,top,left): + if fwd_slash: + line(top,left,top+char_width,left+char_width) + else : + line (top+char_width,left,top,left+char_width) + + + # draw_slash(1,20,20) + # draw_slash(0,20,20) \ No newline at end of file