## PlotCycloidArc(8.5) Math98 HW4 The cylcoid is the plane curve traced out by a point on a circle as the circle rolls without slipping on a straight line.1 In this exercise we will use MATLAB to create an animation of a circle rolling on a straight line, while a point on the circle traces the cycloid. a. Implement a MATLAB function of the form function PlotCycloidArc(ArcLength). This function takes in a positive number ArcLength and displays a snapshot of the cirle rolling (without slipping) on the x-axis while a point on the cirlce traces the cycloid. The circle is initially centered at (0,1) and has radius 1, and the initial tracing point is taken to be (0, 0). An example output is shown in the above ?gure. As in the ?gure, plot the cycloid arc black, the circle blue, and use a red dot for the tracing point. Hint: If the circle has rolled for a length of arc t = 0, the coordinates of the tracing point are (t-sin t, 1-cos t). b. Implement a MATLAB function of the form function CycloidMovie(NumHumps,NumIntervals). This function will output an animation of the circle rolling along a line while a point on the circle traces the cycloid. This function inputs two natural numbers NumHumps and NumIntervals representing the number of periods (or humps) of the cycloid and the number or frames per hump that will be used to make the animation, respectively. Use the getframe command to save frames outputted from PlotCycloidArc and the movie command to play them back together as a movie. Use the axis command to view the frames on the rectan- gle [0, 2pNumHumps] × [0, 5/2]. Also label the ticks 0, 2p, . . . , 2pNumHumps on the x axis with the strings 1See Wikipedia for more on the cycloid. 0, 2p, . . . , 2pNumHumps and do the same for 1, 2 on the y axis (see the ?gure above). Label the movie ’Cycloid Animation’. Submit MATLAB code for both parts a and b and a printout the ?gures obtained by the commands PlotCycloidArc(8.5), PlotCycloidArc(12), and CycloidMovie(3,10)

info@checkyourstudy.com Operations Team Whatsapp( +91 9911743277)