Hidden_Line_Problem/Schrick-Noah_CS-7353_HW4.tex

86 lines
3.3 KiB
TeX

\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage[utf8]{inputenc}
\usepackage{float}
\usepackage{indentfirst}
\setlength{\parskip}{\baselineskip}%
\title{CS 7353: Analysis of Algorithms Homework 4: Visible Lines Problem}
\author{Noah Schrick}
\date{March 8, 2022}
\begin{document}
\maketitle
\tableofcontents
\section{Problem Introduction}
The Hidden Surface Problem is widely used in computer graphics. When displaying images,
not all images should be visible (for example, if one object is in front of another).
To avoid overlapping images from being displayed and causing collisions, computations are
performed to remove all or parts of an object from the field of vision.
This problem is a simplified version focusing on lines in a 2D plane. Rather than handling shifting
perspectives, this problem will be further simplified to
focus on the perspective as looking down from y=$\infty$.
The problem statement can be defined as follows:
You are given n nonvertical lines in the plane, labeled $L_{1}$,...,$L_{n}$,
with the ith line specified by the equation y=$a_{i}$x+$b_{i}$.
We will make the assumption that no three of the lines all meet at a single
point. We say line $L_{i}$ is uppermost at a given x-coordinate $x_{0}$ if its y-coordinate
at $x_{0}$ is greater than the y-coordinates of all the other lines at
$x_{0}$: $a_{i}$$x_{0}$+$b_{i}$>$a_{j}$$x_{0}$$b_{j}$ for all
j$\not=$i.
We say line $L_{i}$ is visible if there is some x-coordinate at which
it is uppermost-intuitively, some portion of it can be seen if you look down from "y=$\infty$".
Determine which lines are visible and at which restricted domains.
\section{Program Preface}
This assignment was given with instruction to implement this in C++, or justify why Python
should be used instead. This problem was solved using C++ on a Linux system.
Attached with submission is a zip folder that contains:
\begin{itemize}
\item{A CMakeLists.txt file for compiling}
\item{An "images" folder that contains:}
\begin{enumerate}
\item{Various images included in this report}
\end{enumerate}
\item{A "src" folder that contains:}
\begin{enumerate}
\item{A Line.cpp and Line.h file for the Line class and associated functions}
\item{A HiddenLines.cpp and HiddenLines.h file for the problem instance class and
associated functions}
\item{A GNUPlot .hpp file for plotting}
\item{The main file}
\end{enumerate}
\item{A "data" folder that contains:}
\begin{enumerate}
\item{A CSV file for defining the line functions to use}
\end{enumerate}
\item{A "build" folder that contains:}
\begin{enumerate}
\item{A build.sh script to simplify the build process}
\item{A run.sh script to simplify running the program}
\item{Various CMake files}
\item{The compiled binaries for the program and associated libraries}
\end{enumerate}
\end{itemize}
This program requires the installation of GNUPlot for plotting purposes,
but modification can be performed to remove the plotting. Removing the plotting
does not alter the solution computation.
In addition, this program promises no guarantee of working on other Operating Systems -
no testing was conducted on any other platform besides the local Linux machine.
\section{Coding Approach}
3
\section{Results}
4
\end{document}