[Tutor] simple animation

Ketan Maheshwari kmaheshw at science.uva.nl
Tue Jan 2 22:42:13 CET 2007


Hi All

I want to create a simple animation on a 2D cartesian plane, wherein 
there are 2 identical circles drawn at an arbitrary distance with each 
other.
Now the idea is to move the circles randomly with a fixed step size and 
check the distance between their centers. this uses the formula
d=sqrt((x2-x1)**2+(y2-y1)**2). When this distance becomes same as 
2*radius, the circles are considered to be tangential.
Is it possible to show this scenario as an animation sequence and 
capturing the coordinates of the centers of the circles at each step and 
stopping the iteration when they get tangential.

Thanks.
k.


More information about the Tutor mailing list