jeppa

10-04-2001, 04:06 AM

how can I project a 3dpoint correctly when its z is negative?

I would want to visualize correctly

a polygon also when is behind the observer

es:this this example produces an incorrect result.

Distance=2.56f // Distance of the observer

x=-0.5f // 3d x

y=-0.5f // 3d y

z=-2.50f // 3d z

Inverse=1.0f/(z+Distance); // reciprocal

Xp=(x*Distance)*Inverse; //x projected

YP=(y*Distance)*Inverse; //y projected

thanks in advance

[This message has been edited by jeppa (edited 10-04-2001).]

I would want to visualize correctly

a polygon also when is behind the observer

es:this this example produces an incorrect result.

Distance=2.56f // Distance of the observer

x=-0.5f // 3d x

y=-0.5f // 3d y

z=-2.50f // 3d z

Inverse=1.0f/(z+Distance); // reciprocal

Xp=(x*Distance)*Inverse; //x projected

YP=(y*Distance)*Inverse; //y projected

thanks in advance

[This message has been edited by jeppa (edited 10-04-2001).]