Skip to main content

Matter And Interactions 5Th Chabay Solutions Manual

Page 1


Solutions Manual for Matter and Interactions 5th Edition by Chabay, Sherwood, Titus, Spicklemire

ISBN: 9781119805151

Chapter1 InteractionsandMotion

1.1-Q-01

Byinspection,youcanseethatthenumberofneutronsincreasesfasterastheatomicnumberincreases.

1.2-Q-01

B,C,D,E,andFshowevidenceofaninteraction.InthecaseofB,speedchanges(andthereforevelocitychanges). InthecaseofCthroughF,directionofmotionchanges(andthereforesodoesvelocity).InthecasesofA,velocityis constantandthereforenonetinteractionisindicated.

1.2-Q-02

Hereisaqualitativedescriptionofthediagram.Duringthefirst4minutes,thedotsareevenlyspacedsincethe car’sspeedisconstant.Duringthenext4minutes,thedotsaresuccessivelyfartherapartsincethecar’sspeedincreases duringeachminute.Duringthenext4minutes,thedotsareevenlyspaced(approximatelytwiceasfarapartasduring thefirst4minutes)sincethecar’sspeedisnowconstantonceagain(butadifferentconstantthanbefore).Duringthe

CHAPTER1.INTERACTIONSANDMOTION

last4minutes,thedotsaresuccessivelyclosertogethersincethecar’sspeedisdecreasing.Thedotsmustgetcloser togetherfasterthantheygotfartherapartwhenthecarfirstacceleratedbecausethespeedisdecreasingatagreaterrate thanitincreasedbefore.

1.3-Q-01

Reasons1,3,and4aretrue.Reason2isirrelevant.Reason5iscorrectonlyifoneassumesthatthespaceship isindeedeffectivelyinfinitelyfarawayfromallothersourcesofgravitationalattractionandisthusreallyonlyan approximation,butaverygoodapproximation.

1.3-Q-02

Observers2,4mayseesomethingthatappearstoviolateNewton’sfirstlawbecausetheyareinreferenceframes thatareacceleratingrelativetoEarth.Thesearenotinertialreferenceframes,andNewton’sfirstlawdoesn’tholdfor suchnoninertialframes.Observers1,3,and5haveconstantvelocity(magnitudeanddirection,relativetoEarth)and arethusininertialreferenceframessotheywillseeNewton’sfirstlawasnotbeingviolated.

1.3-Q-03

Whileyouarewalkingandholdingthebook,theballmoveswithaconstantvelocity(relativetoanobserverwhois standingatrest).Whenyoustop,theballcontinuesmovingwithaconstantvelocityasitrollsacrossthebookbecause thereisnonetforceontheballtochangeitsvelocity,untilitrollsoffthebookandthenthenetforceontheballisthe gravitationalforcebyEarthwhichchangesitsvelocityasitfalls.

1.3-Q-04

Becausenothinginteractswiththespaceship,itwillcontinueinastraightlineandataconstantspeedof 1×104 m∕s.

1.4-Q-01

a,c,anddarevectors.bisascalar.

1.9-Q-01

Statements1and5arecorrect.Statements2,3,and4areincorrect.

1.10-Q-01

(a) �� isascalarquantity.

(b) Theminimumpossiblevalueof �� is1.

(c) Theminimumvalueisreachedwhentheobject’sspeedislow,specificallywhenitiszero.

CHAPTER1.INTERACTIONSANDMOTION

(d) Thereisnomaximumvaluefor �� .

(e) �� becomeslargewhenanobject’sspeedishigh.

(f) Theapproximation �� ≈1 applieswhenanobject’sspeedislow.

1.10-Q-02

Theapproximateformulaformomentummaybeusedfor(1),(2),(3)and(5)becauseinallofthesecases,the objectorparticleismovingwithaspeedmuchlessthan 3×108 m∕s.Incase(5),theelectron’sspeedisone-hundredth thespeedoflight.Ifahighlyprecisecalculationisnotneeded,theneveninthiscase,theapproximateformulafor momentummaybeused.Asaruleofthumb,ifanobject’sspeedislessthanabout10%ofthespeedoflight,thenthe approximateformulamaybeused,exceptincaseswherehighprecision(i.e.manysignificantfigures)isneeded.

1.4-P-01

Addthevectorcomponents.

1.4-P-02

