To rotate about the y axis
- y' = y*cos q - z*sin q
- z' = y*sin q + z*cos q
- x' = x
And the height is y1 - y0. Therefor to calculate the new y1 and y0:
CGFloat y0 = 0;
CGFloat y1 = 50;
CGFloat z = -1800; //This relates to the m34 perspective matrix.
y0 = y0 * cos(radians(45)) - z * sin(radians(45));
y1 = y1 * cos(radians(45)) - z * sin(radians(45));
CGFloat newHeight = y1 - y0;