Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## Post a reply

Write your message and submit
|
Options

## Topic review (newest first)

bobbym
2013-02-23 11:01:23

Hi;

I haven't done anything yet so your thanks are premature.

SmellyMan
2013-02-23 07:45:45

#### bobbym wrote:

Hi;

I will work on it and see what can be done. I will post back here if I get anything.

Thank you for your time. If there is anything I can do to repay you in some way, I'll try my best to do so!

bobbym
2013-02-23 07:32:34

Hi;

I will work on it and see what can be done. I will post back here if I get anything.

SmellyMan
2013-02-23 07:23:24

#### bobbym wrote:

When you say how long would you be satisfied with n seconds or do you want an answer like 39 seconds?

n seconds is understandable to me. Basically it's just a matter of figuring out basing on the information we have (radius of the tank shooting range, his movement speed, path length and the direction of his path).
The entry point of when the tank starts shooting is also necessary in this case for us to be able to calculate any more information.

bobbym
2013-02-23 07:19:15

When you say how long would you be satisfied with n seconds or do you want an answer like 39 seconds?

SmellyMan
2013-02-23 07:14:21

#### bobbym wrote:

What do you want to do with that? What question are you asking?

I'm asking when and at what point will one tank start shooting other units. I'm also asking for how long that tank will shoot that unit.

Basically, the starting point of when Tank1 will shoot Tank2, and the ending point of when Tank1 will stop shooting Tank2.

bobbym
2013-02-23 07:08:36

What do you want to do with that? What question are you asking?

SmellyMan
2013-02-23 06:57:44

#### bobbym wrote:

Hi;

You are explaining it fine and this time you are supplying some numbers. Some constraints on the problem that mean simpler formulas rather than dozens of equations with hundreds of variables, none of which we know.

Okay, my question now is what do want to know exactly?

We know the exact position of the tanks, their exact radius, their movement speed, as well as the full length of their paths, as well as their starting and ending points.

bobbym
2013-02-23 06:53:02

Hi;

You are explaining it fine and this time you are supplying some numbers. Some constraints on the problem that mean simpler formulas rather than dozens of equations with hundreds of variables, none of which we know.

Okay, my question now is what do want to know exactly?

SmellyMan
2013-02-23 06:46:32

#### bobbym wrote:

Remember it is the radius squared.

The problem you are now describing is like asking how many cakes can I bake with some eggs. You do not know how many eggs per cake it takes and you do not know how many total eggs you have. The question is incomplete. I need much more information otherwise any answer is possible.

Pardon my ignorance, I thought I've explained it well before, but I guess I haven't.

This game is a turned based strategy sort of, each side has different units. The combat works in a round way. Basically you input your commands, and when the round is over they start moving. In the process of moving to a different point means that a tank will encounter a different tank. If it's in radius, as we calculated, he'll start shooting.

This plane is limited in a 2d space (let's says 1000m by 1000m). A tank has a certain radius of shooting (let's say 20m) and a speed of 100m/s.
Let's pretend I command my tank to move from a point P(100m,100m) to a point P1(100m,500m), meaning he'll travel 400m, taking him 4 seconds to reach that destination. He has a radius of 20m, and if he meets and enemy on that path in those 4 seconds, he'll start shooting at him.

A tank2 is moving from a point P2(200m,500) to a P3(100m,500m) in this example. He has a radius of 50m, meaning he is able to shoot targets that are 50m away from him. He also has a speed of 100m/s. He'll meet the tank1 on his path, and they'll engage in combat, but due to his bigger radius, it means he'll shoot him for longer as he's moving than the tank 1.

Now, I don't know how to approach this problem and see WHEN will tank1 start shooting other units based on his path and his movement speed, and the other problem how long will they stay intersected.
Figuring out the relative speed in this case also wouldn't be a problem, meaning I should be able to deduct for how long their paths would intervene. But as said, the radius is what throws me off, as one tank can have a bigger radius than the other one.

If I wasn't clear enough, I can draw a picture to show you what exactly I mean by that.

bobbym
2013-02-23 06:34:11

Remember it is the radius squared.

The problem you are now describing is like asking how many cakes can I bake with some eggs. You do not know how many eggs per cake it takes and you do not know how many total eggs you have. The question is incomplete. I need much more information otherwise any answer is possible.

SmellyMan
2013-02-23 06:31:15

Yes, thank you, I figured it'd work like this. Basically you're just comparing the distance between the tanks, and if it's equal or less than the radius, it means that the tank 1 will attack the others.

There is however a different problem we're facing now, we've tackled the problem of figuring if they're inside the zone or not, the problem is because the tanks are moving. They're not stationary as portrayed.

As said, they're moving from point A to point B in a 2d limited plane. Both of them have a certain speed and the problem is that we'd like to figure out for how long would the tanks be in the shooting range of each other.

Figuring out if they're parallel, crossing and the angle of crossing isn't a problem. What we're basically looking for, when will the shooting start and for how long will the tank 1 shoot tank 2. Again, they're moving at different speeds and they have different paths with different lengths.

bobbym
2013-02-23 06:23:15

In the drawing below you are the red tank. You are located at (6,1). You have a firing radius of 5. The equation of the circle for your tank is:

There are three enemy tanks they are in blue.

Tank1 is at (10,5) to find out if he is in range you just plug into this inequality,

4^2 + 4^2 is not ≤ to 25 so that tank is out of range as the drawing shows.

Tank2 is at (6,6), plugging in,

0^2 + 5^2 is ≤ to 25 so that tank is in range.

Tank3 is at (9,0), plugging in,

3^3 +(-1)^2 is is ≤ 25 so that tank is in range too as the drawing shows.

SmellyMan
2013-02-23 06:05:20

#### bobbym wrote:

Hi;

Not exactly, I will provide an example that will make all of this clear. Please hold while I draw it up.

I'm sorry for any grief I may have caused. I have one more question, but perhaps it'll be resolved when you draw it, so it'll be more clear to me.
Thank you for your time!

bobbym
2013-02-23 05:55:31

Hi;

Not exactly, I will provide an example that will make all of this clear. Please hold while I draw it up.

## Board footer

Powered by FluxBB