Descretizing an arbitrary plane in 3D

106 Views Asked by At

I have a plane in 3D with size $L1\times L2$ with arbitrary orientation. The normal to the plane is $\vec{n}$. I am trying to descretize this plane into $N1\times N2$ grids. I want to have the coordinates of these $N1\times N2$ points, equally spaced, on the plane. Could someone help me how I can achieve this?

1

There are 1 best solutions below

2
On

Say the $4$ corners of the rectangle are:

\begin{eqnarray*} A_1 &=& (x_1, y_1, z_1) \\ A_2 &=& (x_2, y_2, z_2) \\ A_3 &=& (x_3, y_3, z_3) \\ A_4 &=& (x_4, y_4, z_4) \\ && \\ \text{with } && \overline{A_1 A_2} = \overline{A_3 A_4} = L_1 \\ \text{and } && \overline{A_1 A_3} = \overline{A_2 A_4} = L_2. \end{eqnarray*}

For the $x$-coord, in the $A_1A_2$ direction, we divide the value $(x_2-x_1)$ into $N_1$ equal parts to get the increment for $x$ between each grid point. Similarly, in the $A_1A_3$ direction, we divide the value $(x_3-x_1)$ into $N_2$ equal parts.

We do likewise for the $y$-coord and the $z$-coord.

In total there are $(N_1+1)\times(N_2+1)$ grid points including those on the rectangle boundary. These point are, for all combinations of $j,\;k,\;$ where $0\leq j\leq N_1$ and $0\leq k\leq N_2$,

$$\left(x_1 + j \dfrac{x_2-x_1}{N_1} + k \dfrac{x_3-x_1}{N_2} ,\quad y_1 + j \dfrac{y_2-y_1}{N_1} + k \dfrac{y_3-y_1}{N_2},\quad z_1 + j \dfrac{z_2-z_1}{N_1} + k \dfrac{z_3-z_1}{N_2}\right)$$