(a) Themagnitudeofavectorisindicatedbythelengthofthearrowrepresentingthevector.Thearrowsthathave thesamemagnitudeas #‌ a havethesamelengthas #‌ a .Countinggridlinesshowsthat | #‌ a | =10units(Notethatwe don’tknowwhattheunitis,anditdoesn’tmatterforansweringthisquestion.).So #‌ b , #‌ c , #‌ d , #‌ e ,and #‌ f havethe samemagnitudeas #‌ a .You’llneedtousethePythagoreantheoremtoprovethisfor #‌ b and #‌ d .

(b) Equalvectorsmusthaveboththesamemagnitudeandthesamedirection.So #‌ a , #‌ c ,and #‌ f aretheonlyones meetingthesecriteria.

1.4-P-03

1.4-P-04

#‌ a= ⟨5, 3, 0⟩ m #‌ b= ⟨6, −9, 0⟩ m

c= ⟨−10, 3, 0⟩ m

CHAPTER1.INTERACTIONSANDMOTION

1.4-P-05

Extractcomponentsbycountinggridlines.

(a) #‌ a = ⟨−4, −3, 0⟩

(b) #‌ b = ⟨−4, −3, 0⟩

(c) Thestatementistrue. #‌ a and #‌ b havethesamecomponents,sothetwovectorsmustbeequivalent.

(d) #‌ c = ⟨4, 3, 0⟩

(e) Thestatementistrue.Eachcomponentof #‌ c istheoppositeofthecorrespondingcomponentof #‌ a sotheactual vectorsareopposites.

(f) #‌ d = ⟨−3, 4, 0⟩

(g) Thestatementisfalsebecausecorrespondingcomponentsof #‌ c and #‌ d arenotopposites.

1.4-P-06

(a) Seedrawing.

CHAPTER1.INTERACTIONSANDMOTION

(b) Seedrawing.

1.4-P-07

1.4-P-08

(a) #‌ d= ⟨−6, 3, 2⟩ m (b) #‌ e=− #‌ d=−⟨−6, 3, 2⟩ m= ⟨+6, −3, −2⟩ m

(c) Takethepositionofthevector’stailandaddthevector #‌ d

(d) Takethepositionofthevector’stailandaddthevector

CHAPTER1.INTERACTIONSANDMOTION

1.4-P-09

Call ̂ n thedirectionofanarbitraryvector,thenforthefirstvectorwehave

andforthesecondvectorwehavethefollowing.

Thesedirectionsarethesame!Howcanthatbe?They’rethesamebecauseonevectorisamultipleoftheother. ⟨3, 3, 3⟩ = 3 2 ⟨2, 2, 2⟩.Ofcourseyoucouldalsowrite ⟨2, 2, 2⟩ = 2 3 ⟨3, 3, 3⟩.Whentwovectorsaremultiplesofeach other,theirdirectionsmustbeeitherparallel(ifrelatedbyapositivemultiple)oropposite(ifrelatedbyanegative multiple).

1.4-P-10

(a) Seefigure.

(b) Seefigure.

CHAPTER1.INTERACTIONSANDMOTION

(c) Themagnitudeof 2 #‌ f willbetwicethemagnitudeof #‌ f

(d) Thedirectionof 2 #‌ f isthesameasthatof #‌ f

(e) Seefigure.

Plain Graph Paper from http://incompetech.com/graphpaper/plain/

(f) Themagnitudeof #‌ f∕2 ishalfthatof #‌ f .

(g) Thedirectionof #‌ f∕2 isthesameasthatof #‌ f

(h) Yes,multiplyingavectorbyascalarchangesthemagnitude,assumingthescalarisneither0nor ±1 (i)

Plain Graph Paper from http://incompetech.com/graphpaper/plain/

Notethatyoumustnotattempttosolvefor �� bydividingbothsidesby #‌ f becausedividingbyavectorisnot defined.Instead,whatyouarereallydoinghereissolvingtheequationbyvisualinspection.Youmayhavenever thoughtofthisasalegitimatewayofsolvinganequation,butthisisavectorequationandtherulesofordinary algebradonotalwaysapplytovectorequations.Untilyoulearnhowtocorrectlysolvevectorequationsusingthe rulesofvectoralgebra(hopefullyyourinstructorwillshowyou),visualinspectionisaperfectlylegitimatewayof solvingthem.

Free
Free

CHAPTER1.INTERACTIONSANDMOTION

1.4-P-11

Theconceptofwritingavectorasamagnitudemultiplyingadirectionisimportantandwillappearmanytimesin laterchapters.Italsoforcesyoutothinkabouteachpart,magnitudeanddirection,individually.

1.4-P-12

(a) Seefigure.

