원점 대칭 C#
2010-05-08 10:38:27

private Point symmetryXY(Point root, Point nodePoint)

{

Point returnPoint = new Point(nodePoint.X, nodePoint.Y);

returnPoint.X -= root.X;

returnPoint.Y -= root.Y;

returnPoint.X *= -1;

returnPoint.Y *= -1;

returnPoint.X += root.X;

returnPoint.Y += root.Y;

return returnPoint;

}

▼ more
Y축 대칭 C#
2010-05-08 10:38:11

private Point symmetryY(int x,Point nodePoint){

Point returnPoint = new Point(nodePoint.X,nodePoint.Y);

returnPoint.X -= x;

returnPoint.X *= -1;

returnPoint.X += x;

return returnPoint;

}

▼ more
시계방향 돌리기 C#
2010-05-08 10:37:43

private static Point nextPointPlus(int totalNode, Point rootPoint, Point nodePoint)

{

double arc = (2.0 * Math.PI) / (totalNode);

double x = nodePoint.X;

double y = nodePoint.Y;

//normalize pP(x,y)

x -= rootPoint.X;

y -= rootPoint.Y;

double tempX = x;

//rotate pP(x,y)

x = x * Math.Cos(arc) - y * Math.Sin(arc);

y = tempX * Math.Sin(arc) + y * Math.Cos(arc);

//realize pP(x,y)

x += rootPoint.X;

y += rootPoint.Y;

nodePoint.X=(int)x;

nodePoint.Y=(int)y;

return nodePoint;

}

▼ more
행여 그런이 일이 일어나도.
2010-05-08 10:36:52

행여 그런 일이 일어 날 수도 있다.

언제나 불확실은 알 수없는 삶의 깊이를 대변한다.

불확실이 없으면 생에 의미를 잃을 지도 모른다. 그런 기본적인 사실은 이성적으로

알고 있다.

그리고 모든일은 모든 사람이 더 나은 미래로 향하도록 해야한다.

그러니 행여 그런일이 일어 나더라도.

마음에 담아둔 한숨 한 줌이면 족하다.

그리고 다음을 생각해야 한다.

그래야 하는 거다. 그뿐이다.

▼ more