Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/doc/report/basis.tex
ViewVC logotype

Diff of /branches/vis12/doc/report/basis.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 326, Wed Aug 18 17:42:53 2010 UTC revision 1247, Wed May 18 21:27:46 2011 UTC
# Line 3  Line 3 
3  \chapter{The Diderot Basis Environment}  \chapter{The Diderot Basis Environment}
4  \label{chap:basis}  \label{chap:basis}
5    
6    % polymorphic function
7    \newcommand{\PFNSPEC}[4]{\item[\normalfont{$\mathtt{#1} : (#2) #3 \rightarrow #4$}]\mbox{}\\}
8    \newcommand{\FNSPEC}[3]{\item[\normalfont{$\mathtt{#1} : #2 \rightarrow #3$}]\mbox{}\\}
9    \newcommand{\imageTy}[2]{\mkw{image}(#1)[#2]}
10    \newcommand{\kernelTy}[2]{\mkw{kernel\#}#2}
11    \newcommand{\fieldTy}[3]{\mkw{field\#}#1(#2)[#3]}
12    \newcommand{\tensorTy}[1]{\mkw{tensor}[#1]}
13    \newcommand{\seqTy}[2]{#1\mkw{\{}#2\mkw{\}}}
14    
15  \section{Overloaded operators}  \section{Overloaded operators}
16    
17  \section{Other operators}  \section{Other operators}
18    
19  \section{Functions}  \section{Functions}
 \newcommand{\FNSPEC}[3]{\item[\normalfont\texttt{#1} : \texttt{#2} ${\rightarrow}$ \texttt{#3}]\mbox{}\\}  
20  \begin{description}  \begin{description}
21    \FNSPEC{CL}{}{}    \FNSPEC{atan2}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
22    \FNSPEC{convolve}{}{}      returns the principal value of the arc tangent of $\frac{y}{x}$,
23    \FNSPEC{cos}{\kw{real}}{\kw{real}}      using the signs of both arguments to determine the quadrant of the return
24      returns the cosine of its argument.      value.
25    \FNSPEC{dot}{}{}    \FNSPEC{CL}{\tensorTy{3,3}}{\mkw{real}}
26    \FNSPEC{inside}{}{}    \PFNSPEC{convolve}{d,k,\sigma}{(\imageTy{d}{\sigma},\,\kernelTy{k})}{\fieldTy{k}{d}{\sigma}}
27    \FNSPEC{load}{}{}    \FNSPEC{cos}{\mkw{real}}{\mkw{real}}
28    \FNSPEC{max}{(\kw{real}, \kw{real})}{\kw{real}}      returns the cosine of its argument (measured in radians).
29      \PFNSPEC{dot}{d}{(\tensorTy{d},\, \tensorTy{d})}{\mkw{real}}
30        returns the dot product of two vectors.
31      \FNSPEC{evals}{\tensorTy{3,3}}{\seqTy{\mkw{vec3}}{3}}
32      \FNSPEC{evecs}{\tensorTy{3,3}}{\seqTy{\mkw{real}}{3}}
33      \PFNSPEC{inside}{k,d,\sigma}{(\fieldTy{k}{d}{\sigma},\,\mkw{tensor}[d])}{\mkw{bool}}
34      \PFNSPEC{load}{d,\sigma}{\mkw{string}}{\imageTy{d}{\sigma}}
35        loads the named image file, which should be a Nrrd file.
36        Note that this function may only be used in the global initialization part of a Diderot
37        program.
38      \PFNSPEC{lerp}{\sigma}{(\tensorTy{\sigma},\,\tensorTy{\sigma},\,\mkw{real})}{\tensorTy{\sigma}}
39        linear interpolationover the interval $[0,1]$:
40        \begin{displaymath}
41          \mathtt{lerp} (x, y, t) = x(1-t) + a
42        \end{displaymath}%
43      \PFNSPEC{lerp}{\sigma}{(\tensorTy{\sigma},\,\tensorTy{\sigma},\,\mkw{real},\,\mkw{real},\,\mkw{real})}{\tensorTy{\sigma}}
44        linear interpolation over an arbitrary range:
45        \begin{displaymath}
46          \mathtt{lerp} (x, y, \mathit{lo}, t, \mathit{hi}) =
47            \mathtt{lerp}\left({x, y, \frac{t - \mathit{lo}}{\mathit{hi} - \mathit{lo}}}\right)
48        \end{displaymath}%
49      \FNSPEC{max}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
50      returns the minimum of its two arguments.      returns the minimum of its two arguments.
51    \FNSPEC{min}{(\kw{real}, \kw{real})}{\kw{real}}    \FNSPEC{min}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
52      returns the maximum of its two arguments.      returns the maximum of its two arguments.
53    \FNSPEC{modulate}{}{}    \PFNSPEC{modulate}{d}{(\mkw{tensor}[d],\,\mkw{tensor}[d])}{\mkw{tensor}[d]}
54    \FNSPEC{pow}{(\kw{real}, \kw{real})}{\kw{real}}      component-wise multiplication of two vectors.
55      \PFNSPEC{normalize}{d}{\mkw{tensor}[d]}{\mkw{tensor}[d]}
56        normalize a vector to a unit vector.
57      \FNSPEC{pow}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
58      returns the first argument raised to the power of the second argument.      returns the first argument raised to the power of the second argument.
59    \FNSPEC{principleEvec}{}{}    \PFNSPEC{principleEvec}{d}{\mkw{tensor}[d,d]}{\mkw{tensor}[d]}
60    \FNSPEC{sin}{\kw{real}}{\kw{real}}    \FNSPEC{sin}{\mkw{real}}{\mkw{real}}
61      returns the sine of its argument.      returns the sine of its argument (measured in radians).
62      \FNSPEC{sqrt}{\mkw{real}}{\mkw{real}}
63        returns the square root of its argument.
64      \FNSPEC{tan}{\mkw{real}}{\mkw{real}}
65        returns the tangent of its argument (measured in radians).
66      \PFNSPEC{trace}{d}{\tensorTy{d,d}}{\mkw{real}}
67        returns the \emph{trace} of a square matrix.
68  \end{description}%  \end{description}%
69    
70  \section{Kernels}  \section{Kernels}
# Line 37  Line 75 
75      \multicolumn{2}{c}{\textbf{Specification}} & \textbf{Description} \\ \hline      \multicolumn{2}{c}{\textbf{Specification}} & \textbf{Description} \\ \hline
76      \texttt{bspln3} & \kw{kernel\#}\texttt{2} & cubic bspline reconstruction (does not interpolate) \\      \texttt{bspln3} & \kw{kernel\#}\texttt{2} & cubic bspline reconstruction (does not interpolate) \\
77      \texttt{bspln5} & \kw{kernel\#}\texttt{4} & quintic bspline reconstruction (does not interpolate) \\      \texttt{bspln5} & \kw{kernel\#}\texttt{4} & quintic bspline reconstruction (does not interpolate) \\
78      \texttt{ctmr} & \kw{kernel\#}\texttt{2} & Catmull-Rom interpolation \\      \texttt{ctmr} & \kw{kernel\#}\texttt{1} & Catmull-Rom interpolation \\
79      \texttt{tent} & \kw{kernel\#}\texttt{0} & linear interpolation \\ \hline      \texttt{tent} & \kw{kernel\#}\texttt{0} & linear interpolation \\ \hline
80    \end{tabular}%    \end{tabular}%
81  \end{center}%  \end{center}%

Legend:
Removed from v.326  
changed lines
  Added in v.1247

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0