Converted the function connection2massindices to c++ code. I also created a monster :O. Controlling one masses position with mouse input (not 1 to 1 position tho).