Here you can find the source of rotatePoint(Point center, Point p, double angle)
private static Point rotatePoint(Point center, Point p, double angle)
//package com.java2s; //License from project: Open Source License import java.awt.*; import java.awt.geom.AffineTransform; public class Main { private static Point rotatePoint(Point center, Point p, double angle) { double[] pt = { p.x, p.y }; AffineTransform.getRotateInstance(Math.toRadians(360 - angle), center.x, center.y).transform(pt, 0, pt, 0, 1);//w w w .ja v a2 s.com return new Point((int) Math.round(pt[0]), (int) Math.round(pt[1])); } }