How do you find the slope of a 3D line?
Members - Reputation: 169
Posted 05 March 2002 - 08:48 AM
so if you have two points, p1 and p2,
offset along x-z plane: sqrt((p2z - p1z)^2 + (p2x - p1x)^2)
slope = (p2y - p1y) / offset
Is that right? Anyone? I don't want to send anyone off a cliff here...
Edited by - Waverider on March 5, 2002 3:49:42 PM
Posted 05 March 2002 - 08:56 AM
the start point would be (1,2,3) (that is, the constant numbers in the equations). the direction vector, or "slope", would be <5,2,3> (the coefficients of t). If you don''t know this stuff, i suggest you pick up a good math book, actually calc books generally have these basics, but others (geom?) may have more in depth basic stuff.
Moderators - Reputation: 1411
Posted 05 March 2002 - 09:01 AM
Moderators - Reputation: 1365
Posted 05 March 2002 - 09:05 AM
The parameteric equations based on "t" for which AP gives examples are in my opinion the right way to represent 3D lines. If you take those 3 equations:
and yank out the coefficients of t, and put them in a vector:
then that vector points in the direction of the line. The offset coefficients just represent a coordinate on the line when t = 0. So its really analogous to the 2D "slope" except that you''re using this parameter value t instead of a coordinate x in the equation.
Applied Research Associates, Inc.