(d) Seefigure.

CHAPTER1.INTERACTIONSANDMOTION

1.4-P-13

CHAPTER1.INTERACTIONSANDMOTION

(b)

Notethat

1.4-P-15

Onewayofthinkingaboutthearrowrepresentationofavectoristhatthecomponentstellyouhowtogetfromthe tailtothehead.Thisisequivalenttothepositionoftheheadrelativetothepositionofthetail.

(a)

1.4-P-16

Ahelpfulhintistorememberthatthenotation #‌ r AB is thepositionofArelativetoB,whichisequivalenttosaying standatBandtellmehowtogettoA.Thenyouhavesimply #‌ r AB = #‌ r A #‌

B ,withthesubtractiondoneintheorder inwhichtheindicesappear. (a)

1.4-P-17

Ahelpfulhintistorememberthatthenotation #‌ r AB is thepositionofArelativetoB,whichisequivalenttosaying standatBandtellmehowtogettoA.Thenyouhavesimply

,withthesubtractiondoneintheorder inwhichtheindicesappear.

CHAPTER1.INTERACTIONSANDMOTION

(a)

1.4-P-18

Nounitisgiven,soassumeanarbitraryunitinyourowncalculation.

CHAPTER1.INTERACTIONSANDMOTION

1.4-P-20

Bysymmetry,thediagonalmakesthesameanglewitheachcoordinateaxis,soitdoesn’tmatterwhichoneweuse. Let’susethe ��-axis.

1.6-P-01

(b) Averagespeedisnotalwaysequaltothemagnitudeofaveragevelocityunlessthemotionislinear.Wecanproceed withthisassumption.

1.6-P-02

CHAPTER1.INTERACTIONSANDMOTION

1.6-P-03

��1 =200s∶ ̂ v= ⟨1, 0, 0⟩

��2 =300s∶ ̂ v= ⟨cos (45 ◦ ) , 0, cos (45 ◦ )⟩

Usethepositionupdateequationforeachtimeinterval.

=200s∶

⟨0, 0, 0⟩ + (2m∕s) ⟨1, 0, 0⟩ (200s)

⟨400, 0, 0⟩ m+ (2m∕s) ⟨cos (45 ◦ ) , 0, cos (45 ◦ )⟩ (300s)

⟨824, 0, 424⟩ m

⟨824, 0, 424⟩ m+ (2m∕s) ⟨cos (60 ◦ ) , 0, cos (30 ◦ )⟩ (150s) = ⟨974, 0, 684⟩ m

(b) Thetotaldurationoftimeis 200s+300s+150s=650s

CHAPTER1.INTERACTIONSANDMOTION

1.6-P-04

CHAPTER1.INTERACTIONSANDMOTION

Youcannotdividevectors,so

Youmayuse

Oryoumaywritethevelocityincomponentformanduseanyoneofthecomponents.Forinstance,

Thismethodgives

CHAPTER1.INTERACTIONSANDMOTION

−380m−200m −20m∕s =29s

=100m∕s (d)

⟨−20, −90, 40⟩ m∕s 100 5m∕s

⟨−0.2, −0.9, 0.4⟩

(a) From �� =6 3s to 6 8s:

�� =6 8s−6 3s =0 5s

r i = ⟨−3 5, 9 4, 0⟩ m

r f = ⟨−1 3, 6 2, 0⟩ m 1-16

1.6-P-07

CHAPTER1.INTERACTIONSANDMOTION

(b) From �� =6.3s to 7.3s:

(c) Thebestestimatefor #‌ v at �� =6 3s istheaveragevelocityduringthesmallestpossibletimeintervalthatincludes �� =6 3s.Thus,thetimeintervalfrom �� =6 3s to 6 8s givesthebestpossibleestimateinthiscaseforthe instantaneousvelocityat �� =6 3s

(d) Assumethatthebee’saveragevelocitybetween �� =6 3s and 6 33s isapproximatelyconstant.From �� =6 3s to 6 33s:

�� =6 33s−6 3s =0 03s

CHAPTER1.INTERACTIONSANDMOTION

Wearegiventhelater(final)position,andweneedtocalculatetheearlier(initial)position.Thetimeintervalis2 s.Usethedefinitionofaveragevelocity.

1.7-P-02

1.7-P-03

CHAPTER1.INTERACTIONSANDMOTION

(b) Now,forthistimeintervalof 5×10−6 s,theinitialpositionoftheelectronisitspositionattheendoftheprevious 2×10−6 s interval.

�� =5×10 −6 s

