How to calculate the area of a projected path onto a plane?

106 Views Asked by At

How do you "orthogonally project" the shape? After I drew multiple graphs, I still had no idea.

The correct answer is $12$. I guess it is $3 \sqrt 2 \cdot 2 \sqrt 2$ according to the gist of the graph that I drew (a plane with two parallel sides through four mid points each, and two shorter sides a little out of shape)

The problem:

"A bee travels in a series of steps of length $1$: north, west, north, west, up, south, east, south, east, down. (The bee can move in three dimensions, so north is distinct from up.) There exists a plane $P$ that passes through the midpoints of each step. Suppose we orthogonally project the bee’s path onto the plane $P$, and let $A$ be the area of the resulting figure. What is $A^2$?"

4

There are 4 best solutions below

0
On

Following is the code I developed to solve this problem. The square of the area output by the program is $A^2 = 12$

Public Sub project_steps_onto_plane()
Dim steps(20, 3) As Double
Dim points(20, 3) As Double
Dim midpoints(20, 3) As Double
Dim u1(3), u2(3), u3(3), u4(4), m1(3) As Double
Dim pr(3, 3) As Double
Dim prpoints(20, 3) As Double
Dim e As Double
Dim regress(20, 4) As Double
Dim bvec(20) As Double
Dim x0(4) As Double
Dim mt As Integer
Dim xx(4, 4) As Double

Dim ierr As Integer
Dim eqn(4) As Double

n = 10
points(1, 1) = 0
points(1, 2) = 0
points(1, 3) = 0

For j = 1 To 3
ActiveSheet.Cells(1, j + 5) = points(1, j)
Next j

For i = 1 To n

For j = 1 To 3
steps(i, j) = ActiveSheet.Cells(i, j)
points(i + 1, j) = points(i, j) + steps(i, j)

ActiveSheet.Cells(i + 1, j + 5) = points(i + 1, j)
Next j

Next i

For i = 1 To n

For j = 1 To 3
midpoints(i, j) = 0.5 * (points(i, j) + points(i + 1, j))
Next j

Next i

' regression equation for plane passing through the midpoints

For i = 1 To n

For j = 1 To 3
regress(i, j) = midpoints(i, j)
Next j

regress(i, 4) = 1

Next i


' R X = 0

Call solve_rd_system(regress, bvec, n, 4, mt, x0, xx, 0.00000001, ierr)

MsgBox ("mt =" + Str(mt))

For j = 1 To 4
eqn(j) = xx(j, 1)
Next j


' verify that all midpoints are on this plane

For i = 1 To n

For j = 1 To 3
u4(j) = midpoints(i, j)
Next j
u4(4) = 1

e = dotn(u4, eqn, 4)

If Abs(e) > 0.000001 Then
MsgBox ("Error ... plane does not contain a midpoint")
Exit Sub
End If

Next i

' build a reference frame for the plane of projection

For i = 1 To 3
u3(i) = eqn(i)
Next i

Call normalize1(u3)

Call reset_frame(1)

Call find_spanning_vectors(u3, u1, u2)

For i = 1 To 3
da(1, i) = m1(i)
ra(1, i, 1) = u1(i)
ra(1, i, 2) = u2(i)
ra(1, i, 3) = u3(i)
Next i

For i = 1 To 3
ActiveSheet.Cells(i, 12) = da(1, i)
For j = 1 To 3
ActiveSheet.Cells(i, 13 + j) = ra(1, i, j)
Next j
Next i

For i = 1 To n + 1

For j = 1 To 3
u1(j) = points(i, j)
Next j

' project
Call compute_uvw(1, u1, u2)

For j = 1 To 2
prpoints(i, j) = u2(j)
Next j

Next i

' plot
k = 14
narcs = 0
ipass = 2

Call draw_points(2, 1, n + 1, prpoints, 1)
Call draw_points(0, 1, 1, prpoints, 6) 'Yellow
Call draw_points(0, 2, 1, prpoints, 4) 'Green
Call draw_points(0, 3, 1, prpoints, 5) 'Blue


Call plot_curve(0, 14, 0, 0, 0, "", "")

MsgBox ("")

For i = 1 To n

j = 1 + i Mod n

