![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 12
Rep Power: 0
![]() |
Slope of an Irregular Surface
Part of my program involves the user entering four 3-d (x,y,z) coordinates from a irregular surface with four corners in order to find the slope of each side; this would straighten out the sides. However, how do I find the new points from the slope? This is a translation problem.
I'd appreciate any comments/suggestions. Thanks. |
|
|
|
|
|
#2 | |
|
Hobbyist Programmer
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#3 | |
|
Hobbyist Programmer
|
Quote:
slope = (y1 - y2) / (x1 - x2) -> slope on the line... but on 3D we have to see where is the point connected to, and then find the slop of the line. (just more complex than 2D) i.e: line AB is located at; A(-3, 3, 0), B(3, 3, 1) slope = (3 - 3) / (- 3 - 3) = 0/-6 is 0 ... the Z axis is just helping to zoom in and zoom out in when the object is render. Just find each slope for each lines. I hope thats help. Please corrected me if I am wrong. Thanks,
__________________
-- pr0gm3r |
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Aug 2005
Posts: 12
Rep Power: 0
![]() |
Thank you
|
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4
![]() |
Lines in 3D are described in parametric equations.
For example: A line AB with A(1,2,3) and B(0,5,8). So the parametric equations are as follows: x = 1 + r*(-1) y = 2 + r*3 z = 3 + r*5 [where values for coefficient of r (or a constant) are obtained by subtracting corresponding vector coordinates, i.e. B - A, constant values (1,2,3) are initial point -- in this case coordinates of A since it is the starting point of a line, equations for BA would be different even though would define the same line in space] or equivalently in Cartesian system: x - 1 y - 2 z - 3
------ = -------- = --------
-1 3 5Hope this helps. ps: slope (or equation) of the line AB defined by A(-3, 3, 0) and B(3, 3, 1) is x = -3 + r*6 y = 3 + r*0 z = 0 + r*1 Last edited by EverLearning; Aug 2nd, 2005 at 8:02 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|