⟨

, 9×10 5 ,

5

r f = #‌ r

+

v��

⟨

02, 1 84, −0

⟩

(⟨

,

5 ,

5⟩ m∕s)(5×10 −6 s) = ⟨0 02, 1 84, −0 86⟩ m+ ⟨0, 4 5, −2⟩ m = ⟨0 02, 6 34, −2 86⟩ m

Anotherwaytosolveitistoconsiderthetotaltimeintervalof 2×10−6 s+5×10−6 s=7×10−6 s.Inthiscase, #‌ r i istheelectron’spositionatthebeginningofthe 2×10−6 s interval.

#‌ r i = ⟨0.02, 0.04, −0.06⟩ m Δ�� =5×10 −6 s

#‌ r f = ⟨0.02, 0.04, −0.06⟩ m+ (⟨0, 9×10 5 , −4×10 5⟩ m∕s)(7×10 −6 s)

= ⟨0.02, 0.04, −0.06⟩ m+ ⟨0, 6.3, −2.8⟩ m

= ⟨0.02, 6.34, −2.86⟩ m

whichagreeswiththesameanswerobtainedusingthe 5×10−6 s timeinterval.

1.7-P-04

(a) Assumethathisvelocityisinthe +�� direction.Then

�� = Δv �� Δ�� = #‌ v fx #‌ v ix

CHAPTER1.INTERACTIONSANDMOTION

�� = 70m∕s−140m∕s 0 6 =−117m∕s2 | #‌ a | ≈−120m∕s2

(b) Since �� ≈10m∕s2,then | #‌ a | ≈120∕10=12 g’s.

1.7-P-05 #‌ r i = ⟨7, 21, −17⟩ m Δ�� =3s

v avg = ⟨−11, 42, 11⟩ m∕s �� f =?

r f = #‌ r i + #‌ v avg Δ�� = ⟨7, 21, −17⟩ m+ (⟨−11, 42, 11⟩ m∕s)(3s) = ⟨7, 21, −17⟩ m+ ⟨−33, 126, 33⟩ m = ⟨−26, 147, 16⟩ m

So �� f =147m

1.7-P-06 #‌ r i = ⟨0 06, 1 03, 0⟩ m

v avg = ⟨17, 4, 6⟩ m∕s Δ�� =0 7s

Usethepositionupdateequation.

r f = #‌ r i + #‌ v avg Δ�� = ⟨0 06, 1 03, 0⟩ m+ (⟨17, 4, 6⟩ m∕s)(0 7s) = ⟨11 96, 3 83, 4 2⟩ m

CHAPTER1.INTERACTIONSANDMOTION

Thus,theball’sheightafteratimeintervalof0.7sis3.83m.

1.7-P-07

(a)

(b) From �� =1 0s to �� =2 0s,assumingittravelswithaconstantvelocityof ⟨22 3, 26 1, 0⟩ m∕s,

(c) #‌ r atpointCis ⟨40.1, 38.1, 0⟩ m whichisnotthesameaswhatwepredicted.Weassumedconstantvelocitywhen makingourprediction;however,inrealitythevelocitywasnotconstant,butwasdecreasinginboththexand ydirections.Anapproximationofconstantvelocityisonlyvalidforsmalltimeintervals.Forthisprojectile, Δ�� =1 0s wasnotasmallenoughtimeintervaltoreasonablyassumeconstantvelocity.

1.7-P-08

CHAPTER1.INTERACTIONSANDMOTION

Assumethatthebutterflytravelswithaconstantvelocity.Calculateitsvelocity.

Nowcalculateitspositionat �� =8 5s,ifitstartsat �� =6 0s

1.8-P-01

(a) 3

(b) 6

(c) 1

(d) 5

(e) 2and4

1.8-P-02

(a) 4

(b) 1

(c) 6

(d) 3

(e) 7

CHAPTER1.INTERACTIONSANDMOTION

1.8-P-03

Graph1

1.8-P-04

Graphs2and4

1.8-P-05

Graphs2,3,4,and5

1.8-P-06

Graphs3,4,and6

1.9-P-01

| #‌ v | <<�� therefore

1.9-P-02

#‌ p | =

| #‌ v | = (0.155kg)(40m∕s) =6.2kg m∕s

Note: | #‌ v | <<�� �� =0 4kg #‌ v= ⟨38, 0, −2⟩ m∕s

p= ��

