## Plane Interceptions...

Hello,
I'm trying to figure out the intercept points of a line with a plane.
These images should hopefully explain more...

The blue surface is the plane,
the white line is the Y axis,
green dot is (0,0,0) (x,y,z),
red lines are the intercept lines.

IMAGES

Image when plane is not rotated..

Image when the plane is rotated around the Z axis...

Image when the plane is rotated around the X axis...

Image when the plane is rotated around the Y axis...

As you can see, the point at which the red lines intercept the plane depend on the rotation of the plane.

The distance (D) from the green point to the center of the plane is constant.
The angle (θ) between the line green point to plane center and each intercept line is constant.
Image when the plane is rotated around the Z axis...

So far, I've managed to find the point at which the red lines intercept the blue plane after xRotation, when zRotate and yRotate both = 0, and theta = 60 degrees...

Code:
upperX = D / tan((yRotate -30.0 + 90) * (_pi / 180));
lowerX = D / tan((yRotate +30.0 + 90) * (_pi / 180));
leftY  = D / tan((-xRotate -30.0 + 90) * (_pi / 180));
rightY = D / tan((-xRotate +30.0 + 90) * (_pi / 180));

newUpperRightX = (upperX * cos(-zRotate * (_pi / 180))) - (rightY * sin(-zRotate * (_pi / 180)));
newUpperRightY = (rightY * cos(-zRotate * (_pi / 180))) + (upperX * sin(-zRotate * (_pi / 180)));

newLowerRightX = (lowerX * cos(-zRotate * (_pi / 180))) - (rightY * sin(-zRotate * (_pi / 180)));
newLowerRightY = (rightY * cos(-zRotate * (_pi / 180))) + (lowerX * sin(-zRotate * (_pi / 180)));

newLowerLeftX = (lowerX * cos(-zRotate * (_pi / 180))) - (leftY * sin(-zRotate * (_pi / 180)));
newLowerLeftY = (leftY * cos(-zRotate * (_pi / 180))) + (lowerX * sin(-zRotate * (_pi / 180)));

newUpperLeftX = (upperX * cos(-zRotate * (_pi / 180))) - (leftY * sin(-zRotate * (_pi / 180)));
newUpperLeftY = (leftY * cos(-zRotate * (_pi / 180))) + (upperX * sin(-zRotate * (_pi / 180)));
I hope this makes sense to someone...

It may in fact be much easier using some kind of vector calculations.
If this is the case, I am open to this method.

If anyone can help me find the intercept points after all rotations by either modifying this method or using a new method I'd be most appreciative.