#! /usr/bin/env python """ atom.py is a program which generates a 3D image of a clasical Lithium atom This is an example use of the visual package. Run the program and rotate the image in 3D. Paul Eugenio PHZ4151C Feb 1, 2019 """ from __future__ import division, print_function from vpython import vector, sphere, color, ring # constructing the Lithium nucleous # # using three red spheres for protons and four blue # spheres for neutrons # sphere(pos=vector(0.1,0.1,0.1), radius=0.1, color=color.blue) sphere(pos=vector(0,0,0.1), radius=0.1,color=color.blue) sphere(pos=vector(0,0.1,0), radius=0.1,color=color.red) sphere(pos=vector(0.1,0,0), radius=0.1,color=color.blue) sphere(pos=vector(0.2,0,0), radius=0.1,color=color.red) sphere(pos=vector(0.2,0,0.2), radius=0.1,color=color.red) sphere(pos=vector(0.2,0,0.1), radius=0.1,color=color.blue) # constructing the electron shell # # electrons are dipicted as yellow rings-orbits about the nucleous ring(axis=vector(1,1,0), color=color.yellow, thickness=0.01, pos=vector(0,0,0)) ring(axis=vector(0,1,1), color=color.yellow, thickness=0.01, pos=vector(0,0,0)) ring(axis=vector(1,1,1), color=color.yellow, thickness=0.01, pos=vector(0,0,0)) # #