\documentclass{article}

\newenvironment{problem}[1]{\noindent{\bf\Large #1}\\*[.5em]\boldmath\bf}{\vspace{1em}}
\newenvironment{solution}{}{\vspace{2em}}
\newcommand{\qpart}[1]{${}$\\\noindent{\bf(#1)}}
\newcommand{\spart}[1]{\noindent\noindent{\bf(#1)}}

\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{color}
\usepackage{footnote}
\newcommand{\mx}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\uu}{\mathbf{u}}
\newcommand{\vv}{\mathbf{v}}
\newcommand{\ww}{\mathbf{w}}
\newcommand{\xx}{\mathbf{x}}
\renewcommand{\AA}{\mathbf{A}}
\newcommand{\BB}{\mathbf{B}}
\newcommand{\CC}{\mathbf{C}}
\newcommand{\PP}{\mathbf{P}}
\newcommand{\rr}{\mathbf{r}}
\renewcommand{\ss}{\mathbf{s}}
\renewcommand{\gg}{\mathbf{g}}
\renewcommand{\tt}{\mathbf{t}}
\DeclareMathOperator{\atant}{atan2}

\usepackage{listings}

\lstset{
  language=C++,
  showstringspaces=false,
  identifierstyle=\color{magenta},
  basicstyle=\color{magenta},
  keywordstyle=\color{blue},
  identifierstyle=\color{black},
  commentstyle=\color{green},
  stringstyle=\color{red}
}

\begin{document}

\title{CS 130, Homework 4}
\author{Name: \underline{\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad}\quad ID: \underline{\qquad\qquad\qquad\qquad}}
\date{}
\maketitle

\begin{problem}{Problem 1}
  When computing the eye coordinate system, we used $\ww =
  -\frac{\gg}{\|\gg\|}$, $\uu = \frac{\tt \times \ww}{\|\tt \times \ww\|}$, and
  $\vv = \ww \times \uu$.  Why did we not normalize $\vv$?
\end{problem}

\begin{solution}
\end{solution}

\begin{problem}{Problem 2}
  Label each table entry below ``Y'' or ``N'' to indicate whether the operation
  preserves each feature.

  \noindent
  \begin{savenotes}
  \begin{tabular}{|c|c|c|c|c|c|c|c|}
    \hline & rotation & nonuniform scale & translation & shear & projection & affine \\
    \hline parallel lines & & & & & & \\
    \hline angles & & & & & & \\
    \hline distances & & & & & & \\
    \hline intersections & & & & & & \\
    \hline lines & & & & & & \\
    \hline circles & & & & & & \\
    \hline conic sections\footnote{You will probably need to research this.} & & & & & & \\
    \hline 
  \end{tabular}
  \end{savenotes}
\end{problem}

\begin{solution}
\end{solution}

\begin{problem}{Problem 3}
  Are projective transformations linear?  Why?  Justify your answer.
\end{problem}

\begin{solution}
\end{solution}

\begin{problem}{Problem 4}
  Explain why clipping triangles after switching from homogeneous 4-vectors to
  3-vectors can give you incorrect results. Give a concrete example exhibiting
  the failure and explain in detail why your example causes this failure.  (You
  can demonstrate the problem in a lower dimension if you like, such as a
  triangle in 2D or even a line segment in 1D).  Repeating the explanation from
  the book (or an explanation found online) is not an adequate answer.  You must
  demonstrate that you understand the source of the problem.
\end{problem}

\begin{solution}
\end{solution}

\begin{problem}{Problem 5}
  Propose a texture mapping for the entire surface of the cone defined by $x^2 +
  y^2 \le z^2$, $0 \le z \le 1$.  The texture coordinates should lie in $[0,1]
  \times [0,1]$, and the entire cone (both curved and flat parts) should be
  covered.  No two points on the cone should map to the same place in the
  texture image.  In addition to providing the mapping, draw a square
  (representing the texture image) and sketch the portion of it that is being
  used for the curved part and the flat part.  (You do not have to utilize the
  whole texture image.)
\end{problem}

\begin{solution}
\end{solution}



\end{document}
