Module 4 : Trigonometry402 : Polar Graphs - Roses Rings Bracelets and HeartsS E T U PIn this project we will use the following command package. Type and execute this line before begining the project below. If you re-enter the worksheet for this project, be sure to re-execute this statement before jumping to any point in the worksheet.restart; with(plots):___________________________________________________________________________________A. Cardioids & Limacons___________________________________________________________________________________We're going to look at a variety of cardioids, which are graph of the form y = a +- b sin(theta) or y=a +- b cos(theta)and see how the relationship among the components effects the graph. COMPARING a AND bIn particular, there are three cases : |a| = |b|. |a| > |b|, and |a| < |b|. Each of these cases creates a distinctive version of the limacon.When |a| = |b|, the graph passes through the origin.This shape is known a cardioid, or heart shaped curve. Note the reference circles of radius 1 and 2.restart; with(plots):polarplot( {1,2, 1+sin(theta)}, theta = 0..2*Pi, scaling = constrained);When |a| = |b|, the graph maintains some distance between it and the origin, resulting in a rounder, puffier plot.polarplot({1,3,5, 3+2*sin(theta)},theta = 0..2*Pi, scaling = constrained);When |a| < |b|, the graph not only passes through the origin, but also part of it folds inside itself.polarplot({2,3,8, 3+5*sin(theta)},theta = 0..2*Pi, scaling = constrained);To see all of these varieties in one glance, execute the next block of commands.This shape is known a cardioid, or heart shaped curve. Note the reference circles of radius 1 and 2.display( polarplot( 8 + 8*cos(theta) , theta = 0..2*Pi, scaling = constrained, color = green, thickness = 3), polarplot({8 + a*cos(theta) \$ a = 9..15}, theta = 0..2*Pi, color = blue), polarplot({ 8 + a*cos(theta) \$ a = 1..7}, theta = 0..2*Pi, color = red));CHOICE OF TRIG FUNCTIONThere are four variations iin the format : sine, cosine, -sine, and -cosine. How does the choice of one of these effect the graph? Lets take a look at all four at once!Can you decide which graph belongs to which? Think about what values of theta make the sine and cosine maxima!polarplot({ 8 + 7*sin(theta), 8 + 7*cos(theta), 8 - 7*sin(theta), 8 -7*cos(theta)}, theta = 0..2*Pi, scaling = constrained);polarplot( 10 + sin(2*Pi*theta), theta = 0..20*Pi, color = coral, scaling = constrained);___________________________________________________________________________________B. The Rose Garden___________________________________________________________________________________We're going to look polar functions of the form f = a sin(n ) and r = a cos(n ) which are sometimes called multi-petaled roses.EVEN AND ODD NUMBER PETALSThe first distinction to be made is between when n is an even or odd number.When n is an odd number, the resulting rose has exactly n petalspolarplot( {9, 9*sin(5* theta)}, theta = 0..2*Pi, scaling = constrained);However, when n is even, the rose has 2n petals.polarplot( {5, 5*sin(6*theta)} , theta = 0..2*Pi, scaling = constrained);Try creating some other roses on your own with different numbers of petals to verify that the even/odd relationship holds.What about a single-petaled rose?Do you recognize the inner shaped of the "single petaled rose"?polarplot( {9, 9*sin(theta)}, theta = 0..2*Pi, scaling = constrained);SINE AND COSINEAlthough sin(x) and cos(x) will create an n-petaled roses inscribed in the unit circle, what is the difference between them?The graph with the sine appears tangent to the positive x axis, while the cosine version has a petal centered at the positive x axis.polarplot( {sin(3*theta), cos(3*theta)}, theta = 0..2*Pi, scaling = constrained);Here is an illustration of the same idea with even more petals.polarplot({sin(6*theta),cos(6*theta)}, theta = 0..2*Pi, scaling = constrained);AMPLITUDEIn the formula above, how does the number a, which is the amplitude in effect the graph? Here we let a =1,2,3...,12 and see how the resulting graphs lookEach different color is a different graph. You can see that they are inscribed in circles of radius 1,2,3,...,12.polarplot( {a*cos(6*theta) \$ a = 1..12}, theta = 0..2*Pi, scaling = constrained);___________________________________________________________________________________C. Valentine Curves___________________________________________________________________________________Valentine curves - there is really no such name but it seemed reasonable when you take a hybrid of rings, hearts(cardioids), and flowers(roses).polarplot( 4 + cos(6*theta) , theta = 0..2*Pi, scaling = constrained);polarplot( 4 + 3*sin(7*theta), theta = 0..2*Pi, scaling = constrained);This one wraps in on itselfpolarplot( 3 + 7*sin(3*theta), theta = 0..2*Pi, scaling = constrained);Here are whole families of similar curvespolarplot( { 6 + a*cos(6*theta) \$ a = 1..11}, theta = 0..2*Pi, scaling = constrained);polarplot( {12 + a*sin(7*theta) \$ a = 1..12}, theta = 0..2*Pi, scaling = constrained);___________________________________________________________________________________D. Familiar Shapes Disguised In Polar Form___________________________________________________________________________________There are many familiar shapes such as lines, circles, parabolas, and ellipses which can be expressed in polar form.In polar coordinates, the simplest function for r is r = constant, which makes a circle centered at the origin. Lets look at the graphs of r = 1, r = 2, ... , r = 20.This draws concentric circles of radius 1,2,...,20polarplot( {k \$ k = 1..20}, theta = 0..2*Pi, scaling = constrained);We can also draw circles not centered at the origin.polarplot( cos(theta), theta = 0..2*Pi, scaling = constrained);polarplot( cos(theta - Pi/4), theta = 0..2*Pi, scaling = constrained);...and ellipses and parabolas....polarplot( 1/(8 - 7*cos(theta)), theta = 0..2*Pi, scaling = constrained);polarplot( 1/(1 - cos(theta)), theta = 0..2*Pi);polarplot( 1/(3 + 2*sin(theta)), theta = 0..2*Pi, scaling = constrained);...even horizontal and vertical linespolarplot( 2*csc(theta), theta = -2*Pi..2*Pi);polarplot(2*sec(theta), theta = -2*Pi..2*Pi);___________________________________________________________________________________E. Spiraling Graphs___________________________________________________________________________________A basic spiral is of the form r = theta.polarplot(theta,theta = 0..4*Pi, scaling = constrained);polarplot(theta, theta = 0..40*Pi, scaling = constrained);Again, a larger range of values for theta gives more chance for the graph to wrap around.Even more interesting graphs can be created using the product of theta and a trigonometric function. As theta increases there is some sort of spiraling effect.polarplot( theta*sin(theta), theta = 0..3*Pi, scaling = constrained);polarplot( theta*sin(theta), theta = 0..100*Pi, scaling = constrained);As we increase the range of values for theta, we get even more of the same.Here is another variation.polarplot( 2*cos(theta) + sqrt( abs( 4*cos(theta)^2 -3)), theta = 0..2*Pi, scaling = constrained, numpoints = 1000);___________________________________________________________________________________F. How To Build A Better Rose___________________________________________________________________________________The so-called 'roses' above, really bore more of a resemblance to daisies. Here is something that looks a little more rose-like.polarplot( theta + 2*sin(2*Pi*theta), theta = 0..12*Pi,color = red, thickness = 2 );Here are some other beautiful botanicals.polarplot( theta + 3*sin(4*theta) - 5*cos(4*theta), theta = 0..12*Pi,color = violet, thickness = 2 );polarplot( theta + 2*sin(2*Pi*theta) + 4*cos(2*Pi*theta), theta = 0..12*Pi,color = green, thickness = 2 , numpoints = 1000);polarplot( 2*cos(theta) + sqrt( abs( 4*cos(theta)^2 -3)), theta = 0..2*Pi,scaling = constrained, numpoints = 1000 );polarplot( cos(.95*theta), theta = 0..40*Pi,scaling = constrained, color = brown);