# Thread: convert 3D coordinates to 2D coordinates

1. ## convert 3D coordinates to 2D coordinates

Hi,
I need help with a geometry problem for a computer program that I am coding:

• I work in a 3D (x,y,z) Euclidian space - origin OO.
• Within this space I have a 2D Euclidian plane with its own independent (x,y) coordinates system - origin O.
• The 2D plane can be positioned & angled anywhere within the 3D space.
• Point A is defined by the intersection of a raycast form the 3D origin and the 2D plane.
• I am able to get the 3D (x,y,z) coordinates of A and O, so I can compute the lengths [OO,A] and [OO,O].

I need to get the position of A within the 2D space (ie A(x,y).

I might be able to get more data from my 3D engine, as I don't think this is quite enough to work it out? I I'm losing my hair over it at the moment, I would really appreciate help working out how to go about it

2. ## Re: convert 3D coordinates to 2D coordinates

This is kind of a "standard" problem in computer graphics. Here's the solution:

3. ## Re: convert 3D coordinates to 2D coordinates

that's exactly what I need thanks a lot John!