3d projection problem!

I've tried in many ways to project a point to the screen. I read somewhere that this was the way.

screen_x = ((+((point_x-viewpoint_x) / (point_z-viewpoint_z))*screen_w/2) + screen_w/2);

This doesn't work. When I increase the distance between the x coordinates (right and left) it projects the points away from the middle.

What is the correct formula for projecting a point?
Is it difficult?
Should I buy a book for this?
Is there a good web page for this?
you should use a transformation matrix.
How do I write a matrix in c++? Something like this[5][5]?
There isn't enough information here.

What API are you using for drawing the point? Is it 2D or 3D? Is your viewport set up correctly? Is the object big enough to be seen? Is it within the range of your near/far planes?

You need to be more specific.
Topic archived. No new replies allowed.