How to calculate x,y position of 3D points?

1.1k Views Asked by At

enter image description here

I have points in 3D system like this

$$p1=(2,3,4)$$ $$p2=(3,5,5)$$

Here I would like draw point $p1$ and $p2$ in $2D$ view.

Project type = orthographic. Coordinate system = Cartesian

X- axis, min = 2, max=9 y-axis min=2, max=12 z-axis min=1, max=10

Basically I would like draw $3D$ points in $2D$ view.(using Cartesian coordinate system)

Please help me find an answer for the following question.

1) how can convert $3D$ points $(p1, p2)$ to $2D$ points. What is the formula for this?

I cann't upload images yet, as I need at least 10 reputation as per the forum rules.

Any idea

Thanks

2

There are 2 best solutions below

2
On

You also need to specify the orientation of the plane you are projecting onto. The easiest examples are planes perpendicular to one of the axes. So if you project onto a plane perpendicular to $z$, your get $p1=(2,3), p2=(3,5)$

6
On

If I understand correctly, orthographic is parallel projection.

Pick a normalized direction $h \in \mathbb{R}^3$ (ie, $\|h\| = 1$). Then you will be projecting onto the plane $\{x \in \mathbb{R}^3 | h^T x = 0\}$. An example would be $h = (0,0,1)$ which would be a plan view.

Then the projection $P: \mathbb{R}^3 \to \mathbb{R}^3$ is given by $P(x) = (I - h h^T) x = x - \langle h, x \rangle h$.

For example, if $h = (0,0,1)$, then $P((x,y,z)) = (x,y,0)$. (This is essentially the same as Ross' example.)