Uploaded by Nahj Fernandez

Robotics Module

advertisement
Transformations
TRANSFORMATIONS:
1. Translation
2. Stretch and/or enlargement
3. Shearing
4. Projection
5. Reflection
6. Rotation
1. Translations
a. Cartesian/Rectangular
Pf = [xf; yf; zf; 1] = [1, 0, 0, Tx; 0, 1, 0, Ty; 0, 0, 1, Tz; 0, 0, 0, 1] * [xi; yi; zi; 1]
b. Cylindrical
Pf = [ρf; ϕf; zf; 1] = [1, 0, 0, ρ; 0, 1, 0, ϕ; 0, 0, 1, z; 0, 0, 0, 1] * [ρi; ϕi; zi; 1]
Translations (continued…)
c. Spherical
Pf = [rf; θf; ϕf; 1] = [1, 0, 0, r; 0, 1, 0, θ; 0, 0, 1, ϕ; 0, 0, 0, 1] * [ri; θi; ϕi; 1]
2. Enlargement (3D Scaling)
a. In x
Pf = [xf; yf; zf; 1] = [Sx , 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
b. In y
Pf = [xf; yf; zf; 1] = [1 , 0, 0, 0; 0, Sy, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
2. Enlargement (continued…)
c. In z
Pf = [xf; yf; zf; 1] = [1 , 0, 0, 0; 0, 1, 0, 0; 0, 0, Sz , 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
d. In x and y
Pf = [xf; yf; zf; 1] = [Sx , 0, 0, 0; 0, Sy, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
2. Enlargement (continued…)
d. In x, y and z…
Pf = [xf; yf; zf; 1] = [Sx , 0, 0, 0; 0, Sy, 0, 0; 0, 0, Sx , 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
3. Reflection
a. In the xy plane
Pf = [xf; yf; zf; 1] = [1 , 0, 0, 0; 0, 1, 0, 0; 0, 0, -1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
3. Reflection (continued…)
b. In the xz plane
Pf = [xf; yf; zf; 1] = [1 , 0, 0, 0; 0, -1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
3. Reflection (continued…)
c. In the yz plane
Pf = [xf; yf; zf; 1] = [-1 , 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] * [xi; yi; zi; 1]
4. Projection (Dot/Scalar Product)
5. Rotation
To generate a rotation in 3D the following
should be defined:
>> axis of rotation
>> amount of rotation
NOTE: In the preceding rotations, the axis
of rotation passes through the ORIGIN…
5. Rotation (continued…)
a. Rotation about the z-axis
Pf = [xf; yf; zf; 1] = [cosθ , -sinθ, 0, 0; sinθ, cosθ, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] *
[xi; yi; zi; 1]
5. Rotation (continued…)
b. Rotation about the x-axis
Pf = [xf; yf; zf; 1] = [1, 0, 0, 0; 0, cosθ , -sinθ, 0; 0, sinθ, cosθ, 0; 0, 0, 0, 1] *
[xi; yi; zi; 1]
5. Rotation (continued…)
c. Rotation about the y-axis
Pf = [xf; yf; zf; 1] = [cosθ, 0, -sinθ, 0; 0, 1, 0, 0; sinθ, 0, cosθ, 0; 0, 0, 0, 1] *
[xi; yi; zi; 1]
5. Rotation (continued…)
d. Rotation about an arbitrary axis
>> inspect the axis of rotation if what axis
coincident to any of the coordinate axis…
>> do translation of the axis to the
ORIGIN
>> rotate
>> do BACK (reverse) translation
Download