I'm having a hard time figuring out how to get an object (a ball in this case) to move in a spiral. I figured the best way to go about this would be to use polar coordinates for x and z, but I can't seem to implement it properly. Any ideas?
Thanks!
from visual import * myuniv = display(range = vector(25,25,25)) theta = 1 r = 2 s = vector(r*cos(theta),2,r*sin(theta)) v = vector(theta,0,theta) a = vector(0,-9.8,0) dt = 0.1 t = 0.0 ball = sphere(pos = s, radius = 0.25, color = color.cyan) while s.y > -100.0: rate(25) theta = theta + 1 s = s+ v*dt v = v + a*dt t = t + dt ball.pos = s ballghost = sphere(pos = s, radius = 0.2)Am I on the right track here? I'm very new to python and coding languages in general.
Thanks!
