3 <title>Unary forms - Sketch
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Sketch">
6 <meta name=
"generator" content=
"makeinfo 4.7">
7 <link title=
"Top" rel=
"start" href=
"index.html#Top">
8 <link rel=
"up" href=
"Arithmetic.html#Arithmetic" title=
"Arithmetic">
9 <link rel=
"prev" href=
"Two_002doperand-_0028binary_0029-forms.html#Two_002doperand-_0028binary_0029-forms" title=
"Two-operand (binary) forms">
10 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home" title=
"Texinfo Homepage">
12 Copyright (C) 2005, 2006, 2007, 2008 Eugene K. Ressler.
14 This manual is for `sketch', version 0.2 (build 161),
15 Tuesday, September 08, 2009, a program that converts descriptions of simple
16 three-dimensional scenes into static drawings. This version generates
17 `PSTricks' or `PGF/TikZ' code suitable for use with the
18 TeX document processing system.
20 `Sketch' is free software; you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation; either version 3, or (at your option)
25 Sketch is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
30 You should have received a copy of the GNU General Public License
31 along with `sketch'; see the file COPYING.txt. If not, see
32 http://www.gnu.org/copyleft.-->
33 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
34 <style type=
"text/css"><!--
35 pre
.display
{ font-family:inherit
}
36 pre
.format
{ font-family:inherit
}
37 pre
.smalldisplay
{ font-family:inherit
; font-size:smaller
}
38 pre
.smallformat
{ font-family:inherit
; font-size:smaller
}
39 pre
.smallexample
{ font-size:smaller
}
40 pre
.smalllisp
{ font-size:smaller
}
41 span
.sc
{ font-variant:small-caps
}
42 span
.roman
{ font-family: serif
; font-weight: normal
; }
48 <a name=
"Unary-forms"></a>Previous:
<a rel=
"previous" accesskey=
"p" href=
"Two_002doperand-_0028binary_0029-forms.html#Two_002doperand-_0028binary_0029-forms">Two-operand (binary) forms
</a>,
49 Up:
<a rel=
"up" accesskey=
"u" href=
"Arithmetic.html#Arithmetic">Arithmetic
</a>
53 <!-- node-name, next, previous, up -->
54 <h5 class=
"subsubsection">3.1.4.2 Unary forms
</h5>
56 <p>Unary or one-operand forms
57 <a name=
"index-unary-form-238"></a><a name=
"index-one_002doperand-form-239"></a>are summarized in the following table, where
<code>X
</code>
58 stands for the operand.
59 <p><table summary=
""><tr align=
"left"><th valign=
"top">Op
</th><th valign=
"top">Operand
60 </th><th valign=
"top">Result
</th><th valign=
"top">Description
61 <br></th></tr><tr align=
"left"><td valign=
"top"><code>-X
</code> </td><td valign=
"top">scalar
62 <a name=
"index-_002d_0040r_007b_002c-unary-minus-operator_007d-240"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Unary scalar negation.
63 <br></td></tr><tr align=
"left"><td valign=
"top"><code>-X
</code> </td><td valign=
"top">vector
64 </td><td valign=
"top">vector
</td><td valign=
"top">Unary vector negation.
65 <br></td></tr><tr align=
"left"><td valign=
"top"><code>|X|
</code> </td><td valign=
"top">vector
66 <a name=
"index-_007c_0040math_007bX_007d_007c_0040r_007b_002c-magnitude-operator_007d-241"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Vector length.
67 <br></td></tr><tr align=
"left"><td valign=
"top"><code>unit(X)
</code> </td><td valign=
"top">vector
68 <a name=
"index-unit-242"></a> </td><td valign=
"top">vector
</td><td valign=
"top">Unit vector with same direction.
69 <br></td></tr><tr align=
"left"><td valign=
"top"><code>sqrt(X)
</code> </td><td valign=
"top">scalar
70 <a name=
"index-sqrt-243"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Scalar square root.
71 <br></td></tr><tr align=
"left"><td valign=
"top"><code>sin(X)
</code> </td><td valign=
"top">scalar
72 <a name=
"index-sin-244"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Trigonometric sine (
<code>X
</code> in degrees).
73 <br></td></tr><tr align=
"left"><td valign=
"top"><code>cos(X)
</code> </td><td valign=
"top">scalar
74 <a name=
"index-cos-245"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Trigonometric cosine (
<code>X
</code> in degrees).
75 <br></td></tr><tr align=
"left"><td valign=
"top"><code>atan2(X,Y)
</code> </td><td valign=
"top">scalar
76 <a name=
"index-atan2-246"></a> </td><td valign=
"top">scalar
</td><td valign=
"top">Polar angle in degrees of vector [X,Y].
77 <br></td></tr><tr align=
"left"><td valign=
"top"><code>inverse(X)
</code> </td><td valign=
"top">transform
78 <a name=
"index-inverse-247"></a> </td><td valign=
"top">transform
</td><td valign=
"top">Inverse transform.
79 <br></td></tr></table>
83 Errors are reported when
<code>|X|
</code>,
<code>unit
</code>,
<code>sqrt
</code>,
84 <code>atan2
</code>, and
<code>inverse
</code> fail due to bad parameters.