# math: sline lope

Printable View

• 09-30-2003
Nor
math: line slope
i need to draw an imaginary line in a 3D world using the slope
method. (terminology is off. been a few years since math class)

if i remember right its the difference of x over the difference of y.
(X1 - X2 ) / (y1 -y2) used to calculate any point on a straight line.

in short im trying to find a way to use this in a 3d world for collision detection(GuNs – path of the bullets/projectiles).
any links would be a big help.
thx
• 09-30-2003
JaWiB
Quote:

if i remember right its the difference of x over the difference of y.
(X1 - X2 ) / (y1 -y2) used to calculate any point on a straight line.
its y's over x's

(y2-y1)/(x2-x1)

at least thats how ive been doing it on all my homework hehe...
• 09-30-2003
revelation437
y2-y1/x2-x1
thats the slope formula
• 09-30-2003
Thantos
Quote:

y2-y1/x2-x1
(y2 - y1) / (x2 - x1)
is more accurate. Remember the order of operations :)
• 10-01-2003
revelation437
....
• 10-01-2003
frenchfry164
Code:

``` ∆Y ----  ∆X```
• 10-01-2003
Nor
what is ∆ ?
• 10-01-2003
XSquared
∆ means delta. Delta means difference. Therefore, ∆y means difference in y.
• 10-01-2003
Nor
anyone know where i can squeeze 'z' into this equation?
googles doesnt have much on the subject

http://www.univie.ac.at/future.media...om1/geom1.html
is the only place that has what i want but they dont show the math
• 10-02-2003
Sayeh
If you're working in 3D, you need to be using a plane equation, not just slope intercept.
• 10-08-2003
Silvercord
so does an equivalent of 'slope' exist for 3d? I kind of thought it would be:
deltaz/(deltay/deltax)

but it seems pretty much useless anyway, if it exists.