v = (0.4kg)(⟨38, 0, −2⟩ m∕s) = ⟨15.2, 0, −10.8⟩ kg m∕s | #‌ p | = √(15.2)2 + (0)2 + (−10.8)2 kg m∕s =18 6kg m∕s

1.9-P-03

Note: #‌ v <<��

1.9-P-04

Note: #‌ v <<��

1.9-P-05

1.9-P-06

CHAPTER1.INTERACTIONSANDMOTION

�� =1000kg

| #‌ v | = (500mph) ( 1m∕s 2 2369mph ) =224m∕s

#‌ p | =

| #‌ v | = (1000kg)(224m∕s) =2 24×10 5 kg ⋅ m∕s

�� =155g =0 155kg

| #‌ v | = (100mph) ( 1m∕s 2 2369mph ) =44 7m∕s

#‌ p |

v | = (0 155kg)(44 7m∕s) =6 93kg ⋅ m∕s

CHAPTER1.INTERACTIONSANDMOTION

1.9-P-07

(a) Drawasketchofthesituation,liketheoneshowninthefigurebelow..

Sketchthechangeinmomentumvectorbydrawingtheinitialandfinalmomentumvectorstailtotailanddrawing thechangeinmomentumfromtheheadoftheinitialmomentumtotheheadofthefinalmomentum,asshownin thefigurebelow..

CHAPTER1.INTERACTIONSANDMOTION

Thechangeinmomentumisinthe �� directionwhichisconsistentwiththepicture. (b)

Note |Δ #‌ p | ≠ Δ| #‌ p |

1.9-P-08

Theball’svelocityinthe �� and �� directioniszerobeforeandafterthebounce.Inthe ��-direction, v ���� =+5m∕s and v ���� =−5m∕s.Thechangeinvelocityduetothecollisionis

CHAPTER1.INTERACTIONSANDMOTION

Usingthelow-speedapproximationformomentum,then

1.9-P-09

Ithelpstosketchthevelocityvectorforthebasketballbeforeandafterithitsthefloor.

Theangleofthevectorwiththe +�� axisis 30 ◦ ,andtheanglewiththe +�� axisis 60 ◦ .Thevector’scomponents canbeeasilycalculatedusingthecosineofeachoftheseangles.Thus

Aftertheballbounces,

.Thechangeinvelocityis

Usingthelowspeedapproximationformomentum,thechangeinmomentumis

1.9-P-10

CHAPTER1.INTERACTIONSANDMOTION

Accelerationisavector, #‌a=Δ #‌ v∕Δ�� = ( #‌ v f #‌ v i ) ∕Δ��.Notethatingeneral, #‌ a

��.There isaveryimportantdifferenceinthesetwoequations(oneofwhichiscorrect).Therefore,assumethattherocketis travelingvertically,andexpressthegivenspeedoftherocketasavelocityvectorinthe +�� direction.

Theaccelerationis

Since �� ≈10m∕s2,thentheaccelerationoftherocketisapproximately 14∕10=1 4 g’s.

1.9-P-11

Ingoingallthewayaround,inonerevolution, #‌ p f isthesameas #‌ p i .Thus, |Δ #‌ p | =0.

Ingoinghalfarevolution(180 ◦ ),sketch #‌ p i and #‌ p f atoppositesidesofthecircle,asshownintheexampleinthe figurebelow.(Youmaychooseanytwopointsonthecircle,aslongastheyareonoppositesidesofthecircle.Also, youmayassumeeithercounterclockwiseorclockwiserotation.Yourchoiceofpointsordirectionofrotationdoesnot affectthefinalanswerforthemagnitudeofthechangeinmomentum.)

rotation

Tofindthechangeinmomentum,sketch #‌ p f and #‌ p i tailtotail. Δ #‌ p isthevectorfromtheheadof #‌ p i tothehead of #‌ p f .Seethefigurebelow..

CHAPTER1.INTERACTIONSANDMOTION

Asyoucansee, Δ #‌ p=2 #‌ p f .Thus,

CHAPTER1.INTERACTIONSANDMOTION

| | | Δ #‌ p BC | | | isgreatestbecauseboth Δp �� and Δp �� aregreatest(inmagnitude)fortheintervalfromBtoC.

1.9-P-13

Since | #‌ v | <<��,then #‌ p≈ �� #‌ v .

�� =3kg

#‌ p= ⟨60, 150, −30⟩ kg m∕s

v≈

p �� = ⟨60, 150, −30⟩ kg ⋅ m∕s 3kg ≈ ⟨20, 50, −10⟩ m∕s

1.9-P-14

