Post your own tutorials, guides and demos.

### » Wed May 06, 2009 10:55 pm

uhm. yes it can.

Just calculate the speed at a certain distance from the center using angular speed, then either set the tanks to that speed or reverse the equation to get the angular speed.

Won't synch up all the way along the axis, but if you pick an arc that stays long enough near the tanks the visual effect will be there. Like a tread moved by a cog.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

### » Wed May 06, 2009 11:04 pm

x_ray(t) = y * ctg(w*t)
y = constant vertical distance from center of screen to bottom of screen
w = some constant parameter adjusting constant angular speed
dx_ray(t)/dt = (-y * w) / sin^2(wt)
d2x_ray(t)/dt2 = (2 * w * w * y * cos(wt)) / (sin^3(wt))

-> x_ray(t) is the x position of ray (ray's begin).
-> there's a need to modify x_ray(t) parameters because x,y screen coordinates are really x,-y
-> dx_ray(t)/dt = speed, it's chaning, because...
-> d2x_ray(t)/dt2 = (2 * w * w * y * cos(wt)) / (sin^3(wt)) ... acceleration is not a constant value.

Ergo, x_tank(t) = y * ctg(w*t) to make x_tank in synch with x_ray.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

### » Wed May 06, 2009 11:17 pm

[quote="BROO":3jxj1rla]-> dx_ray(t)/dt = speed, it's chaning, because...
-> d2x_ray(t)/dt2 = (2 * w * w * y * cos(wt)) / (sin^3(wt)) ... acceleration is not a constant value.
[/quote:3jxj1rla]

And if acceleration was constant, speed would still be changing.

But that's besides the point.
I did say it won't synch up forever, but it can be matched to the tangent, which given the large radius will look good enough. Again: Like a tread moved by a cog.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

### » Wed May 06, 2009 11:36 pm

Yeah, I meant "if acceleration is 0".
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Previous