예제 #1
0
def rotate_point(center, point, angle):
    m21 = math.sin(angle)
    m11 = m22 = math.cos(angle)
    m12 = -m21
    dx = center[0] - m11 * center[0] + m21 * center[1]
    dy = center[1] - m21 * center[0] - m11 * center[1]
    trafo = [m11, m21, m12, m22, dx, dy]
    return apply_trafo_to_point(point, trafo)
예제 #2
0
파일: points.py 프로젝트: sk1project/sk1-wx
def rotate_point(center, point, angle):
	m21 = math.sin(angle)
	m11 = m22 = math.cos(angle)
	m12 = -m21
	dx = center[0] - m11 * center[0] + m21 * center[1];
	dy = center[1] - m21 * center[0] - m11 * center[1];
	trafo = [m11, m21, m12, m22, dx, dy]
	return apply_trafo_to_point(point, trafo)