It has been a while since I had to use math a bit more complex than just your common arithmetic, for collision detection I had to sharpen my skills again, I worked all night with pen and paper aided by a simple plotting script to check results.
I got a full page packed with formulas to solve finite line intersection, then circle with circle (pretty easy) and finally line with circle, there was where everything went wrong and very messy; I ended opening one of my old math books which had an easier solution for line on circle by using determinants instead of the direct approach I was using.
Probably the small script I used for plotting could be released as a project, I called it glPlot, which could be a cool project, an OpenGL plotting canvas with python scripting where you could easily visualize data and parametric functions, it can already zoom and move trough the 2D space.
Anyways, I will incorporate the intersection code to carcode collision module this night and do a few demos later.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario