These exercises are not tied to a specific programming language. Example implementations are provided under the Code tab, but the Exercises can be implemented in whatever platform you wish to use (e.g., Excel, Python, MATLAB, etc.).
###Exercise 1: Irradiance at a screen due to a point source
We imagine that a point source of light at $P_s=(x_s,y_s,z_s)$ illuminates an aperture in an opaque barrier located at $z=0$ as shown below.
![Alt Figure](images/Shadows/Single_source_perspective_view.png "")
The irradiance of the light appearing at point $P=(x,y,z)$ on the viewing screen located at $z=z_{sc}$ is then given by
$$
I(x,y,z) = {{A}\over{r^2}}T(x,y)
$$
where $A$ is a constant, $r$ is the distance from $P_S$ (the source) to $P$ (the screen point), and $T(x,y)$ is a function we call the 'transparency function'. If the line from the source at $P_s$ to the screen point $P$ passes through the aperture, then $T(x,y) = 1$; otherwise, $T(x,y)=0$. In the case where the aperture is a rectangle of width $w$ in the $x$-direction and height $h$ in the $y$-direction, show that the value of the transparency function is given byAlt Figure
$$
\begin{equation}
T(x,y)=\begin{cases}
1, & \text{if $\Biggl|x_S + {{x-x_S}\over{z-z_S}}\bigl|z_S\bigr|\biggr| < {{w}\over{2}}$ and $\Biggl|y_S + {{y-y_S}\over{z-z_S}}\bigl|z_S\bigr|\biggr| < {{h}\over{2}}$}\\
0, & \text{otherwise}.
\end{cases}
\end{equation}
$$
Compute the irradiance on an array of uniformly spaced screen points on the viewing screen for an aperture with $w=4.0$ cm and $h=3.0$ cm in the following cases:
$x_S$ [cm] | $y_S$ [cm] | $z_S$ [cm] | $z_{sc}$ [cm]
:-: | :-: | :---: | :--:
0.0 | 0.0 | -20.0 | 40.0
5.0 | 0.0 | -20.0 | 40.0
0.0 | 5.0 | -20.0 | 40.0
0.0 | 0.0 | -10.0 | 40.0
0.0 | 0.0 | -40.0 | 40.0
0.0 | 0.0 | -20.0 | 60.0
0.0 | 0.0 | -20.0 | 20.0
Does the computed light pattern change as you expect when you change the source and screen locations? Are the edges of the light pattern sharp or fuzzy? (How do you define "sharp" and "fuzzy"?) Why?
###Exercise 2: Irradiance due to $N$ point sources with a rectangular aperture
If instead of one point source, suppose $N$ point sources are uniformly spaced and also arranged along a line segment of total length $L$ that is parallel to the $x$-axis, as shown below.
![Alt Figure](images/Shadows/NSources_top_view.png "")
Calculate the irradiance at the screen for the aperture of Exercise 1 if one source is on the symmetry axis, $L= 4.0$ cm, and: (a) $N=3$; (b) $N=11$; (c) and $N=101$. How many distinct shadow regions (areas characterized by different irradiance) appear in each case?
###Exercise 3: Irradiance due to $N$ point sources and an L-shaped aperture
Now imagine that you have $N$ point sources, as in Exercise 2, but now the aperture is an L-shaped aperture as shown below.
![Alt Figure](images/Shadows/L-aperture.png "")
What do you expect the irradiance pattern at the screen to look like? Why? Now calculate the irradiance pattern at the screen for the case $N=101$ and $w=2.0$ cm. Does the computed pattern resemble your prediction?
###Exercise 4: Irradiance due to $N \times N$ point sources and a rectangular aperture
Imagine you have $N\times N$ point sources arranged uniformly on a square grid, with side length $L$, and illuminating the rectangular aperture of Exercise 1. What do you expect the irradiance pattern to look like when the aperture is much smaller than the point source array? When the point source array is much smaller than the aperture? Use the aperture from Exercise 1, with $z_s = -20$ cm and $z_{sc} = 40$ cm and the following parameters to calculate the irradiance at the screen: $N=11$ and (a) $L = 3.0$ cm, (b) $L = 0.3$ cm, and (c) $L = 30.0$ cm.
###Exercise 5: Irradiance due to a model circular extended source and a rectangular barrier
Imagine you have $N\times N$ point sources arranged on a square grid of side length $L$. Now allow *only* the sources within a circle of radius $L/2$ to illuminate a rectangular barrier. What do you expect the irradiance pattern at the screen to look like when the barrier is much smaller than the array of point sources? Calculate the irradiance pattern when $L=3.0$ cm and $N = 11$, with a *barrier* of the same dimensions as the aperture of Exercise 1, and with $z_s = -20$ cm and $z_{sc} = 40$ cm. Make sure to 'extinguish' sources in the $N\times N$ grid that lie outside a radius of $L/2$.