Please help me with problem 3 only I am putting problem 1 an

Please help me with problem 3 only, I am putting problem 1 and 2 for your reference only.

1) The Teacup ride at Disneyland consists of a big platter that spins, and several smaller platters on top of the big platter that also spin. Let R be the radius of the big platter, and ?1 be the angle at which the little platter sits at. Let r be the radius of the little platter, and ?2 be the angle where the teacup handle sits. Assume the big platter is centered at the origin (0,0). Given R = 6 meters, r = 1 meter, ?1 = 30 degrees, and ?2 = -25 degrees, calculate the location of the handle. For this problem, assume both angles are relative to the horizontal line shown in the diagram below.

My Script:

R=6;
r=1;
theta1=30;
theta2=-25;
x1=r*cosd(theta2);
y1=r*sind(theta2);
x2=R*cosd(theta1);
y2=R*sind(theta1);
x=x1+x2;
y=y1+y2;
fprintf(\'For the given radius and angle values, the handle is at (%0.2f,%0.2f)\ \',x,y)

2) Plot the platter and the teacup, with an X for the handle, using the radius and angle values given in 1. Use a regular plot, not a polar one (which means you need to calculate the x,y locations for all of the points on the platter and the teacup, not just the handle).

My Script:

clear;
clc;
clf;

R=6;
r=1;
theta1=30;
theta2=-25;
t=0:0.01:2*pi;
axis equal;
x0=R*cos(t);
y0=R*sin(t);
plot(x0,y0);
x1=r*cosd(theta2);
y1=r*sind(theta2);
x2=R*cosd(theta1);
y2=R*sind(theta1);
x=x1+x2; y=y1+y2;
hold on;
plot(x,y,\'*\');
theta2=0:0.01:2*pi;
x3=r*cos(theta2);
y3=r*sin(theta2);
x4=R*cosd(theta1);
y4=R*sind(theta1);
x5=x3+x4;
y5=y3+y4;
hold on;
plot(x5,y5,\'r\');

3) Plot the platter and the teacup, with an X for the handle, exactly as you did from 2, only this time with every possible combination of the teacup in 6 different positions and with the handle in 4 different positions (see figure). You do not need to include a legend. Hint 1: Use a double for loop (one for loop inside of the other). The outer for loop goes through the four handle locations, the inner for loop goes through the six teacup positions. Hint 2: Use an index variable to keep track of which subplot you’re currently using. Set that variable to 1 before the for loops, and increment it every time you finish one plot. Conciseness and efficiency count for this problem – do not have multiple copies of the drawing code.

The output should look like the self check

self check:

Remember I only need help on problem 3, 1 and 2 are already correct

Thank you!

Solution

clc;
clf;

R=6;
r=1;
theta1=30;
theta2=-25;
t=0:0.01:2*pi;
axis equal;
x0=R*cos(t);
y0=R*sin(t);
plot(x0,y0);
x1=r*cosd(theta2);
y1=r*sind(theta2);
x2=R*cosd(theta1);
y2=R*sind(theta1);
x=x1+x2; y=y1+y2;
hold on;
plot(x,y,\'*\');
theta2=0:0.01:2*pi;
x3=r*cos(theta2);
y3=r*sin(theta2);
x4=R*cosd(theta1);
y4=R*sind(theta1);
x5=x3+x4;
y5=y3+y4;
hold on;
plot(x5,y5,\'r\');

Please help me with problem 3 only, I am putting problem 1 and 2 for your reference only. 1) The Teacup ride at Disneyland consists of a big platter that spins,
Please help me with problem 3 only, I am putting problem 1 and 2 for your reference only. 1) The Teacup ride at Disneyland consists of a big platter that spins,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site