area = area + 0.5 * (prpoints(i, 1) * prpoints(j, 2) - prpoints(j, 1) * prpoints(i, 2))

Next i


ActiveSheet.Cells(1, 10) = area ^ 2


End Sub

The output of the program is as follows:

enter image description here

0
On

Adopt a Cartesian coordinate system such that the bee begins at the origin and east/north/up is in the direction of increasing $x/y/z$, respectively. Then the trajectory of the bee is a series of steps along straight lines connecting the points defined by the sequence north, west, north, west, up, south, east, south, east, down: $$(0,0,0) \to (0,1,0) \to (-1,1,0) \to (-1,2,0) \to (-2,2,0)$$ $$\to (-2,2,1) \to (-2,1,1) \to (-1,1,1) \to (-1,0,1) \to (0,0,1) \to (0,0,0).$$ The set of midpoints $M$ along each step is $$\left\{(0,\frac{1}{2},0),(-\frac{1}{2},1,0),(-1,\frac{3}{2},0),(-\frac{3}{2},2,0),(-2,2,\frac{1}{2}),(-2,\frac{3}{2},1),(-\frac{3}{2},1,1),(-1,\frac{1}{2},1),(-\frac{1}{2},0,1),(0,0,\frac{1}{2})\right\}.$$ In order to determine the plane $P$ that contains these points, we will construct a unit vector $\hat{n}$ normal to the plane to obtain the equation of the plane and then verify that $M\subset P$. Let $\vec{a}$ be the vector connecting the midpoints $(0,\frac{1}{2},0),(-\frac{1}{2},1,0)$ and $\vec{b}$ be the vector connecting the midpoints $(-\frac{3}{2},2,0),(-2,2,\frac{1}{2})$. Thus, $\vec{a}=-\frac{1}{2}\hat{x}+\frac{1}{2}\hat{y}$ and $\vec{b}=-\frac{1}{2}\hat{x}+\frac{1}{2}\hat{z}$. Note that since $\vec{a}$ and $\vec{b}$ are clearly linearly independent, they would span the plane $P$ when it is shifted to pass through the origin, if such a plane exists. We can normalize these vectors as $\hat{a}=\frac{-\hat{x}+\hat{y}}{\sqrt{2}}, \hat{b}=\frac{-\hat{x}+\hat{z}}{\sqrt{2}}$ and observe that $-\frac{1}{\sqrt{3}}\hat{a} + \frac{2}{\sqrt{3}}\hat{b}=\frac{-(-\hat{x}+\hat{y})+2(-\hat{x}+\hat{z})}{\sqrt{6}}=\frac{-\hat{x}-\hat{y}+2\hat{z}}{\sqrt{6}}$ is itself normalized and conveniently $\hat{a} \cdot \left(-\frac{1}{\sqrt{3}}\hat{a} + \frac{2}{\sqrt{3}}\hat{b}\right)=-\frac{1}{\sqrt{3}}+\frac{2}{\sqrt{3}} (\hat{a} \cdot \hat{b})= -\frac{1}{\sqrt{3}}+\frac{2}{\sqrt{3}} (\frac{1}{2})=0$. This means $\hat{x}'= \hat{a} = \frac{-\hat{x}+\hat{y}}{\sqrt{2}}$ and $\hat{y}' = -\frac{1}{\sqrt{3}}\hat{a} + \frac{2}{\sqrt{3}}\hat{b} = \frac{-\hat{x}-\hat{y}+2\hat{z}}{\sqrt{6}}$ form an orthonormal basis for $P$ shifted to contain the origin. We therefore obtain $\hat{n}$ as the natural normal vector to $P$ given by $$\hat{z}'=\hat{x}' \times \hat{y}'= \hat{a} \times \left(-\frac{1}{\sqrt{3}}\hat{a} + \frac{2}{\sqrt{3}}\hat{b}\right) = \frac{2}{\sqrt{3}} \hat{a} \times \hat{b} = \frac{2}{\sqrt{3}} \frac{-\hat{x}+\hat{y}}{\sqrt{2}} \times \frac{-\hat{x}+\hat{z}}{\sqrt{2}} = \frac{\hat{x}+\hat{y}+\hat{z}}{\sqrt{3}}.$$ Since $\vec{x}_0 = \frac{1}{2} \hat{y}$ falls on $P$ if it exists, the equation of $P$ is given implicitly as $\hat{z}' \cdot (\vec{x}-\vec{x_0})=0$. One can now directly verify that every midpoint $m \in M$ falls on $P$ and that $P$ exists.

