0 Members and 1 Guest are viewing this topic.
cool I will try it out and can I use some of the source?
// initialize pointPOINT3D point = { 5, -3, 2 };// find the right position on the screen in 2D coordinatesint x2d = HALFWIDTH + point.x * ViewingDistance / point.z;int y2d = HALFHEIGHT + point.y * ViewingDistance / point.z;// project the 3D point to the screenPixel(x2d, y2d);
x'=z*sin(yaw)+x*cos(yaw)y'=yz'=z*cos(yaw)-x*sin(yaw)x"=x'y"=y'*cos(pitch)-z'*sin(pitch)z"=y'*sin(pitch)+z'*cos(pitch)x"'=y"*sin(roll)+x"*cos(roll)y"'=y"*cos(roll)-x"*sin(roll)z"'=z"