geometric inversion on grid

http://xahlee.info/SpecialPlaneCurves_dir/Inversion_dir/inversion.html