- #1
MathematicalPhysicist
Gold Member
- 4,699
- 371
I thought to write a naive simulation of an inflated ball, I am not sure how to implement this by Vpython.
I mean I want to see it gradually inflating minute by minute.
This is the code I wrote but I don't know how to add to it a timer.
can anyone give me hint as to how to add a timing to this inflation?
Thanks.
I mean I want to see it gradually inflating minute by minute.
This is the code I wrote but I don't know how to add to it a timer.
Code:
from visual import *
ball=sphere(pos=vector(4,7,3),radius=2,color=color.green)
x=1
while x<50:
ball.radius=ball.radius+x
x=x+1
Thanks.