File: Scientific_16.html

package info (click to toggle)
python-scientific 2.2-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,368 kB
  • ctags: 2,396
  • sloc: python: 6,468; ansic: 3,643; xml: 3,596; makefile: 79; sh: 27
file content (86 lines) | stat: -rw-r--r-- 3,005 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<a name="Module:Scientific.Geometry.Transformation"><h1>Module Scientific.Geometry.Transformation</h1></a>

<hr width=70%>
<a name="Class:Scientific.Geometry.Transformation.Transformation"><h2>Class Transformation: Linear coordinate transformation.</h2></a>

<p>Transformation objects represent linear coordinate transformations
in a 3D space. They can be applied to vectors, returning another vector.
If <tt>t</tt> is a transformation and <tt>v</tt> is a vector, <tt>t(v)</tt> returns
the transformed vector.</p>

<p>Transformations support composition: if <tt>t1</tt> and <tt>t2</tt> are transformation
objects, <tt>t1*t2</tt> is another transformation object which corresponds
to applying t1 <i>after</i> t2.</p>

<p>This class is an abstract base class. Instances can only be created
of concrete subclasses, i.e. translations or rotations.
</p>

<b>Methods:</b><br>
<ul>
<li> <b><i>rotation</i></b>()
<p>Returns the rotational component.</p>

<li> <b><i>translation</i></b>()
<p>Returns the translational component. In the case of a mixed
rotation/translation, this translation is executed
<i>after</i> the rotation.</p>

<li> <b><i>inverse</i></b>()
<p>Returns the inverse transformation.</p>

<li> <b><i>screwMotion</i></b>()
<p>Returns the four parameters <tt>(reference, direction, angle,
distance)</tt> of a screw-like motion that is equivalent to the
transformation. The screw motion consists of a displacement
of <tt>distance</tt> (a float) along <tt>direction</tt> (a normalized vector)
plus a rotation of <tt>angle</tt> radians around an axis pointing along
<tt>direction</tt> and passing through the point <tt>reference</tt> (a vector).
</p>

</ul>
<hr width=70%>
<a name="Class:Scientific.Geometry.Transformation.Translation"><h2>Class Translation: Translational transformation.</h2></a>

<p>This is a subclass of Transformation.</p>

<p>Constructor: Translation(<i>vector</i>), where <i>vector</i> is the displacement
vector.
</p>

<b>Methods:</b><br>
<ul>
<li> <b><i>displacement</i></b>()
<p>Returns the displacement vector.</p>

</ul>
<hr width=70%>
<a name="Class:Scientific.Geometry.Transformation.Rotation"><h2>Class Rotation: Rotational transformation.</h2></a>

<p>This is a subclass of Transformation.</p>

<p>Constructor:</p>

<ul>
<li> <p>
Rotation(<i>tensor</i>), where <i>tensor</i> is a tensor object containing
  the rotation matrix.</p><li> <p>
Rotation(<i>axis</i>, <i>angle</i>), where <i>axis</i> is a vector and <i>angle</i>
  a number (the angle in radians).
</p></ul>
<b>Methods:</b><br>
<ul>
<li> <b><i>axisAndAngle</i></b>()
<p>Returns the axis (a normalized vector) and angle (a float,
in radians).</p>

</ul>
<hr width=70%>
<a name="Class:Scientific.Geometry.Transformation.RotationTranslation"><h2>Class RotationTranslation: Combined translational and rotational transformation.</h2></a>

<p>This is a subclass of Transformation.</p>

<p>Objects of this class are not created directly, but can be the
result of a composition of rotations and translations.
</p>