• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# Idea for debugging physics engines

## Recommended Posts

I''ve had countless occasions where I wished I could highlight edges and objects colliding on the screen, see certain vectors, and be able to change the camera all at the same time I am stopped at a breakpoint. I have an idea for a glut program that will let you do all that through the act of message passing. For example, I can send a message from my program to the glut app to draw an array of lines, given a global memory pointer to an array of line coordinates to draw with. The glut app would get the message and call the appropriate opengl functions. It would have to be flexible enough to work for anyone''s physics simulation. The end result is, with a little work, you can see how objects have moved, you can highlight what objects are colliding with what objects, you can draw planes, vectors, and more. There could even be built in support for force diagrams if you allow the glut program the functionality! It has to be multiplatform, of course. I''d like to see it work in Windows, *nix windowed operating systems, and even macs. Is there any program that already does this? If not, or if there are and they cost \$ to use, who would be willing to help me write one? I''m almost laser-focused on my physics engine, so I only want to be a designer and partial implementer.

##### Share on other sites
I have tried this in the past, and found that it is not very
informative to see such vectors. Since you don''t get
perspective or lighting cues from a line, it is hard to
really see its direction. YMMV, but I prefer numerical output.

##### Share on other sites
Well, you could get perspective if you are able to control the camera real-time like you do 3DSMax. Having a label on the vector would help, too, like "v=<1,3,-2>".

##### Share on other sites
Change the colour of the line representing the vector according to its z-depth (z component of the vector).