I am new to opengl. For my project, i have done to draw a 3D robot arm in a MFC application by using glut. Now i am going to add some constraints so that the robot arm has some restrictions for the motion such that no arms collision, intersect etc. I think this should be easy to be done. What i am wondering is how to restrict the arm will not go through the ground which means that any part of coordinate(x,y,z) of the robot arm should be larger that 0. How can i do that?
here the link is the robot arm similar to mine for reference:
Thanks for attention