سؤال

I need to draw a Cartesian plane (standard OXYZ), where i would construct planes from equations ax+by+cz+d=0 and some objects.

How can i do that via OpenGL? Anybody?

هل كانت مفيدة؟

المحلول

You need to create triangle or quad. Calculate points in plane using your equation and from those points construct geometry.

For rendering geometry, look for some tutorials. There are plenty of them around.

نصائح أخرى

If I am interpreting your question correctly, you just want to draw the axes of the Cartesian planes xy, xz, yz.

You can achieve this very easily by drawing a non-solid cube (glutWireCube should do the job), such that its bottom-front-left corner is at (0,0,0) (or bottom-back-left corner, based on the direction of positive depth).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top