Go to file
Chris Mekelburg 84c1c6cc27 Final Drawing project
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.
2024-10-10 18:12:39 -04:00
__pycache__ update 2 to drawing project 2024-09-28 10:45:27 -04:00
.commit_template Initial commit 2024-08-27 23:08:20 +00:00
README.md Add feedback to README 2024-09-17 10:08:17 -04:00
animation.py update 2 to drawing project 2024-09-28 10:45:27 -04:00
drawing.py Final Drawing project 2024-10-10 18:12:39 -04:00
drawing2.py Final Drawing project 2024-10-10 18:12:39 -04:00
kisspng-electron-configuration-electron-shell-valence-elec-carbon-5b25d50acd2d69.1674249615292060268404.png This is the submission of the readme file for my 2024-09-14 16:33:40 -04:00
orbit_test.py Adding orbit_test 2024-09-25 16:30:27 -04:00
poetry.lock Initial commit 2024-08-27 23:08:20 +00:00
pyproject.toml Initial commit 2024-08-27 23:08:20 +00:00

README.md

(Drawing project)

This is the description of my drawing project, which will be a Bohr model to show how electrons are arranged in an atom.

Description

For my drawing project, I am going to draw a Bohr model which shows how electrons are arranged in an atom. I selected this project because it ties in coding with my work as a chemistry teacher.

This project will require large circles of varying sizes, and dots/filled in circles for the electrons. Once an initial model has been created, I hope to animate the dots (electrons) to move around the rings in a circular path. Another goal I have would be to enter an input about the symbol of the atom and the animation creates the appropriate atom. I think the initial model and the animation are definitely manageable, and while I have some ideas for making the animation work for atoms with different numbers of electrons, based on user input, I think that may be too involved for this particular project. Here is an image of what I intend to make with the electrons in the rings then moving around the circular path.

Bohr model still photo

Planning

I think my project could be best divided into 3 milestones.

The first would be to create the image of a Bohr model for carbon. This would be a still drawing and would resemble the still image submitted above. I imagine this would include various functions including a function for drawing a ring, a function for drawing the electrons, and a function for drawing the nucleus. Iteration can be included because the image will have multiple electrons, which are the same small filled in circle (dot) appearing over and over again. I may need some assistance here in how to draw a filled in circle, but I will check the turtle library first.

The second milestone will be to try to move the electrons using superturtle. I think this may be a bit trickier, but the drawing would still show the Bohr model even if the animation does not work. I plan to use some of the code used on the superturtle information page on the Making with Code website for this part.

The last milestone (which may be more of a long term goal) would be to add an option to input the name of the element and draw the appropriate drawing based on that. I think this would add quite a bit of complexity, so it may be something I would add later if I end up liking the animation. I think this would involve some if/elif/else statements based on user input, which I have a little bit of familiarity with. I would consider the project successful even if I don't reach this milestone becuase I view it more as an extension of the drawing project.

Feedback

Chris, I love this project and I think the milestone makes sense. For drawing filled shapes (and for other drawing features), make sure you check out the documentation for the turtle library.

I actually don't think that making the electrons move will be very challenging--once you have a function to draw a static representation of a ring with electrons in it, you can just call the function from within a rotation of the frame, as shown in the docs:

for frame in animate(frames=30):
    with frame.rotate(0, 90):
        square(100)

Let's meet if you get stuck!