Added tikz orchard
This commit is contained in:
parent
a9eb8e75a3
commit
8e131d3c31
@ -5,6 +5,8 @@
|
||||
singlenumbering
|
||||
]{../../resources/ormc_handout}
|
||||
|
||||
\usepackage{ifthen}
|
||||
|
||||
%\usepackage{lua-visual-debug}
|
||||
\renewcommand{\arraystretch}{1.2}
|
||||
\begin{document}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 116 KiB |
@ -2,10 +2,87 @@
|
||||
|
||||
You are standing in the center of a circular orchard of integer radius R. A tree was planted each integer lattice point, and each has grown to the same radius $r$. If the radius is small enough, you will have a clear line of sight through the orchard in certain directions. If the radius is too large, there is no line of sight through the orchard in any direction. See the figure below:
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=0.5\linewidth]{orchard.png}
|
||||
\end{center}
|
||||
|
||||
\begin{center}
|
||||
\hfill
|
||||
\begin{tikzpicture}[scale=0.4]
|
||||
\draw[color=black, very thick] (0,0) circle (5);
|
||||
|
||||
\draw[fill=black] (0,0) circle (0.2);
|
||||
\draw [->, very thick](0,0) -- (0.7, 0.7);
|
||||
\draw [->, very thick](0,0) -- (-0.7, 0.7);
|
||||
|
||||
\foreach \x in {-4, ..., 4} {
|
||||
\foreach \y in {-4, ..., 4} {
|
||||
\ifthenelse{
|
||||
% Remove center
|
||||
\( \x=0 \AND \y=0 \) \OR
|
||||
%
|
||||
% Remove corners
|
||||
\( \x=4 \AND \y=-4 \) \OR
|
||||
\( \x=4 \AND \y=4 \) \OR
|
||||
\( \x=-4 \AND \y=4 \) \OR
|
||||
\( \x=-4 \AND \y=-4 \) \OR
|
||||
%
|
||||
% Remove corner corners
|
||||
\( \x=4 \AND \y=-3 \) \OR
|
||||
\( \x=4 \AND \y=3 \) \OR
|
||||
\( \x=-4 \AND \y=3 \) \OR
|
||||
\( \x=-4 \AND \y=-3 \) \OR
|
||||
\( \x=3 \AND \y=-4 \) \OR
|
||||
\( \x=3 \AND \y=4 \) \OR
|
||||
\( \x=-3 \AND \y=4 \) \OR
|
||||
\( \x=-3 \AND \y=-4 \)
|
||||
}{}{
|
||||
\draw[fill=cyan!60!green] (\x,\y) circle (0.4);
|
||||
}}}
|
||||
|
||||
\draw[fill=cyan!60!green] (0, 5) circle (0.4);
|
||||
\draw[fill=cyan!60!green] (5, 0) circle (0.4);
|
||||
\draw[fill=cyan!60!green] (0, -5) circle (0.4);
|
||||
\draw[fill=cyan!60!green] (-5, 0) circle (0.4);
|
||||
\end{tikzpicture}
|
||||
\hfill
|
||||
\begin{tikzpicture}[scale=0.4]
|
||||
\draw[color=black, very thick] (0,0) circle (5);
|
||||
|
||||
\draw[fill=black] (0,0) circle (0.2);
|
||||
|
||||
\draw [->, very thick](0,0) -- (-5,3.7);
|
||||
\draw [->, very thick](0,0) -- (5, 3.7);
|
||||
|
||||
\foreach \x in {-4, ..., 4} {
|
||||
\foreach \y in {-4, ..., 4} {
|
||||
\ifthenelse{
|
||||
% Remove center
|
||||
\( \x=0 \AND \y=0 \) \OR
|
||||
%
|
||||
% Remove corners
|
||||
\( \x=4 \AND \y=-4 \) \OR
|
||||
\( \x=4 \AND \y=4 \) \OR
|
||||
\( \x=-4 \AND \y=4 \) \OR
|
||||
\( \x=-4 \AND \y=-4 \) \OR
|
||||
%
|
||||
% Remove corner corners
|
||||
\( \x=4 \AND \y=-3 \) \OR
|
||||
\( \x=4 \AND \y=3 \) \OR
|
||||
\( \x=-4 \AND \y=3 \) \OR
|
||||
\( \x=-4 \AND \y=-3 \) \OR
|
||||
\( \x=3 \AND \y=-4 \) \OR
|
||||
\( \x=3 \AND \y=4 \) \OR
|
||||
\( \x=-3 \AND \y=4 \) \OR
|
||||
\( \x=-3 \AND \y=-4 \)
|
||||
}{}{
|
||||
\draw[fill=cyan!60!green] (\x,\y) circle (0.2);
|
||||
}}}
|
||||
|
||||
\draw[fill=cyan!60!green] (0, 5) circle (0.2);
|
||||
\draw[fill=cyan!60!green] (5, 0) circle (0.2);
|
||||
\draw[fill=cyan!60!green] (0, -5) circle (0.2);
|
||||
\draw[fill=cyan!60!green] (-5, 0) circle (0.2);
|
||||
\end{tikzpicture}
|
||||
\hfill ~
|
||||
\end{center}
|
||||
|
||||
\problem{}
|
||||
Show that if $r < \frac{1}{\sqrt{R^2 + 1}}$, you have at least one directon with a clear line of sight. \\
|
||||
|
Loading…
x
Reference in New Issue
Block a user