(b) Tosketch Δ #‌ p BC ,sketch #‌ p C tail-to-tailatthelocationof #‌ p B andsketch Δ #‌ p BC fromtheheadof #‌ p C totheheadof #‌ p B .Dothisforeachoftheothervectorsaswell.Theresultsareshowninthefigurebelow.. pC

�� =1500kg

#‌ r i = ⟨300, 0, 0⟩ m

#‌ p= ⟨45000, 0, 0⟩ kg m∕s Δ�� =10s #‌ r f =?

Since | #‌ v | <<��,then #‌ p≈ �� #‌ v . #‌ v≈ #‌ p �� = ⟨45000, 0, 0⟩ kg ⋅ m∕s 1500kg ≈ ⟨600, 0, 0⟩ m∕s

CHAPTER1.INTERACTIONSANDMOTION

Tofindthefinalposition,usethepositionupdateequation.

r f = #‌ r i + #‌ vΔ��

⟨300, 0, 0⟩ m+ (⟨600, 0, 0⟩ m∕s)(10s)

⟨600, 0, 0⟩ m

1.9-P-15

r i =? Since | #‌ v | <<��,then #‌ p≈ �� #‌ v

Inthiscasewewanttofindtheinitialposition(i.e.thepositionbeforethe 0 4s timeinterval).Usetheposition updateequationandsolvefortheinitialposition.

Sincethevelocitywasinthe ��-directiononly,thenthe ��-positionand ��-positiondidnotchange.

1.9-P-16

�� =400kg

#‌ r i = ⟨0, 3×10 4 , −6×10 4⟩ m #‌ p= ⟨6×10 3 , 0, −3 6×10 3⟩ kg ⋅ m∕s

�� =2min=120s

#‌ r f =?

Since | #‌ v | <<��,then #‌ p≈ �� #‌ v .

Tofindthefinalposition,usethepositionupdateequation.

1.10-P-01

1.10-P-02

CHAPTER1.INTERACTIONSANDMOTION

CHAPTER1.INTERACTIONSANDMOTION

1.10-P-03

1.10-P-04

54×10 −17 kg ⋅ m∕s

(a)

(b) Since | #‌ v | isnotsmallcomparedto ��

CHAPTER1.INTERACTIONSANDMOTION

1.10-P-05

CHAPTER1.INTERACTIONSANDMOTION

CHAPTER1.INTERACTIONSANDMOTION

Since #‌ p isproportionalto #‌ v ,thentheirunitvectors ̂ p and ̂ v arethesame.Thus,

CHAPTER1.INTERACTIONSANDMOTION

1.11-P-01

Lines8-12arenewlinesofcodewhichwereaddedtothecodegiveninSection1.11.2.Theprogramwaswritten toruninWebVPython.

1 WebVPython3.2

2

3 box(pos=vector(0,0,0),length=2,width=2,height=2,opacity=0.4)

4 sphere(pos=vector(0,0,0),color=color.yellow,radius=0.2)

5 sphere(pos=vector( 1, 1,1),radius=0.2,color=color.red)

6 sphere(pos=vector( 1, 1, 1),radius=0.2,color=color.red)

7 sphere(pos=vector( 1,1, 1),radius=0.2,color=color.red)

8 sphere(pos=vector( 1,1,1),radius=0.2,color=color.red)

9 sphere(pos=vector(1,1,1),radius=0.2,color=color.red)

10 sphere(pos=vector(1,1, 1),radius=0.2,color=color.red)

11 sphere(pos=vector(1, 1,1),radius=0.2,color=color.red)

12 sphere(pos=vector(1, 1, 1),radius=0.2,color=color.red) Ascreencaptureoftheoutputisshownbelow.

1.11-P-02

Thisprogramisonepossiblesolutiontotheproblem.

1 WebVPython3.2

2

3 #lengthofthebox

4 a=1

5

6 #width

7 w=a/50

8 9 #xaxis

10 box(pos=vector(0,0,0),size=vec(a,w,w),color=color.yellow)

11 #yaxis

12 box(pos=vector(0,0,0),size=vec(w,a,w),color=color.magenta)

13 #zaxis

14 box(pos=vector(0,0,0),size=vec(w,w,a),color=color.cyan)

Ascreencaptureoftheoutputoftheprogramisshownbelow.

CHAPTER1.INTERACTIONSANDMOTION

1.11-P-03

Examinetheprogrambelow.It’susefultodefinevariablesforthelengthofthesideofabox,thelengthofanaxis, andthenumberofboxesalongtheaxis.Thespacebetweenboxescanbecalculatedfromthelengthoftheaxisandthe numberofboxesalongtheaxis.

