question: private Point2D _transform ( Point2D graphPoint ) { if ( graphPoint == null ) return null ; Point2D viewCenter = getViewCenter ( ) ; double viewRadius = getViewRadius ( ) ; double ratio = getRatio ( ) ; Point2D viewPoint = graphPoint ; double dx = viewPoint . getX ( ) - viewCenter . getX ( ) ; double dy = viewPoint . getY ( ) - viewCenter . getY ( ) ; dx *= ratio ; Point2D pointFromCenter = new Point2D . Double ( dx , dy ) ; PolarPoint polar = PolarPoint . cartesianToPolar ( pointFromCenter ) ; double theta = polar . getTheta ( ) ; double radius = polar . getRadius ( ) ; if ( radius > viewRadius ) return viewPoint ; double mag = Math . tan ( Math . PI / 2 * magnification ) ; radius *= mag ; radius = Math . min ( radius , viewRadius ) ; radius /= viewRadius ; radius *= Math . PI / 2 ; radius = Math . abs ( Math . atan ( radius ) ) ; radius *= viewRadius ; Point2D projectedPoint = PolarPoint . polarToCartesian ( theta , radius ) ; projectedPoint . setLocation ( projectedPoint . getX ( ) / ratio , projectedPoint . getY ( ) ) ; Point2D translatedBack = new Point2D . Double ( projectedPoint . getX ( ) + viewCenter . getX ( ) , projectedPoint . getY ( ) + viewCenter . getY ( ) ) ; return translatedBack ; }
target:  override base class transform to project the fisheye effect