Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Sem4: Practical 5: Geometry using Sympy II

1. Write Python program to do each of the following transformations on the point P [6,−3].
(a) Refection through X−axis. (b) Scaling in X−coordinate by factor 2.
(c) Scaling in Y−coordinate by factor 1.5. (d) Reflection through the line y = − x.
2. Using sympy declare ∆ABC where A (2 ,2), B(4, 2), C( 3, 6) and write a program to :
a)Translate ∆ABC in x direction by 2 units. b) Scale ∆ABC in x and y directions by 4, 5
units respectively. c) Shear ∆ABC in y direction by - 3 units.
3. Using sympy declare ∆PQR where P (2 ,2), Q(4, 2), R( 3, 6) and write a program to :
A) Scale ∆ PQR uniformly by factors 5. B) Reflect ∆ PQR through the x axis.
C) Rotate ∆ PQR about origin by . D) Rotate ∆ PQR about point ( 6, 6) in 45o.
4. Using sympy, rotate the line segment by 90o having end points (2, 3) and (4,−1) about
origin.
5. Write a Python program to Reflect the Point P[3, 6] through the line x − 2y + 4 = 0.
6. Write a Python program to reflect the line segment joining the points A[5, -3] and B[1, 4]
through the line 2y = 3x + 4.
7. If the line segment joining the points A[−3, 5] and B[3, 3] is transformed to the line segment
A’B’ by the transformation matrix [T] = ,then using python find the slope and
midpoint of the transformed line.
8. Using sympy declare polygon P with verticesP1 (1 , 2), P2( 3, 5),P3(5 , 4), P4( 4, 2) and
P5( 3, 0) and rotate polygon P about point (1,3) by angle .
9. Find the combined transformation of the line segment between the points A[4,−1] &B[3, 0]
using Python program for the following sequence of transformations:-
(i) Shearing in X direction by 9 units. (ii) Rotation about origin through an angle π.
(iii) Scaling in X−coordinate by 2 units. (iv) Reflection through the line y = x.
10. Find the combined transformation of the line segment between the points A[3,−2] ,B[5, 0]
by a Python program for the following sequence of transformations:-
(i) Rotation about origin through an angle . (ii) Shearing in y direction by 3.5 units.
(iii) Scaling in y−coordinate by 2 units, (iv) Reflection through the line y = − x.
11. If the line passing through points A[2, 4], B[3,−1] is transformed by the transformation
matrix [ T ] = ,then using python, find the equation of transformed line.
12. Write a Python program to find the equation of the transformed line if shearing is applied
on the line 2x + y = 3 in x and y direction by −4 and 3 units respectively.
13. Write a Python program in 3D to rotate the point (1, 0, 0) through XY Plane in anticlockwise
direction (Rotation through Z axis) by an angle of 90◦.
14. Write a Python program in 3D to rotate the point (1, 2, 3) through XZ Plane in
anticlockwise direction (Rotation through Y axis) by an angle of 180◦.
15. Find the combined transformation of the line segment between the points P[5,−2] and
Q[3, 2] by using Python program for the following sequence of transformations:-
(I) Shearing in Y direction by 5 units. π
(II) Rotation about origin through an angle .
(III) Scaling in X−coordinate by 4 units. (IV) Reflection through the line y = x.
------------------------*---------------------------------*---------------------------------*-----------------

You might also like