-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55cc2f6
commit f357c1f
Showing
22 changed files
with
1,140 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
graphics/__pycache__ | ||
*.pyc | ||
*.swp | ||
Images/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import graphics.Config as config | ||
from graphics.Graphics import setup, export | ||
from graphics.Geometry import background, color, Circle, stroke | ||
from random import randint | ||
|
||
width = 2000 | ||
height = 2000 | ||
|
||
|
||
def draw(): | ||
background(0.95, 0.95, 0.95, 1.0) | ||
color(0, 0, 0, 0.01) | ||
|
||
for k in range(100): | ||
step = 100 / 4 | ||
for j in range(0, width+100, 100): | ||
for i in range(0, height+100, 100): | ||
r = randint(-4, 4) | ||
offset_x = step / r if r != 0 else 0 | ||
r = randint(-4, 4) | ||
offset_y = step / r if r != 0 else 0 | ||
Circle(i+offset_x, j+offset_y, 10) | ||
stroke() | ||
|
||
|
||
def main(): | ||
# Pass optional overrides | ||
setup(width, height) | ||
draw() | ||
export() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.