Omitting the third coordinate of a 3d point on projection

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

Recommended Posts

i have a point P in space, and i want to project it on a plane which has the normal N, after getting the point D from the plane equation ax+by+cz = -D . i use the following equation [P = P - ( N dot P + D ) * N] to find the projected point coords. but, the point P has 3 coords. after projecting. so how can i algebraically calculate the point's actual x and y coordinates?

Share on other sites
There's not a simple answer to this as "the point's x and y coordinates" don't exist, or at least they aren't uniquely defined. You first need to choose your x and y axes, that is you need to work out how to map points in the plane to the 2D x-y plane.

The problem is that obvious ways of doing this don't always work. E.g you might choose to make one axis horizontal and the other perpendicular to it (along the slope of the plane). But this does not work when the plane is horizontal as there's more than one horizontal line in the plane.

but once you have your x and y you can use them to transform your 3D point to 2D. Write down unit vectors parallel to the x-axis, y-axis and the normal, and form a matrix with them as columns. This matrix lifts points from 2D into the plane, so the (trivial) inverse of this matrix transforms points fron the plane to 2D - more precisely the inverse generates points with the correct x-y cordinates and with a constant z that you can throw away/need not calculate.

Share on other sites
how will i get the x&y axis, and should i multiply the inverse vector to the point i got from the [P = P - ( N dot P + D ) * N] equation or to the original point ? can u please give me an example??

Share on other sites
It sounds like you are looking for something more than simply projecting a point onto a plane. In addition to the plane, you need an origin and an orientation of the X and Y axes. What it really boils down to is this: you have a coordinate system and you want project a point onto its XY plane.

To do that, you construct a 4x4 transformation matrix representing the coordinate system, transform the point, and then use the resulting X and Y values directly. Constructing the transformation matrix is the hard part and doing it requires the origin and orientation I mentioned earlier.

Share on other sites
If you're projecting a 3D point to a 2D plane, omit the component of the Normal with the largest value.

p(1,5,2)

n(9,7,3)

X is bigger, so project onto X-axis by removing it.
You now have:

p(5,2)
n(7,3)

Share on other sites
Quote:
 Original post by DrainedBrainhow will i get the x&y axis, and should i multiply the inverse vector to the point i got from the [P = P - ( N dot P + D ) * N] equation or to the original point ? can u please give me an example??

Ok, the example I gave can be calcuated as follows. N must be a unit vector, '^' is the cross product.

Given N, to get a horizontal line prependicular to it caculate N ^ up-axis.
Normalise this to get a unit vector, call it X
Then calcuate Y = N ^ X
The vectors X and Y should be unit vectors, perpendicular to each other, and lie in the plane. You can them use these to form the matrix and inverse of it as described.

But this fails if the plane is horizontal - try doing it and N ^ up-axis is a zero vector and cannot be normalised. If this happens you need to choose X and Y by some other means, but as you know the plane is horizontal this is easily done - the horizontal coordinate axes for example.

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 15
• 14
• Forum Statistics

• Total Topics
633392
• Total Posts
3011634
• Who's Online (See full list)

There are no registered users currently online

×