Using present technology, design a program to be run on a computer that maps and displays the shape and orientation of magnetic fields in 3D.

In particular it would be interesting to view the interaction between opposing magnetic fields with a view to help design better electric motors and anything that uses magnetic fields. Things like, does a field bulge at one end when interacting with another field?, why?, can a field be enhanced?, how?, do different shapes produce different fields?, which shapes are better?

All of this in a 3D pc program I believe, if it hasn’t been done would be of great benefit to engineers and designers. As a what if, what if I could induce a magnetic field in two bodies such that the field would act as a breaking / avoidance mechanism avoiding a collision?