This was a perfectly good (possibly homework) question
The OP thanked me for my answer
Thanks, you just ended my frustration! – user3225065
and then deleted the question!
I don't think this type of behaviour adds value to the site.
Below is the original text of the question: (since it isn't visible to people with less than 10k reputation)
How do I make a while loop that will plot 12 evenly spaced spheres on a circle of radius 20x10^-10 in the y,z plane.
The actual question is as follows: -Use a while loop to consider N = 12 observation points that lie on a circle of radius 20 A in the y-z plane. One of the points should be on the +y axis. The program should determine the position of the remaining observation points, which are equally spaced around the circle.
-For each observation point, the program should calculate the electric eld and display an arrow to represent the eld. The tail of the arrow should be at the observation point, the length of the arrow should be proportional to the magnitude of the eld, and the direction of the arrow should indicate the direction of the eld. Adjust the scalefactor for the arrows to produce a reasonable graphic display.
******Code******** from __future__ import division, print_function from visual import * #Define constants e = 1.6e-19 ke = 9e9 A2m = 1e-10 scalefactor = 1e-17 xaxis = cylinder(pos=vector(-50,0,0)*A2m, axis=vector(100,0,0)*A2m, radius=.2*A2m) yaxis = cylinder(pos=vector(0,-50,0)*A2m, axis=vector(0,100,0)*A2m, radius=.2*A2m) zaxis = cylinder(pos=vector(0,0,-50)*A2m, axis=vector(0,0,100)*A2m, radius=.2*A2m) rsource=vector (0,0,0) ion = sphere(pos=vector(0,0,0), radius=A2m, color=color.yellow) ion.q = -e #initial values theta=0 robs=vector(0,20*A2m,sin(theta)) #calculations while theta <= 2*pi: rate(5) r = robs - rsource rmag = mag(r) rhat = norm(r) Efield = (ke*ion.q*rhat)/(rmag**2) Earrow= arrow(pos=robs, axis=Efield*scalefactor, color = color.orange) theta = theta + (2*pi)/12