Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 1 0 2 Figure 1: PlotCycloidArc(8.5) Math98 HW4 The cylcoid is the plane curve traced out by a point on a circle as the

2 1 0 2 Figure 1: 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 figure. As in the figure, 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 (tsin t, 1cos 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 rectangle [0, 2NumHumps] [0, 5/2]. Also label the ticks 0, 2, . . . , 2NumHumps on the x axis with the strings 1 See Wikipedia for more on the cycloid. 0, 2, . . . , 2NumHumps and do the same for 1, 2 on the y axis (see the figure above). Label the movie 'Cycloid Animation'. Submit MATLAB code for both parts a and b and a printout the figures obtained by the commands PlotCycloidArc(8.5), PlotCycloidArc(12), and CycloidMovie(3,10)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discovering Advanced Algebra An Investigative Approach

Authors: Jerald Murdock, Ellen Kamischke, Eric Kamischke

1st edition

1559539844, 978-1604400069, 1604400064, 978-1559539845

More Books

Students also viewed these Mathematics questions