It looks like you're using an Ad Blocker.

Please white-list or disable in your ad-blocking tool.

Thank you.


Some features of ATS will be disabled while you continue to use an ad-blocker.


A somewhat basic math question but probably confusing

page: 1

log in


posted on Jun, 4 2020 @ 03:35 AM

When I was younger, I wrote a very simple flight combat game on the Commodore 64.

The plane could only fly in 8 directions UP (-40), Down (+40), Left (-1), Right (+1), and the four diagonals (-39, -41, +39, +41)

Those numbers represent the flight path since the system had a 40x25 text screen.

Anyway, when your plane would fire at an enemy aircraft, instead of showing the artillery on screen and checking to see if it collided with the enemy, I made an immediate calculation on if it would would be a direct hit or not.

I would take the text location of your plane, subtract that from the text location of the enemy plane, and then divided this by your plane's current direction.

Since I no longer have the game, I'll use the follow screen to show this example.

Imagine the "R" being your plane, and it's currently heading UP+RIGHT (-39) on the text screen.

The enemy plane is "*" that is also circled in red.

The "R" is at text location 1224.

The "*" is at text location 1068.

If I subtract the difference between these two and divide that with the plane's current direction (-39), the result would be (an absolute) 4 in this scenario.

4 text locations from where the plane is heading at the time you fired.

Whenever I did that calculation and the result was a perfect integer, this would be a direct hit at the time you fired.

Left (-1) and Right (+1) directions would always yield such a result so I put a limit on distance, something like the number couldn't be above 12 or so.

Anyway, all of that was done in a virtual 2D world.

My question is could such a formula also somehow apply to real life, 3D environments.

Say you have the exact known geo location of System A, whether by land or air, and also it's exact angle or mathematical direction.

Say you also have Target B's known geo location.

If you subtract these locations between the two of them and then divide that with System A's direction or aim, and the result is a positive integer, could that mean System A's site is directly looking at Target B?

I really wanted to post this in "Ask a Physicist" thread, but it seems that has been locked so no more further replies are available anymore.

Sorry for the very long winded question.

I am, however, very excited for any possible nerdy responses on this.

Thanks ahead.

posted on Jun, 4 2020 @ 05:29 AM
link absolutely lovely...tis been done before and refined on a Tactical Level.

posted on Jun, 4 2020 @ 05:42 AM
a reply to: Steffer
Your definition of simple and mine are not compatible .

posted on Jun, 4 2020 @ 07:24 AM
In real world environments you also account for gravity and wind speed and the velocity of the projectile as well as earth rotation and relative humidity.

a reply to: Steffer

edit on 4-6-2020 by Athetos because: (no reason given)

posted on Jun, 4 2020 @ 07:27 AM
using an array would be faster and easier to manipulate locations
just sayin..

posted on Jun, 4 2020 @ 07:55 AM

originally posted by: Athetos
In real world environments you also account for gravity and wind speed and the velocity of the projectile as well as earth rotation and relative humidity.

a reply to: Steffer

Then maybe he could just call it "deep space combat."

Or assume that the motions of the aircraft take all of those things you mentioned into account -- i.e., if I tell my real-world aircraft autopilot that I wanted to move in a straight line in a specific direction, the autopilot would do what it needed to do (making the micro adjustments necessary due to external forces) to move me in the intended direction.

edit on 6/4/2020 by Soylent Green Is People because: (no reason given)

posted on Jun, 4 2020 @ 10:09 AM
Think in a 3d environment you'd need at least 5 variables, X,Y,Z to store its physical position in the world and then X1&Y1 to store the angle of where you are looking at as 2 360 degree values.

Should be simple 3d graphical gemoetry calculations from what little of the reading of graphics back at uni i remember but probably would involve a lot of matrix calculations (seemed like everything doing 3d did).

Theres bound to be a geometry library of functions that will do all of this written in most languages.

posted on Jun, 4 2020 @ 01:59 PM
a reply to: Steffer

To get this to work in the real world, you'd have to be able to compensate for changes in direction and velocity of the 'plane. Since some of those are unknowns, you'd be more likely to get a 'hit' if you created a probability cloud of the plane's future location, at the expected duration of travel, and go for the center of that. The rest's just vectors and calculus.

The answer wouldn't be simple math.

edit on 4/6/2020 by chr0naut because: (no reason given)

posted on Jun, 4 2020 @ 02:24 PM
a reply to: Steffer

Yes, this is a subset of Vector Mathematics.

In this case, you are looking for something called the 'Dot Product'.

The dotproduct creates a single value that can be used to describe the relation between two lines.

As an example, if you have a plane at (0,0,0) in 3D space, and it is moving 100 units forward and right in motion (100,100,0) as a movement vector. Is this heading towards something at (1200,1200,100) ?

If we normalize these vectors (make them a length of 1 to abuse math), and then take their dot product, we get a value of 0.9983, close but not an intercept.

Now, lets say the target is at (1200,1200,0) instead, which will make the dot product = 1 when normalized.

When comparing normalized spatial vectors using a dot product, their level of parallel is Cosine(NormalizedDotProduct) in terms of degrees.

This is essentially how PLC or PID based missile guidance work.
edit on 4-6-2020 by Nodrak because: (no reason given)

posted on Jun, 4 2020 @ 04:23 PM
a reply to: one4all

We used to play the Milton Bradley version of the game Battleship which was easier to do in 2D.
Ships are bigger and float at more or less the same altitude.
Whale tracking applications might be a little more complicated?

edit on 4-6-2020 by Slichter because: (no reason given)

posted on Jun, 4 2020 @ 05:07 PM
Same idea but on an X, Y, Z axis.

But if you want realism, you would need all of the elements included like velocity, gravity or drop, wind speed and direction and anything else you want to add.

What exactly are you trying to accomplish, on paper, software or in your head? Maybe it'll be easier to explain by going directly to what you're looking for.

posted on Jun, 5 2020 @ 04:08 AM
+1 to all who have responded.

And thank you very kindly, Nodrak, for the mention of Vector Mathematics and Dot Products.

I never heard of these before so I'll do some background reading on these.

As for StallionDuck, I'm not quite sure what my intentions are, just curious if my basic math concept from 35 years ago could be expanded any in a 3 dimensional application.

posted on Jun, 5 2020 @ 10:12 AM
a reply to: Steffer

The real world has infinitely more variables to contend with as others have pointed out.

posted on Jun, 5 2020 @ 01:16 PM
a reply to: andy06shake

Phage explained how the transparent aluminum works, the key to not having a lot of vector analysis of your data is to limit the amount of data reaching your recording sensor.

posted on Jun, 11 2020 @ 04:23 PM
a reply to: Steffer

I'm sure it could. In this case, just add depth.

You could also, for graphics sake, use 2D plots that resemble 3D but really are just 2D.

I think Ultima Online and say... WOW would be something similar.

top topics


log in