Shapes and Rotations Using Python, make the following functions: point_rotations(point, axis, angle) – rotates a point (two-float tuple) about an axis (two-float tuple) given the rotation angle...



Shapes and Rotations


 Using
Python,
make the following functions:



  • point_rotations(point, axis, angle) – rotates a
    point
    (two-float tuple) about an
    axis
    (two-float tuple) given the rotation
    angle
    (float, degrees), and returns the floating point coordinated of the rotated point

  • make_triangles(center, sides, rotations, shade) – draws triangle with the given
    center
    (two-integer tuple), sides (float), angle of
    rotation(s)
    (float, degrees), and shade (color – three-integer tuple) onto the image


Note: You may only use
Image and Image.Draw
from the Pillow Library, and
sin, cos, and pi
from the Math Library.


An example of a possible output is also attached, as well as the specifics.




Extracted text:
Shapes and Rotations<br>Using Python, make the following functions:<br>point_rotations(point, axis, angle) – rotates a point (two-float tuple) about an<br>axis (two-float tuple) given the rotation angle (float, degrees), and returns the<br>floating point coordinated of the rotated point<br>make_triangles(center, sides, rotations, shade) – draws triangle with the given<br>center (two-integer tuple), sides (float), angle of rotation(s) (float, degrees),<br>and shade (color – three-integer tuple) onto the image<br>Note: You may only use Image and Image.Draw from the Pillow Library, and sin, cos,<br>and pi from the Math Library.<br>An example of a possible output is also attached, as well as the specifics.<br>make_triangles((300, 300), 300, 0, (0,128,0))<br>make_triangles((300, 300), 300, 25, (0,0,255))<br>make_triangles((300, 300), 300, 50, (255,@,0))<br>make_triangles((300, 300), 300, 50, (0,0,0))<br>

Extracted text: Shapes and Rotations Using Python, make the following functions: point_rotations(point, axis, angle) – rotates a point (two-float tuple) about an axis (two-float tuple) given the rotation angle (float, degrees), and returns the floating point coordinated of the rotated point make_triangles(center, sides, rotations, shade) – draws triangle with the given center (two-integer tuple), sides (float), angle of rotation(s) (float, degrees), and shade (color – three-integer tuple) onto the image Note: You may only use Image and Image.Draw from the Pillow Library, and sin, cos, and pi from the Math Library. An example of a possible output is also attached, as well as the specifics. make_triangles((300, 300), 300, 0, (0,128,0)) make_triangles((300, 300), 300, 25, (0,0,255)) make_triangles((300, 300), 300, 50, (255,@,0)) make_triangles((300, 300), 300, 50, (0,0,0))
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here