I am trying to plot a geological fault plane in MATLAB as a bounded rectangle. I want to be able to plot the corners of the bounded fault plane given the following inputs: strike, dip, center point of the plane, and the width and length of the rectangle. A schematic of the problem is shown below:
In the above diagram, $\alpha$ is the strike (relative to North), $\delta$ is the dip (relative to horizontal), $P(x_c,y_c,z_c)$ is the center point of the plane, $\mathbf{O}$ is the origin, and $\mathbf{A}$, $\mathbf{B}$, $\mathbf{C}$ and $\mathbf{D}$ are the unknown points I want to solve for.
First of all, given the inputs, is it possible to calculate the four corners? If so, what would be the simplest way to do this?
I feel like I could work it out doing a significant amount of trigonometry, but perhaps there is an easier way using vectors that someone already knows which would allow me to avoid re-inventing the wheel.
EDIT: I managed to work it out using trigonometry and came up with the following solution but I still think there is probably a much easier and more elegant way to do it:
alpha = 45; %strike
delta = 30; %dip
w = 4; %width (dipping side)
L = 9; %Length (side parallel to the surface)
A = [0,0,0]; % Pivot point at the surface
H = w*sind(alpha+90);
V = w*cosd(alpha+90);
Z = -w*sind(delta);
B = [L*sind(alpha) L*cosd(alpha) 0]+A;
C = [L*cosd(90-alpha)+H L*sind(90-alpha)+V Z]+A;
D = [w*sind(alpha+90) w*cosd(alpha+90) -w*sind(delta)]+A;
P = [A; B; C; D];
figure(1); p = patch(P(:,1),P(:,2),P(:,3),'red');
xlabel('EW Distance (km)');ylabel('NS Distance (km)');zlabel('Elevation (km b.s.l.)');
axis equal
Thanks.

As a first step suppose $O$ coincident with $A$, so you can find the unit vectors oriented as the sides $AB$ and $AD$. That is the vectors: $$ \vec u=(\sin \alpha,\cos \alpha, 0)^T \qquad \vec v=(\cos \delta,0,-\sin \delta) $$ so the vector orthogonal to the plane $ABD$ is: $$\vec n=\vec u \times \vec v$$ anni, since the plane have to contain the point (correspondent to) $\vec P$, its equation is: $$ \vec n \cdot (\vec x-\vec P)=0 $$ Now, intersect this plane with the coordinate planes $z=0$ and $y=0$ and you can find the points $A$ and $D$ and from these the other points.