public void resetTriangleCenter(Triangle triangle) {

		double centerX = (triangle.getX1() + triangle.getX2() + triangle
				.getX3()) / 3;
		double centerY = (triangle.getY1() + triangle.getY2() + triangle
				.getY3()) / 3;

		triangle.setX1(triangle.getX1() - centerX);
		triangle.setY1(triangle.getY1() - centerY);
		triangle.setX2(triangle.getX2() - centerX);
		triangle.setY2(triangle.getY2() - centerY);
		triangle.setX3(triangle.getX3() - centerX);
		triangle.setY3(triangle.getY3() - centerY);

		Point2D point = Transformation
				.objectToWorld(triangle, centerX, centerY);

		triangle.setX(point.getX());
		triangle.setY(point.getY());
	}