IN PYTHON: 11.34 final project 1 : ellipses ... For this lab you will build a class that implements ellipses. We define the distance between point (x,y) to the ellipse centered at point ( xc,yc) with x-axis length (a ) and y-axis length (b) as d2=a2(xxc)2+b2(yyc)2 Note that this is an axis aligned ellipse. The ellipse also has a parameter theta that sets its rotation angle. Note that theta is a rotation around the point (xc,yc) and not around the origin. Write a class called ellipse_2d that takes at construction the values center =(xc,yc),ab=(a,b), theta. Use as default values center =(0,0),ab=(1, 1), theta =0. Your ellipse_2d class should implement the following: 1. A method called d(x,y) that returns the distance from the ellipse to point (x,y). 2. A method called intPts ( d) that returns a list of (x,y) pairs at all integer (x,y) locations within distance d of the ellipse. Note: an integer location is e.g. (3,1) is an (x,y) pair that have no fractional component. 3. A property called theta that sets a rotation angle on the ellipse. IMPORTANT: the rotation must be centered on the point (xc, yc) NOT around the origin. HINTS 1. To rotate a point (x,y) around the origin by an angle theta, use import numpy as np mxRotate =nparray([[npcos( theta ),1npsin( theta )],[npsin(theta),npcos(theta )]]) (xRot,yRot)=npmatmul((x,y),mxRotate) 2. Before rotating a point, be sure to 'center' it on the ellipse, x=xxcy=yyc This is because we want the ellipse to rotate about its own centroid, not about the origin. After rotating, be sure to reverse the centering. 3. You may find it helpful to plot your ellipse, use plt.plot(x,y,,r) to draw a red dot at every point (x,y). Also, adding a plt. gca () . axis ('equal') will show your plot with the proper aspect ratio between the X and Y axes spacing..