I am implementing a ray tracer. For that I need to make an image plane, which is basically a rectangular grid.
I have been given two points i.e.
- top-left $(A)$
- bottom-right $(B)$
and a normal vector (to uniquely identify the rectangle in $3D$ space) as shown here.

Now I want to find vectors $\bf{C-A}$ and $\bf{D-A}$ so that I can calculate the co-ordinates of center of pixels, as shown here.

The problem is that I am not able to find the points $C$ and $D$. I have calculated the equation of plane (of the form $\bf{ax + by + cz = d}$), and have also formulated the following constraints (equations).
- Vector $\bf{(D-C)}$ is perpendicular to Vector $\bf{(B-A)}$
- $a\cdot C_x + b\cdot C_y + c\cdot C_z = d$ (to make sure point $C$ lies on plane)
- $a\cdot D_x + b\cdot D_y + c\cdot D_z = d$ (to make sure point $D$ lies on plane)
- $\frac{Norm\bf{(C-A)}}{Norm\bf{(D-A)}}$ =
Aspect_Ratio(to preserve the aspect ratio) - Vector $\bf{(D-A)}$= Vector $\bf{(B-C)}$
The unknowns are $C (x,y,z)$ and $D (x,y,z)$. I am stuck here any help is much appreciated. Thanks.
IMAGE EDIT

If you have the vectors $\mathbf{B}-\mathbf{A}$ (which obviously lies in the plane) and a normal vector to the plane $\mathbf{n}$, you can construct another vector in the plane by simply taking the cross product $(\mathbf{B}-\mathbf{A}) \times \mathbf{n}$. These two define a coordinate system in the plane, which you can then use to work out $\mathbf{C-A}$ and $\mathbf{D-A}$, or equivalently the coordinates of C and D. One way to do that for C is to use the Pythagorean theorem (I use $|.|$ to denote the norm) $$ |\mathbf{B-A}|^2 = |\mathbf{C-A}|^2 + |\mathbf{B-C}|^2 $$ together with $|\mathbf{C-A}|/|\mathbf{B-C}| = \text{Aspect_ratio}$, which gives you both $|\mathbf{C-A}|$ and $|\mathbf{B-C}|$. From there you can determine the coordinates of C in the coordinate system we set up. D works analogously.
EDIT:
Let's say you construct a new orthonormal basis $\mathbf{b}_1 = \mathbf{B}-\mathbf{A}/|\mathbf{B}-\mathbf{A}|$, $\mathbf{b}_2 = (\mathbf{B}-\mathbf{A}) \times n/|(\mathbf{B}-\mathbf{A}) \times n|$ for the plane and fixed the origin of the plane to A. You then determine the coordinates $C_1, C_2$ and $D_1, D_2$ of the points C and D in the plane, such that $\mathbf{C}-\mathbf{A} = C_1 \mathbf{b}_1 + C_2 \mathbf{b}_2$ and $\mathbf{D}-\mathbf{A} = D_1 \mathbf{b}_1 + D_2 \mathbf{b}_2$. Then you can solve for $\mathbf{C} = \mathbf{A} + C_1 \mathbf{b}_1 + C_2 \mathbf{b}_2$ and $\mathbf{D} = \mathbf{A} + D_1 \mathbf{b}_1 + D_2 \mathbf{b}_2$, and use the representation of $\mathbf{b}_1, \mathbf{b}_2, \mathbf{A}$ in the $x,y,z$-basis.
IMAGE EDIT: enter image description here
Given $a=|\mathbf{B}-\mathbf{A}|$, $b=|\mathbf{C}-\mathbf{A}|$ and $c=|\mathbf{B}-\mathbf{C}|$, $C_1$ and $C_2$ are given by $$ C_1 = a \, \cos(\phi) \\ C_2 = a \, \sin(\phi), $$ where $\phi$ is the angle between $\mathbf{B}-\mathbf{A}$ and $\mathbf{C}-\mathbf{A}$. Therefore $$ \phi = \arctan\left(\frac{c}{b}\right). $$