1 WebVPython3.2

2

3 #lengthoftheaxis

4 a=1

5

6 #widthofabox

7 w=a/100

8

9 #Numberofboxesonanaxis

10 n=20

11

12 #xlocationofabox

13 x= a/2

14

15 #spacebetweenboxes

16 dx=a/(n 1)

17

18 #boxesonx axis

19 while x<a/2:

20 box(pos=vec(x,0,0),size=vec(w,w,w),color=color.yellow)

21 x=x+dx

22

CHAPTER1.INTERACTIONSANDMOTION

23 #ylocationofabox

24 y= a/2

25

26 #spacebetweenboxes

27 dy=dx

28

29 #boxesony axis

30 while y<a/2:

31 box(pos=vec(0,y,0),size=vec(w,w,w),color=color.magenta)

32 y=y+dy

33

34 #zlocationofabox

35 z= a/2

36

37 #spacebetweenboxes

38 dz=dx

39

40 #boxesonz axis

41 while z<a/2:

42 box(pos=vec(0,0,z),size=vec(w,w,w),color=color.cyan)

43 z=z+dz

Theoutputisshownbelow.

Note:therearemanywaystosolvethisproblem.Inthesampleprogrambelow,wedraw �� boxesonanaxis.So forthreeaxes,our while looprequires 3�� iterations.Usingan if statement,wechecktoseehowmanyboxeshave beendrawn,andweusethisvaluetodeterminetheaxisonwhichwewilldrawthenextbox.It’simportanttoresetthe valueof �� forthepositionofthefirstboxwheneverstartinganewaxis.

1 WebVPython3.2

2

3 #lengthoftheaxis

4 a=1

5

6 #widthofabox

7 w=a/100

8

9 #Numberofboxesonanaxis

10 n=20

11

12 #xlocationofabox

13 x= a/2

14

15 #spacebetweenboxes

16 dx=a/(n 1)

17

18 #Thereisatotalof3*nboxes.

19 #Afternboxesonthex axis,thencreateboxesonthey axis.

20 #Afteranothernboxesonthey axis,thencreateboxesonthez axis

21 boxnum=1

22 while boxnum<3∗n+1:

23 #xaxis

24 if (boxnum<n+1):

25 box(pos=vec(x,0,0),size=vec(w,w,w),color=color.yellow)

26 #yaxis

27 elif (boxnum<2∗n+1 and boxnum>n):

28 box(pos=vec(0,x,0),size=vec(w,w,w),color=color.magenta)

29 #zaxis

30 else :

31 box(pos=vec(0,0,x),size=vec(w,w,w),color=color.cyan)

32 #havetoresetthevalueofxto a/2whenstartinganewaxis

33 if (boxnum==n or boxnum==2∗n):

34 x= a/2

35

36 x=x+dx

37 boxnum=boxnum+1

(a) Assumethattheunitofdistanceismandtheunitoftimeiss.

1. Theinitialvelocityoftheparticleis ⟨0 5, 0, 0 5⟩ m∕s

2. Wewillassumethat“infront”and“behind”referstothe �� direction.Theboxisinitiallyat �� =−1m,andthe particleisinitiallyat �� =−5m.Thus,theparticleisinitiallybehindthebox.

3. Thislineupdatesthepositionoftheparticle. particle.pos=particle.pos+v ∗ delta_t

4. Thetimestepis 0 05s

5. Theparticlehasaconstantvelocity.Thereisnocodethatcausesthevelocityoftheparticletochange.

(b) Theanswersinpart(a)arecorrect.

1.11-P-04

CHAPTER1.INTERACTIONSANDMOTION

(c) Changetheinitialpositionoftheparticle,andchangethevelocityoftheparticle.Here’sanexampleprogramthat solvestheproblem.

1 WebVPython3.2

2

3 box(pos=vector(0,0, 1),size=vec(5,5,0.5),

4 color=color.red,opacity=0.4)

5 particle=sphere(pos=vector(5,0,2),

6 radius=0.3,color=color.cyan,

7 make_trail=True)

8 v=vector( 0.5,0,0)

9 delta_t=0.05

10 t=0

11 while t<20:

12 rate(100)

13 particle.pos=particle.pos+v ∗ delta_t

14 t=t+delta_t

Hereistheoutput.

(a) Assumethattheunitofdistanceismandtheunitoftimeiss.

1. Theinitialvelocityoftheparticleis ⟨0 5, 0, 0 5⟩ m∕s

