You revolve around (0, 0), which in this case is not the center of your triangle.
A triangle with vertices (0, -h / 2), (w / 2, h / 2), (-w / 2, h / 2) has a center, the middle of these three positions. Obviously, (1/3) (- h / 2) + (2/3) (h / 2) = h / 6. So, the actual y-coordinate of the center of your triangle.
One solution might be to move your triangle to (0, (-2/3) * h), (w / 2, h / 3), (-w / 2, h / 3).
source share