this is a mathematical problem i have tried to solve for so long but never done it.

I ahve a coordinate system based on 3D with the coordinates x,y,z. But i have only a normal screen to display it, wich is x,y coordinates. And i have 2 axes wich they can move around, so its 2 angles. lets call them A and B. And u can constantly turn around this axes, so A and B can constantly be changed so u can see a object from different angles. So when A and B both = 0° what u would see would be purely the X and Y coordinate of the objects, but as they chance how do i turn X,Y,Z coordinates to X,Y coordinates when u know what value angle A and B is?