2. Wewillassumethat“infront”and“behind”referstothe �� direction.Theboxisinitiallyat �� =−1m,andthe particleisinitiallyat �� =−5m.Thus,theparticleisinitiallybehindthebox.

3. Thislineupdatesthepositionoftheparticle.

particle.pos=particle.pos+v ∗ delta_t

1.11-P-04

CHAPTER1.INTERACTIONSANDMOTION

4. Thetimestepis 0.05s.

5. Theparticlehasaconstantvelocity.Thereisnocodethatcausesthevelocityoftheparticletochange.

(b) Theanswersinpart(a)arecorrect.

(c) Changetheinitialpositionoftheparticle,andchangethevelocityoftheparticle.Here’sanexampleprogramthat solvestheproblem.

1 WebVPython3.2

2

3 box(pos=vector(0,0, 1),size=vec(5,5,0.5),

4 color=color.red,opacity=0.4)

5 particle=sphere(pos=vector(5,0,2),

6 radius=0.3,color=color.cyan,

7 make_trail=True)

8 v=vector( 0.5,0,0)

9 delta_t=0.05

10 t=0

11 while t<20:

12 rate(100)

13 particle.pos=particle.pos+v ∗ delta_t

14 t=t+delta_t

Hereistheoutput.

1.11-P-05

Changethevelocityto velocity=vector(-2,0,0).HereisaWebVPythoncompleteprogram.Notethat thelinenumbersdonotmatchthelinenumbersinthecodefromthetextbooksincethisprogrambeginsonline3.

CHAPTER1.INTERACTIONSANDMOTION

1 WebVPython3.2

2

3 ball=sphere(pos=vector(0, 10,0))

4 velocity=vector( 2,0,0)

5 deltat=0.1

6 while ball.pos.y<10:

7 rate(60)

8 ball.pos=ball.pos+(velocity ∗ deltat)

1.11-P-06

WhenyouruntheprogramgiveninChapter1,itprintsthevelocityofthedrone.(Afterrunningtheprogram,scroll thetextboxtothetopinordertoseethefirstlinethatwasprinted.)Thevelocityofthedroneis ⟨1 16667, 0 666667, 0 5⟩

Let’smakethedronetravelalongthex,y,andzdirectionsseparately.Thisisnottheonlysolutiontotheproblem, butitmightbeinterestingtowatchittravelalongthex-direction,y-direction,andz-directionindependently.

First,modifythevelocitytobe ⟨1.16667, 0, 0⟩,andruntheloopwhilethex-positionofthedroneistotherightof thex-positionofthetarget.

Then,resetthevelocitytobeinthey-direction ⟨0, 0 666667, 0⟩,andrunaloopwhilethey-positionofthedroneis belowthey-positionofthetarget.

Then,resetthevelocitytobeinthez-direction ⟨0, 0, 0 5⟩,andrunaloopwhilethez-positionofthedroneis “behind”thez-positionofthetarget.

Here’sthecompleteprogram.

1 WebVPython3.2

2

3 drone=sphere(pos=vector(3, 2, 1),radius=0.3,

4 color=color.cyan,make_trail=True)

5 target=box(pos=vector( 4,2,2),length=1,

6 width=1,height=1,opacity=0.4)

7 light=sphere(pos=vector( 1,0.7,0.5),

8 radius=0.5,color=color.yellow)

9 deltar=target.pos drone.pos

10 totalTime=6

11

12 #travelalongthex axis

13 velocity=vec( 1.16667,0,0)

14 print ("velocity␣=",velocity)

15 deltat=0.1

16 while drone.pos.x>target.pos.x:

17 rate(100)

18 drone.pos=drone.pos+velocity ∗ deltat

19 print ("position␣is",drone.pos)

20

21 #travelalongthey axis

22 velocity=vec(0,0.666667,0)

23 while drone.pos.y<target.pos.y:

24 rate(100)

25 drone.pos=drone.pos+velocity ∗ deltat

26 print ("position␣is",drone.pos)

27

CHAPTER1.INTERACTIONSANDMOTION

28 #travelalongthez axis

29 velocity=vec(0,0,0.5)

30 while drone.pos.z<target.pos.z:

31 rate(100)

32 drone.pos=drone.pos+velocity ∗ deltat

33 print ("position␣is",drone.pos) Here’sascreencapture.

Turn static files into dynamic content formats.

Create a flipbook
Matter And Interactions 5Th Chabay Solutions Manual by dferdinan - Issuu