The primed coordinate system is orthonormal by construction such that any vector $\vec{x}$ can be written as $\vec{x}=(\vec{x} \cdot \hat{x}_j') \hat{x}_j' = ((x_i \hat{x}_i) \cdot \hat{x}_j') \hat{x}_j' = x_i (\hat{x}_i \cdot \hat{x}_j) \hat{x}_j'$ using index summation notation. I would recommend using this for $\vec{x}$ being each of the standard Cartesian basis vectors in order to map each step of the bee into a vector in the primed coordinate system. Then simply ignore the $\hat{z}'$ contributions to get the projected motion of the bee on $P$. You should find that the projection of the bee's trajectory on $P$ traces out two regular hexagons (fitting!) of side length $s=\sqrt{\frac{2}{3}}$ that share a side: Projection of the Bee's Trajectory on P It is straightforward to calculate the area $A$ from here and show that $A^2=12$ as desired.

0
On

I think this problem is intended to be a purely logical problem with very little vector geometry. For starters, the problem states (without proof) that there IS a plane that passes through the midpoints. Hence, we are allowed to assume that without proving that this actually happens (this doesn't happen for all possible BEE movements).

The problem has a large amount of symmetry. There is symmetry in the number of up/down, east/west, and north/south. Since the plane goes through the midpoints, the vertices must alternate between "above the plane" and "below the plane". We also immediately see that the projection must be both vertically and horizontally symmetric. Since the path of the BEE in 3-space is along the vertices of two cubes (but rotated from each other) and since the projected area of both is identical, then the projection of the cubes must be maximal.

The maximal area of a cube projected onto a plane is $\sqrt{3}$. Since there are two of them, we have $$(2\cdot \sqrt{3})^2=12$$ as desired.

0
On

Here I'll develop an analytical approach that hopefully will address the theoretical aspects of the original question.

As the bee moves in 3D space, and easst/west, norht/south, and up/down are opposites, without loss of generality I'll define movements as changes in directions $(x,y,z)$ as follows: $$\mathbf{e}=-\mathbf{w}=\begin{pmatrix}1\\0\\0\end{pmatrix}\,,\quad \mathbf{n}=-\mathbf{s}=\begin{pmatrix}0\\1\\0\end{pmatrix}\,,\, \mathbf{u}=-\mathbf{d}=\begin{pmatrix}0\\0\\1\end{pmatrix}\,.$$

We assume that the bee starts at a point $\mathbf{p_1}$.Thus, We have a set of 10 paths (line segments) defining a closed curve through the following points $\mathbf{p}_i$ as follows: \begin{align} \mathbf{p}_1&\xrightarrow{N} \mathbf{p}_2\xrightarrow{E} \mathbf{p}_3\xrightarrow{N} \mathbf{p}_4\xrightarrow{E} \mathbf{p}_5\xrightarrow{U} \mathbf{p}_6\xrightarrow{S} \mathbf{p}_7\xrightarrow{W} \mathbf{p}_8\xrightarrow{S} \mathbf{p}_9\xrightarrow{W} \mathbf{p}_{10}\xrightarrow{D} \mathbf{p}_1 \end{align} Equivalently, we can write the points and middle points $\mathbf{m}_i=\frac{1}{2}(\mathbf{p}_i+\mathbf{p}_{i+1})$ \begin{align} \mathbf{p}_2&=\mathbf{p}_1+\mathbf{n} &\mathbf{m}_1&=\frac{1}{2}(\mathbf{p}_1+\mathbf{p}_2)=\mathbf{p}_1+\frac{1}{2}\mathbf{n}\\ \mathbf{p}_3&=\mathbf{p}_1+\mathbf{n}+\mathbf{e} &\mathbf{m}_2&=\frac{1}{2}(\mathbf{p}_2+\mathbf{p}_3)=\mathbf{p}_1+\mathbf{n}+ \frac{1}{2}\mathbf{e}\\ \mathbf{p}_4&=\mathbf{p}_1+2\mathbf{n}+\mathbf{e} &\mathbf{m}_3&=\frac{1}{2}(\mathbf{p}_3+\mathbf{p}_4)=\mathbf{p}_1+\frac{3}{2}\mathbf{n}+ \mathbf{e}\\ \mathbf{p}_5&=\mathbf{p}_1+2\mathbf{n}+2\mathbf{e} &\mathbf{m}_4&=\frac{1}{2}(\mathbf{p}_4+\mathbf{p}_5)=\mathbf{p}_1+2\mathbf{n}+ \frac{3}{2}\mathbf{e}\\ \mathbf{p}_6&=\mathbf{p}_1+2\mathbf{n}+2\mathbf{e}+\mathbf{u} &\mathbf{m}_5&=\frac{1}{2}(\mathbf{p}_5+\mathbf{p}_6)=\mathbf{p}_1+2\mathbf{n}+2\mathbf{e}+ \frac{1}{2}\mathbf{u}\\ \mathbf{p}_7&=\mathbf{p}_1+\mathbf{n}+2\mathbf{e}+\mathbf{u} &\mathbf{m}_6&=\frac{1}{2}(\mathbf{p}_6+\mathbf{p}_7)=\mathbf{p}_1+\frac{3}{2}\mathbf{n}+2\mathbf{e}+\mathbf{u}\\ \mathbf{p}_8&=\mathbf{p}_1+\mathbf{n}+\mathbf{e}+\mathbf{u} &\mathbf{m}_7&=\frac{1}{2}(\mathbf{p}_7+\mathbf{p}_8)=\mathbf{p}_1+\mathbf{n}+ \frac{3}{2}\mathbf{e}+\mathbf{u}\\ \mathbf{p}_9&=\mathbf{p}_1+\mathbf{e}+\mathbf{u} &\mathbf{m}_8&=\frac{1}{2}(\mathbf{p}_8+\mathbf{p}_9)=\mathbf{p}_1+\frac{1}{2}\mathbf{n}+ \mathbf{e}+\mathbf{u}\\ \mathbf{p}_{10}&=\mathbf{p}_1+\mathbf{u} &\mathbf{m}_9&=\frac{1}{2}(\mathbf{p}_9+\mathbf{p}_{10})=\mathbf{p}_1+\frac{1}{2}\mathbf{e}+\mathbf{u}\\ &&\mathbf{m}_{10}&=\frac{1}{2}(\mathbf{p}_{10}+\mathbf{p}_1)=\mathbf{p}_1+\frac{1}{2}\mathbf{u} \end{align}

The midpoints are all coplanar, and we only need three to define its plane equation. I choose $\mathbf{m}_1,\mathbf{m}_3,\mathbf{m}_{10}$, and given that $\mathbf{p}_1$ is arbitrary, I will choose it so one of these points is the origin, i.e. $\mathbf{p}_1=-\frac{1}{2}\mathbf{u}$ and the 3 points are \begin{align} \begin{pmatrix}0\\1/2\\-1/2\end{pmatrix}, \begin{pmatrix}1/2\\1\\-1/2\end{pmatrix}, \begin{pmatrix}0\\0\\0\end{pmatrix}\,. \end{align} Let $$A=\begin{bmatrix}x&y&z&1\\0&1/2&-1/2&1\\1/2& 1&-1/2&1\\0&0&0&1\end{bmatrix}$$ and the plane equation is obtained by $\det(A)=0$, i.e. \begin{align} \det(A)&=-\frac{1}{4}x+\frac{1}{4}y+\frac{1}{4}z=0\\ \Rightarrow & -x+y+z=0\,, \end{align} with normal vector $\mathbf{a}=(-1,1,1)$. The orthogonal projection $\mathbf{q}$ of a point $\mathbf{p}$ to this plane is given by $$\mathbf{q}=\operatorname{proj}(\mathbf{p})=\mathbf{p}-\frac{\mathbf{a}^{\mathsf{T}}\mathbf{p}}{\|\mathbf{a}\|^2}\mathbf{a}=\left(\mathbf{I}-\frac{1}{3}\mathbf{a}\mathbf{a}^{\mathsf{T}}\right)\mathbf{p}=\frac{1}{3}\begin{bmatrix}2&1&1\\1&2&-1\\1&-1&2\end{bmatrix}\mathbf{p}\,.$$

We can use this equation to project all points $\mathbf{p}_i$ in the bee's trajectory. We obtain the projected points stacked in matrix $\mathbf{Q}=\begin{bmatrix}\mathbf{q}_1 &\cdots&\mathbf{q}_{10} \end{bmatrix}$ as \begin{align} \mathbf{Q}=\frac{1}{3}\begin{bmatrix}- 0& 1&3& 4&6&7&6&4&3& 1\\ 0& 2&3& 5&6&5&3&2&0&-1\\ 0&-1&0&-1&0&2&3&2&3& 2 \end{bmatrix}, \end{align}

Now, the shoelace equation applies for 2D points. An option is to change the basis so that the 3rd new coordinate coincides with the plane normal direction $\mathbf{a}$. Without explicitly deriving it, one such orthonormal basis is $$\mathbf{B}=\begin{bmatrix}\frac{1}{\sqrt{2}}&\frac{1}{\sqrt{6}}&-\frac{1}{\sqrt{3}}\\\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{6}}&\frac{1}{\sqrt{3}}\\0&\frac{2}{\sqrt{6}}&\frac{1}{\sqrt{3}}\end{bmatrix}=\begin{bmatrix}1&1&-1\\1&-1&1\\0&2&1\end{bmatrix}\begin{bmatrix}\frac{1}{\sqrt{2}}&0&0\\0&\frac{1}{\sqrt{6}}&0\\0&0&\frac{1}{\sqrt{3}}\end{bmatrix}$$ and hence $$\mathbf{R}=\mathbf{B}^{-1}\mathbf{Q}=\begin{bmatrix} 0& \frac{1}{\sqrt{2}}&\sqrt{2}& \frac{3}{\sqrt{2}}&2\sqrt{2}&2\sqrt{2}&\frac{3}{\sqrt{2}}&\sqrt{2}&\frac{1}{\sqrt{2}}& 0\\ -\frac{1}{\sqrt{6}}& -\frac{2}{\sqrt{6}}&-\frac{1}{\sqrt{6}}& -\frac{2}{\sqrt{6}}&-\frac{1}{\sqrt{6}}&\frac{1}{\sqrt{6}}&\frac{2}{\sqrt{6}}&\frac{1}{\sqrt{6}}&\frac{2}{\sqrt{6}}& \frac{1}{\sqrt{6}}\\ 0& 0&0& 0&0&0&0&0&0& 0 \end{bmatrix}$$

As the 3rd coordinate is always zero (as we wanted), we can drop it and use the first 2 coordinates in the classical shoelace equation: \begin{align} \mathbf{R}'&=\begin{bmatrix} 0& \frac{1}{\sqrt{2}}&\sqrt{2}& \frac{3}{\sqrt{2}}&2\sqrt{2}&2\sqrt{2}&\frac{3}{\sqrt{2}}&\sqrt{2}&\frac{1}{\sqrt{2}}& 0\\ -\frac{1}{\sqrt{6}}& -\frac{2}{\sqrt{6}}&-\frac{1}{\sqrt{6}}& -\frac{2}{\sqrt{6}}&-\frac{1}{\sqrt{6}}&\frac{1}{\sqrt{6}}&\frac{2}{\sqrt{6}}&\frac{1}{\sqrt{6}}&\frac{2}{\sqrt{6}}& \frac{1}{\sqrt{6}} \end{bmatrix}\\ &=\begin{bmatrix} \frac{1}{\sqrt{2}}&0\\ 0& \frac{1}{\sqrt{6}} \end{bmatrix}\begin{bmatrix} 0& 1& 2& 3& 4& 4& 3& 2& 1& 0\\ -1&-2&-1&-2&-1& 1& 2& 1& 2& 1 \end{bmatrix} \end{align}

Letting $\mathbf{r}_i'=(x_i,y_i)$, using the shoelace equation in determinant form: \begin{align} A&=\frac{1}{2}\sum_i \begin{vmatrix} x_i & x_{i+1}\\ y_i & y_{i+1}\end{vmatrix}\\ &=\frac{1}{2}\cdot\frac{1}{\sqrt{2}\sqrt{6}}\left( \begin{vmatrix} 0 & 1 \\-1 &-2\end{vmatrix}+ \begin{vmatrix} 1 & 2 \\-2 &-1\end{vmatrix}+ \begin{vmatrix} 2 & 3 \\-1 &-2\end{vmatrix}+ \begin{vmatrix} 3 & 4 \\-2 &-1\end{vmatrix}+ \begin{vmatrix} 4 & 4 \\-1 & 1\end{vmatrix}\right.\\ &\qquad\qquad \left. + \begin{vmatrix} 4 & 3 \\1 & 2\end{vmatrix}+ \begin{vmatrix} 3 & 2 \\2 & 1\end{vmatrix}+ \begin{vmatrix} 2 & 1 \\1 & 2\end{vmatrix}+ \begin{vmatrix} 1 & 0 \\2 & 1\end{vmatrix}+ \begin{vmatrix} 0 & 0 \\1 &-1\end{vmatrix} \right)\\ &=\frac{1}{2\sqrt{12}}\left(1+3-1+5+8+5-1+3-1+0\right)\\ &=\frac{1}{2\sqrt{12}}\cdot24 = \sqrt{12}\\ \end{align} And we then have that $A^2=12$. For convenience, I also plotted this on Desmos 3D.


Other, more straightforward option: We are told that all the midpoints are coplanar. In this particular case, this plane will maximize the projected area (we can see this intuitively, although I am not attempting to prove this), and hence its area is the vector area, and more importantly, the generalized shoelace formula yields its area: $$A=\frac{1}{2}\left\|\sum_{i} \mathbf{p}_i\times\mathbf{p}_{i+1}\right\|$$ where $\times$ is the cross product. As the vertices $\mathbf{p}_i$ are defined in terms of an arbitrary $\mathbf{p}_1$, we can set here $\mathbf{p}_1=\mathbf{0}$ and write \begin{align} \sum_{i} \mathbf{p}_i\times\mathbf{p}_{i+1}&=\mathbf{0}\times\begin{pmatrix}0\\1\\0\end{pmatrix} + \begin{pmatrix}0\\1\\0\end{pmatrix}\times\begin{pmatrix}1\\1\\0\end{pmatrix} + \begin{pmatrix}1\\1\\0\end{pmatrix}\times\begin{pmatrix}1\\2\\0\end{pmatrix} + \begin{pmatrix}1\\2\\0\end{pmatrix}\times\begin{pmatrix}2\\2\\0\end{pmatrix}\\ &\quad+\begin{pmatrix}2\\2\\0\end{pmatrix}\times\begin{pmatrix}2\\2\\1\end{pmatrix}+\begin{pmatrix}2\\2\\1\end{pmatrix}\times\begin{pmatrix}2\\1\\1\end{pmatrix}+\begin{pmatrix}2\\2\\1\end{pmatrix}\times\begin{pmatrix}1\\1\\1\end{pmatrix}\\ &\quad+\begin{pmatrix}1\\1\\1\end{pmatrix}\times\begin{pmatrix}0\\1\\1\end{pmatrix}+\begin{pmatrix}0\\1\\1\end{pmatrix}\times\begin{pmatrix}0\\0\\1\end{pmatrix}+\begin{pmatrix}0\\0\\1\end{pmatrix}\times\mathbf{0} = \begin{pmatrix}4\\-4\\-4\end{pmatrix}\,, \end{align} and thus $$A^2=\frac{1}{4}\left\| \begin{bmatrix}4\\-4\\-4\end{bmatrix} \right\|^2 = \frac{1}{4}\cdot\left(\sqrt{4^2+(-4)^2+(-4)^2}\right)^2=12$$

In MATLAB,

P=[0 0 0; 0 1 0; 1 1 0; 1 2 0; 2 2 0; 2 2 1; 2 1 1; 1 1 1;1 0 1; 0 0 1]';
A_squared=(norm(sum(cross(P,circshift(P,-1,2),1),2))/2)^2 

A_squared =
     12.000