Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 1st, 2005, 10:20 PM   #1
splitterdevildoll
Newbie
 
Join Date: Aug 2005
Posts: 12
Rep Power: 0 splitterdevildoll is on a distinguished road
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.
splitterdevildoll is offline   Reply With Quote
Old Aug 2nd, 2005, 12:52 PM   #2
EverLearning
Hobbyist Programmer
 
EverLearning's Avatar
 
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4 EverLearning is on a distinguished road
Quote:
how do I find the new points from the slope?
Might have to elaborate a little more...
__________________
got math? yumm...

"All men by nature desire to know" -Aristotle, Metaphysics
EverLearning is offline   Reply With Quote
Old Aug 2nd, 2005, 1:38 PM   #3
pr0gm3r
Hobbyist Programmer
 
Join Date: Dec 2004
Location: CA
Posts: 102
Rep Power: 4 pr0gm3r is on a distinguished road
Send a message via MSN to pr0gm3r
Talking

Quote:
Originally Posted by splitterdevildoll
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.

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
pr0gm3r is offline   Reply With Quote
Old Aug 2nd, 2005, 4:38 PM   #4
splitterdevildoll
Newbie
 
Join Date: Aug 2005
Posts: 12
Rep Power: 0 splitterdevildoll is on a distinguished road
Thank you
splitterdevildoll is offline   Reply With Quote
Old Aug 2nd, 2005, 7:52 PM   #5
EverLearning
Hobbyist Programmer
 
EverLearning's Avatar
 
Join Date: May 2005
Location: Indiana
Posts: 130
Rep Power: 4 EverLearning is on a distinguished road
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          5
To see whether the point belongs to the line, all one has to do is plug in the coordinates of the point into the Cartesian (has to hold!) or find such r that makes parametric equations true [(x,y,z) would be the coordinates of the point itself]. To find a point on a line, one needs to take r to be some real number and plug it into the parametric equations.

Hope 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
__________________
got math? yumm...

"All men by nature desire to know" -Aristotle, Metaphysics

Last edited by EverLearning; Aug 2nd, 2005 at 8:02 PM.
EverLearning is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:35 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC