\HeaderA{hilbertCurve}{calculate finite approximations of the Hilbert curve}{hilbertCurve}
\aliasA{hilbertCurvePoint}{hilbertCurve}{hilbertCurvePoint}
\begin{Description}\relax
These functions calculate the Hilbert curve in its finite approximations.
\code{hilbertCurvePoint} gives the coordinates of one point and \code{hilbertCurve} 
returns an array with the coordinates of all \code{4\textasciicircum{}lv} points. The
functions are not needed for \code{\LinkA{hilbertImage}{hilbertImage}} and only provided
for demonstration purposes. \code{\LinkA{plotHilbertCurve}{plotHilbertCurve}} makes use of them.
\end{Description}
\begin{Usage}
\begin{verbatim}
hilbertCurve( lv )
hilbertCurvePoint( t, lv )
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{lv}] The iteration level. A Hilbert curve of level \code{lv} spans a square with
side length \code{2\textasciicircum{}lv} (coordinates ranging from 0 to \code{2\textasciicircum{}lv-1}) and has \code{4\textasciicircum{}lv}
points.
\item[\code{t}] The point index in the Hilbert curve. Must be an integer in \code{0:(4\textasciicircum{}lv-1)}.
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{hilbertCurvePoint} returns a vector of two integer numbers, both in the range
\code{0:(2\textasciicircum{}lv-1)}, indicating the coordinates of point \code{t}. \code{huilbertCurve} returns a
matrix with \code{4\textasciicircum{}lv} rows and 2 columns, giving all points of the curve at level \code{lv}.
\end{Value}
\begin{Author}\relax
Simon Anders, EMBL-EBI, \email{sanders@fs.tum.de}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plotHilbertCurve}{plotHilbertCurve}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   hilbertCurvePoint( 67, 4 )
   hilbertCurve( 4 )
\end{ExampleCode}
\end{Examples}

