PI_6_2_a_class - (* Content-type: application/mathematica *

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

View Full Document Right Arrow Icon
(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: [email protected] phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 53695, 1624]*) (*NotebookOutlinePosition[ 54601, 1655]*) (* CellTagsIndexPosition[ 54557, 1651]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ (*Problem I.6.2 (a) *) Apply[Clear,Names[\"Global`*\"]]; Off[General::spell]; Off[General::spell1];
Background image of page 1

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

View Full DocumentRight Arrow Icon
(* Input data *) AB=0.08; BC=0.21; CD=0.12; AD=0.19; \[Phi] = 120 \[Pi]/180; n = 2400.;(*rpm*) \[Omega] = n \[Pi]/30;(*rad/s*) (* Position of joint A *) xA = yA = 0; (* Position of joint D *) xD = -AD ; yD = 0 ; (* Position of joint B *) xB = AB Cos[\[Phi]] ; yB = AB Sin[\[Phi]] ; (* Position of joint C *) eqCI =(xc-xB)^2+(yc-yB)^2-BC^2 == 0; eqCII= (xc-xD)^2+(yc-yD)^2-CD^2 == 0; solutionC=Simplify[Solve[{eqCI,eqCII},{xc,yc}]]; (* Two solutions for C *) xC1 = xc/.solutionC[[1]]; yC1 = yc/.solutionC[[1]]; xC2 = xc/.solutionC[[2]]; yC2 = yc/.solutionC[[2]]; (* Select the correct position for C *) If [yC1>0,xC=xC1;yC=yC1,xC=xC2;yC=yC2]; markers=Table[{Point[{0,0}], Point[{xB,yB}], Point[{xC,yC}], Point[{xD,yD}], Point[{-0.05,0}]}]; name=Table[{Text[\"A\",{0,0},{2,-1}], Text[\"B\",{xB,yB},{1,-1}], Text[\"C\",{xC,yC},{-1,2}], Text[\"D\",{xD,yD},{-2,-1}]}]; graph=Graphics[{ {RGBColor[1,0,0],Line[{{0,0},{xB,yB}}]}, {RGBColor[0,1,0],Line[{{xB,yB},{xC,yC}}]}, {RGBColor[0,0,0],Line[{{xC,yC},{xD,yD}}]}, {RGBColor[0,1,1],PointSize[0.01],markers},{name}}]; Show [ Graphics [ graph ] , \t PlotRange -> { All , All } , \t Frame -> True, \t AxesOrigin -> {xA,yA}, \t FrameLabel -> {\"x\",\"y\"}, \t Axes -> {True,True},
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 08/29/2011 for the course MECH 2120 taught by Professor Gabale,a during the Summer '08 term at Auburn University.

Page1 / 30

PI_6_2_a_class - (* Content-type: application/mathematica *

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