After a lot of tinkering, I think I was able to get everything working
and the project was done in such a way that elements 20+ could be added
at a later time (without excessive code like before). I think I
learned a lot about functions and iteration in this project and
while the drawing itself is not super complex, I learned a lot about
functions and debugging. I am also happy that this will be something
that I could possibly use in teaching chemistry.
drawing.py can now draw element "Ne" with the rings and nucleus showing.
I did this by miving the ring drawing and nucleus drawing functions into
the animation code block area.
I am going to use the drawing2.py file to work on the new method for
the helper functions to try to rewrite the code in a way that it can be
more easily scaled up.
get the electrons moving and add an input to draw
any element #1-10.
I am wondering if there is a way to not have the
rings NOT disappear when I draw them. I'm not sure
but I think the animation is causing them to
disappear.
I also was curious if it's possible to iterate the
draw_and_move_electrons function in some way.
Basically, I want to repeat the code from the
previous electrons, but traditional iteration does
not work becuase the code needs to be different for
each electron (have an addiitonal line or 2 after
each iteration).
If there's some feedback for these 2 items I can
still make a few changes, otherwise I will consider
this my final submission.
This is my work playing around with trying to set up an opening line to
select an element and also trying to animate the electrons. This is the
work before Chris and I sat down to go over some of the animation, and
I am going to next incorporate the animation from that discussion
into this program. I have a lot of ideas here commented out and will
need to clean up some of the code next as I continue my work.
I was able to draw the rings using iteration and the 6 electrons to show
a carbon atom. I found the turtle documentation to be helpful in finding
some new functions to use such as moving to any spot in the coordinate
plane and drawing the electrons as dots.
For the next steps, I will try to incorporate some iteration for the
drawing of the electrons since it is a repetitive process. I found both
in this project and in the typeface problem set that I sometimes need
to write the code out a few times before trying to add in the iteration.
I then will animate the electrons and hope to be able to incorporate
some type of input that enables my drawing to draw a Bohr model for
different elements based on the user input, which is my longer term
goal.