#### Archived

This topic is now archived and is closed to further replies.

# Is this the formula for distance from a plane?

This topic is 6133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

TrinaglePos=Tx*Nx+Ty*Ny+Tz*Nz; PointPos=Px*Nx+Py*Ny+Pz*Nz; Distance=sqrt(PointPos-TrianglePos); T is a Triangle vertex. P is the Point in space. N is the Normal. If I'm right, I'm really starting to understand what the Dot Product does. Edited by - WhatEver on January 2, 2002 5:25:41 PM

##### Share on other sites
was easier than typing it out

you weren't too far off

for programming purposes, you probably can't guarentee that |ax+by+cz+d| is positve, and you don't want to call "sqrt()" too many times, so

When coding it, do something like

distance=a*x+b*y+c*z+d;
distance=sqrt(distance*distance/(a*a+b*b+c*c));

Beer - the love catalyst
good ol' homepage

PS - sorry if the image loading is slow. Either my provider or the cable modem is playing up, so it is taking forever to load these images. Should be fixed soon though. Just give it time if it is slow. It is the request that is slowing down, the speed is fine.

Edited by - Dredge-Master on January 5, 2002 12:41:54 PM

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 11
• 13
• 86
• 11
• 10
• ### Forum Statistics

• Total Topics
632972
• Total Posts
3009611
• ### Who's Online (See full list)

There are no registered users currently online

×