tags:

views:

183

answers:

2

Given 2 points A(x1,y1,z1) and B(x2,y2,z2), what is the equation to calculate their angular coefficient?

I wish a quite simple equation like this one:

m = (y2 - y1) / (x2 - x1)

used to calculate the angular coefficient into a cartesian system.

+1  A: 

The term "angular coefficient" doesn't exist in mathematics - You need to be more explicit about exactly what it is you want to find out about these 2 points.

The equation you have descibred for 2D systems is the gradient - the change in Y with respect to the change in X. The equivalent concept in 3 dimensions would be the change in Y with respect to X, and the change in Z with respect to X, i.e. 2 values - the gradient of Y and Z respectively with respect to X:

(y2 - y1) /  (x2 - x1)

and

(z2 - z1) / (x2 - x1)

However I get the impression this isnt what you are after - what is it that you are trying to achieve?

Kragen
Thanks, now I suppose this double solution it will make me the things more complex :P. Sorry if I translated literally the Italian "coefficiente angolare" without checking the right form, anyway you catch it :)
Steel Plume
A: 

According to wikipedia, "coefficiente angolare" is "slope" in English. Maybe you want to know the slope of the line? In any number of dimensions, the definition "rise / run" can still work. In 3D, rise is the Z difference and run is the length of the segment projected onto the Z plane:

m = (z2 - z1) / sqrt( (x2-x1)^2 + (y2-y1)^2 )

Andrew Butts