ps3solnsSp06

ps3solnsSp06 - %Engineering 6, Spring 2006, Problem 3.1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
%Engineering 6, Spring 2006, Problem 3.1 Solution %(Circles and triangles) %Turn off extra line breaks in display format compact ; %Clear command window and variables clc; clear; %We know the length of sides C1-C2 and C1-C4, so if we can find the %angle between them (call it theta), then we can use the law of cosines to %find the length C2-C4, which is what is asked for. %We know all three sides of triangles C1-C2-C3 and C1-C3-C4. We can %therefore use the law of cosines to calculate the angle phi1 between %sides C1-C2 and C1-C3, and the angle phi2 between sides C1-C3 and %C1-C4. Then phi1 + phi2 is the angle theta. %Define the radii values (in mm) R1 = 16; R2 = 6.5; R3 = 12; R4 = 9.5; %Calculate the lengths of the various sides needed sideC1C2 = R1 + R2; sideC1C3 = R1 + R3; sideC1C4 = R1 + R4; sideC2C3 = R2 + R3; sideC3C4 = R3 + R4; %Use law of cosines to calculate phi1 and phi2 phi1 = acos((sideC1C2^2 + sideC1C3^2 - sideC2C3^2)/(2*sideC1C2*sideC1C3)); phi2 = acos((sideC1C3^2 + sideC1C4^2 - sideC3C4^2)/(2*sideC1C3*sideC1C4)); %Calculate theta theta = phi1 + phi2; %Use law of cosines to calculate length of side C2-C4 sideC2C4 = sqrt(sideC1C2^2 + sideC1C4^2 - 2*sideC1C2*sideC1C4*cos(theta)); %Display result fprintf( 'The distance between the centers C2 and C4 is %.2f mm\n' ,sideC2C4); Displayed results: The distance between the centers C2 and C4 is 33.51 mm
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
%Engineering 6, Spring 2006, Problem 3.2 Solution
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.

Page1 / 5

ps3solnsSp06 - %Engineering 6, Spring 2006, Problem 3.1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online