diff --git a/__pycache__/animation.cpython-312.pyc b/__pycache__/animation.cpython-312.pyc new file mode 100644 index 0000000..7f01bba Binary files /dev/null and b/__pycache__/animation.cpython-312.pyc differ diff --git a/animation.py b/animation.py new file mode 100644 index 0000000..d09cdde --- /dev/null +++ b/animation.py @@ -0,0 +1 @@ +name = "Chris" \ No newline at end of file diff --git a/drawing.py b/drawing.py index a84a508..0cb7ef2 100644 --- a/drawing.py +++ b/drawing.py @@ -7,6 +7,9 @@ from turtle import * from argparse import ArgumentParser import turtle +from superturtle.animation import animate +from superturtle.easing import easeInCirc +from animation import name def draw_ring(ring): radius = ring*50 @@ -44,23 +47,62 @@ parser.add_argument("radius", type=int) args = parser.parse_args()''' + + +''' +for frame in animate(frames=50): + with frame.rotate(0, 360): + circle(100) +input()''' + +'''for x in range(500): + for y in range(500): + + for frame in animate(frames=30): + with frame.translate([0, 0], [x,y], easing = easeInCirc): + draw_electron()''' + + +print(name) +choice = input("What is your element?") +elements = ["H", "He", "Li", "Be", "B"] +if choice in elements: + electron_number = elements.index(choice) + 1 + print(electron_number) + +else: + print("error") + + for ring in range(4): #draws rings draw_ring(ring) return_to_center() #returns to center -forward(50) + +for electron in range(1,electron_number+1,1): + if electron < 2: + + #if electron % 2 == 1: + forward(50) + draw_electron() + return_to_center() + if electron ==2: + back(50) + draw_electron() + return_to_center + if electron ==3: + forward(100) + draw_electron() + return_to_center() + if electron ==4: + back(100) + draw_electron() + return_to_center() + +input() +''' draw_electron() -back(100) -draw_electron() -return_to_center() -forward(100) -draw_electron() -back(200) -draw_electron() -return_to_center() + right(90) forward(100) draw_electron() -back(200) -draw_electron() -input() - +back(200)''' \ No newline at end of file