annotate libs/commons-math-2.1/docs/userguide/geometry.html @ 10:5f2c5fb36e93

commons-math-2.1 added
author dwinter
date Tue, 04 Jan 2011 10:00:53 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
2
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
3
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
4
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
5
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
6
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
7
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
8
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
9
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
10
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
11
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
12
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
13 <html xmlns="http://www.w3.org/1999/xhtml">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
14 <head>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
15 <title>Math - The Commons Math User Guide - Geometry</title>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
16 <style type="text/css" media="all">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
17 @import url("../css/maven-base.css");
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
18 @import url("../css/maven-theme.css");
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
19 @import url("../css/site.css");
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
20 </style>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
21 <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
22 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
23 </head>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
24 <body class="composite">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
25 <div id="banner">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
26 <span id="bannerLeft">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
27
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
28 Commons Math User Guide
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
29
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
30 </span>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
31 <div class="clear">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
32 <hr/>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
33 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
34 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
35 <div id="breadcrumbs">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
36
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
37
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
38
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
39
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
40
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
41
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
42
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
43
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
44 <div class="xright">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
45
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
46
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
47
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
48
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
49
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
50
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
51
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
52 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
53 <div class="clear">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
54 <hr/>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
55 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
56 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
57 <div id="leftColumn">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
58 <div id="navcolumn">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
59
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
60
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
61
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
62
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
63
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
64
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
65
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
66
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
67 <h5>User Guide</h5>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
68 <ul>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
69
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
70 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
71 <a href="../userguide/index.html">Contents</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
72 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
73
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
74 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
75 <a href="../userguide/overview.html">Overview</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
76 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
77
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
78 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
79 <a href="../userguide/stat.html">Statistics</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
80 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
81
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
82 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
83 <a href="../userguide/random.html">Data Generation</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
84 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
85
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
86 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
87 <a href="../userguide/linear.html">Linear Algebra</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
88 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
89
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
90 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
91 <a href="../userguide/analysis.html">Numerical Analysis</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
92 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
93
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
94 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
95 <a href="../userguide/special.html">Special Functions</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
96 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
97
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
98 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
99 <a href="../userguide/utilities.html">Utilities</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
100 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
101
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
102 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
103 <a href="../userguide/complex.html">Complex Numbers</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
104 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
105
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
106 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
107 <a href="../userguide/distribution.html">Distributions</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
108 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
109
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
110 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
111 <a href="../userguide/fraction.html">Fractions</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
112 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
113
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
114 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
115 <a href="../userguide/transform.html">Transform Methods</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
116 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
117
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
118 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
119 <strong>3D Geometry</strong>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
120 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
121
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
122 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
123 <a href="../userguide/optimization.html">Optimization</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
124 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
125
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
126 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
127 <a href="../userguide/ode.html">Ordinary Differential Equations</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
128 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
129
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
130 <li class="none">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
131 <a href="../userguide/genetics.html">Genetic Algorithms</a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
132 </li>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
133 </ul>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
134 <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
135 <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
136 </a>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
137
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
138
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
139
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
140
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
141
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
142
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
143
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
144
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
145 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
146 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
147 <div id="bodyColumn">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
148 <div id="contentBox">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
149 <div class="section"><h2><a name="a11_Geometry"></a>11 Geometry</h2>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
150 <div class="section"><h3><a name="a11.1_Overview"></a>11.1 Overview</h3>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
151 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
152 The geometry package provides classes useful for many physical simulations
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
153 in the real 3D space, namely vectors and rotations.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
154 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
155 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
156 <div class="section"><h3><a name="a11.2_Vectors"></a>11.2 Vectors</h3>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
157 <p><a href="../apidocs/org/apache/commons/math/geometry/Vector3D.html">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
158 org.apache.commons.math.geometry.Vector3D</a> provides a simple vector
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
159 type. One important feature is that instances of this class are guaranteed
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
160 to be immutable, this greatly simplifies modelling dynamical systems
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
161 with changing states: once a vector has been computed, a reference to it
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
162 is known to preserve its state as long as the reference itself is preserved.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
163 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
164 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
165 Numerous constructors are available to create vectors. In addition to the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
166 straightforward cartesian coordinates constructor, a constructor using
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
167 azimuthal coordinates can build normalized vectors and linear constructors
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
168 from one, two, three or four base vectors are also available. Constants have
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
169 been defined for the most commons vectors (plus and minus canonical axes,
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
170 null vector, and special vectors with infinite or NaN coordinates).
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
171 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
172 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
173 The generic vectorial space operations are available including dot product,
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
174 normalization, orthogonal vector finding and angular separation computation
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
175 which have a specific meaning in 3D. The 3D geometry specific cross product
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
176 is of course also implemented.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
177 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
178 <p><a href="../apidocs/org/apache/commons/math/geometry/Vector3DFormat.html">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
179 org.apache.commons.math.geometry.Vector3DFormat</a> is a specialized format
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
180 for formatting output or parsing input with text representation of 3D vectors.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
181 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
182 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
183 <div class="section"><h3><a name="a11.3_Rotations"></a>11.3 Rotations</h3>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
184 <p><a href="../apidocs/org/apache/commons/math/geometry/Rotation.html">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
185 org.apache.commons.math.geometry.Rotation</a> represents 3D rotations.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
186 Rotation instances are also immutable objects, as Vector3D instances.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
187 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
188 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
189 Rotations can be represented by several different mathematical
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
190 entities (matrices, axe and angle, Cardan or Euler angles,
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
191 quaternions). This class presents a higher level abstraction, more
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
192 user-oriented and hiding implementation details. Well, for the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
193 curious, we use quaternions for the internal representation. The user
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
194 can build a rotation from any of these representations, and any of
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
195 these representations can be retrieved from a <code>Rotation</code>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
196 instance (see the various constructors and getters). In addition, a
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
197 rotation can also be built implicitely from a set of vectors and their
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
198 image.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
199 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
200 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
201 This implies that this class can be used to convert from one
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
202 representation to another one. For example, converting a rotation
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
203 matrix into a set of Cardan angles can be done using the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
204 following single line of code:
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
205 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
206 <div class="source"><pre>double[] angles = new Rotation(matrix, 1.0e-10).getAngles(RotationOrder.XYZ);</pre>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
207 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
208 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
209 Focus is oriented on what a rotation <em>does</em> rather than on its
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
210 underlying representation. Once it has been built, and regardless of
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
211 its internal representation, a rotation is an <em>operator</em> which
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
212 basically transforms three dimensional vectors into other three
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
213 dimensional vectors. Depending on the application, the meaning of
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
214 these vectors may vary as well as the semantics of the rotation.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
215 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
216 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
217 For example in a spacecraft attitude simulation tool, users will
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
218 often consider the vectors are fixed (say the Earth direction for
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
219 example) and the rotation transforms the coordinates coordinates of
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
220 this vector in inertial frame into the coordinates of the same vector
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
221 in satellite frame. In this case, the rotation implicitly defines the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
222 relation between the two frames (we have fixed vectors and moving frame).
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
223 Another example could be a telescope control application, where the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
224 rotation would transform the sighting direction at rest into the desired
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
225 observing direction when the telescope is pointed towards an object of
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
226 interest. In this case the rotation transforms the direction at rest in
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
227 a topocentric frame into the sighting direction in the same topocentric
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
228 frame (we have moving vectors in fixed frame). In many case, both
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
229 approaches will be combined, in our telescope example, we will probably
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
230 also need to transform the observing direction in the topocentric frame
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
231 into the observing direction in inertial frame taking into account the
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
232 observatory location and the Earth rotation.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
233 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
234 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
235 These examples show that a rotation means what the user wants it to
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
236 mean, so this class does not push the user towards one specific
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
237 definition and hence does not provide methods like
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
238 <code>projectVectorIntoDestinationFrame</code> or
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
239 <code>computeTransformedDirection</code>. It provides simpler and more
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
240 generic methods: <code>applyTo(Vector3D)</code> and
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
241 <code>applyInverseTo(Vector3D)</code>.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
242 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
243 <p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
244 Since a rotation is basically a vectorial operator, several
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
245 rotations can be composed together and the composite operation
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
246 <code>r = r<sub>1</sub> o r<sub>2</sub></code> (which means that for each
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
247 vector <code>u</code>, <code>r(u) = r<sub>1</sub>(r<sub>2</sub>(u))</code>)
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
248 is also a rotation. Hence we can consider that in addition to vectors, a
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
249 rotation can be applied to other rotations as well (or to itself). With our
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
250 previous notations, we would say we can apply <code>r<sub>1</sub></code> to
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
251 <code>r<sub>2</sub></code> and the result we get is <code>r =
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
252 r<sub>1</sub> o r<sub>2</sub></code>. For this purpose, the class
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
253 provides the methods: <code>applyTo(Rotation)</code> and
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
254 <code>applyInverseTo(Rotation)</code>.
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
255 </p>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
256 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
257 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
258
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
259 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
260 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
261 <div class="clear">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
262 <hr/>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
263 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
264 <div id="footer">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
265 <div class="xright">&#169;
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
266 2003-2010
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
267
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
268
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
269
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
270
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
271
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
272
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
273
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
274
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
275
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
276 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
277 <div class="clear">
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
278 <hr/>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
279 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
280 </div>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
281 </body>
5f2c5fb36e93 commons-math-2.1 added
dwinter
parents:
diff changeset
282 </html>