Justget a secondpairofglassesso I wouldswitchif I'm goingtoread.
Butthat's sortofsillybecause I couldjusttakethemofftoread, which I'vejustfinedoing.
Um, thatwasthat.
Well, theotheroptionwasjustdonothing.
Butthethirdoptionwasgetprogressive, which I nowhave, and I havetosay, I mean, I'veonlyhadthemforthink I gotthemonTuesday.
So I mean, like, forabout 48 hoursin, and I'm havingquite a difficulttimewiththemif I'm beingperfectlyhonest, although I'm muchmoreusedtothemtodaythan I wasyesterdayorthedaybefore, But I knowofanybodywatchingwerealsoyoungandyouthfulwithyourexcellenteyesight.
Justwait.
JustwaituntilyougettobemeandyouneedtheseWhat I wouldn't reallyrisesyourbecauseofthewaythelensesprogressfordistanceandreading.
There's somedistortiononthesides.
We'regonnacreatethatprogression.
Andsoit's Myperipheralvisionisless.
Ithas a smallerconevocal.
What's thething?
Flashfrustrate.
Myfrustratingofkitchenissmaller, butthegoodnewsis I meanoh, foryoutheviewingaudience.
Because I knowyourfavoritepartismereadingrandomnumbers.
I'm lookingatthechathere, Um, andthis I couldjustdosoeasily.
Nowreadingisquitephenomenaland I wasn't reallyabletobefore.
Sowe'regonnado a readingoftheceremonialreadingoftherandomnumberswithmynewprogressivelendersandpeoplehadmentionedthere's a blue, umandso I didget I did.
I don't know.
Maybethisissilly, but I didgetthebluelightfilterinthem, which, hopefullyisnotgoingtobetoodistractercaused, like, weirdreflectioninmemakingthesevideos.
Butwe'llfindoutfieldofyou.
Thankyou.
I have a problem.
I can't rememberwordsanymore.
I thinkit's relatedtothefactthat I didpresentlenses.
Butyouknow, Andyouknow, onethingthat I trytodoisyouknow, I reallygetmyselflike I shouldgivemyself, like, eightPMlimit, butninePM I tryafter 9 p.m. I trytolookatnophone, noscreens, nothing.
I'm watching a movieorwhatever, but, umand I don't wantthefactthat I have a bluelightfeelsortofGivemeanexcuseifyoulike.
Oh, nowit's 10 o'clockatnight.
I couldplayPokemon.
Goonmyphone.
Notthatthat's what I play.
I don't playthatNo, that's likeThat's like, sotwoyearsago.
Startprocessingdotorg's is a reallyexcellentplacetoaskquestionsaboutprocessingand p fivejestspecificallyon.
I wouldsaythere's a lotofcrossoverbetweenthecodingtraincommunityandtheprocessingdiscourse, butifyouwanttoengagewithgettinghelpfromthe, youknow, laserfocusedcodingtrainpassengers, thenthediscordistheplaceforyoutodothat.
Andifsomebody I knowthat I sawKobe's namepopupinthechatiscomposed, a linktojoiningthediscourse, thediscordintheintheYouTubeshot, thatwouldbehelpful.
Um, now I alsowantedtomention a coupleofthings.
GoogleSummerofCode.
Um, I thinkthiswillgetmetothesite.
I can't rememberif I mentionedthisornot, buttheorganizationshavebeenannounced.
Yeah, becausethiswasannouncedbefore.
I probablydidthislastweek, butGoogleSummerofcodeis a programthat I participateinaspartoftheprocessingFoundation.
Butthereareover 200 I think.
Whoa!
Oh, no.
Over 686 over, howevermanyyears.
Butthereare a largenumberofotheropensourceorganizationsthatparticipateasmentoringorganizationsforGoogleSummerofCode.
Andyou, ifyou're a student, youhavetobe a student.
Unfortunately, orfortunately, youcanapplytoworkwithcollaboratewithmakingopensourcecontributiontooneofthoseprojectsoverthesummerandgetpaid a stipend.
I'm justherebecauseit's a programthat I participateinas a mentorandwouldloveThioencourageyoutoapplyifit's somethingthatinterestsyou.
Andtotheextentthat I canhelpwiththatorwecanmaybewecanopen a discordchannelforpeoplewhoarequestionsaboutthat.
That's somethingthat I wouldbeopento.
Thankyou, Kobe, forpostingthediscordinvite.
I shouldprobablyget a buttonlike I haveonebuttononmystreamdeckwhen I pressititbothtotwointothechat.
Youknow, I shouldmaybemakeone.
I needtogetthisstreamdeckwiththewithmorebuttons.
I needmorebuttons.
Oh, myGod.
I justwant I justfeellike a giantpanelofbuttons.
That's mydream.
Um, allright, sothat's thatnatureofcodeiswhat I'm gonnabedoingthatwithotherthings I shouldn't make a listofyouwouldbesohelpfulif I'vejustmade a listofthingsthat I wantedtomentionasopposedtojusttrytorememberthemwhile I'm livestreaming.
I willbe I'm notavailabletolivestreamonPiday, so I'm probablygoingtopreparesomethinginadvancetoreallybereleasedonPiDay.
But I don't haveanyideawhatto d'oh.
So, um, ifif, umyouknow, certainly I'lltakesuggestionsinthediscord, Butrightnow, forbetterorworse, thesystemis a gethubRepowhereyoucanifyouhave a suggestionfor a top.
April 1st, I think, is a muchmoreappropriatedayformethanpied a saidthatlastweek.
Okay, so I think I bettergetstarted.
It's 10 o'clock.
Halfanhourshouldreallybemylimitofofshenanigans.
Letmegototheweb.
Editorof P five.
Uh, wait.
Hey, where's myWhat's goingonhere?
Herewego.
Lou, thisisn't Ashley.
Wonderful.
Gotmeloggedintothecodingtraineditor.
I havenoideawhat?
Mypasswordismatter.
Because I'm usingnaturally.
Okay.
36 I thinkisthenumber I tendtouse.
Letmegotowhere I leftofflast.
Mmm.
Whoa.
Whatisgoingonhere?
Oh, bytheway, thisis a littleThisiskindofanaside, andmaybe I shouldn't beshowingthis, butlet's seeifthisworks.
Um, I washelping.
A colleagueisteaching a classaboutanimation, andthisislikeananimation I thinkmadeisitmadeanillustratorknownaftereffects, butusing a librarycalled, um, youthink a librarycalledLadidaJsandtheseairsome, likeLottieand p fiveexamplesactuallydon't knowwhat I'm talkingabout, but I helped, butit's coolbecause, like, thewholeanimationisalljustinthisbiglikeJasonfile, Andthen I have p five, likeplayingitback, whichiskindofcool.
Allright, butthat's something I wouldliketomakesomevideosaboutthis, um, withalonewho I workedonthisexamplewith.
Okay, Comingback.
Thioopeningmysketches, Theonethat I wanttogetIsthisHerewego.
Sothisiswhere I leftoff.
Thisisthelast, um, welast, uh, before I leftarmerrights.
WemissAdamRVscode.
Wedon't likethebrowserbasededitor.
Toobad.
I know.
I getit.
I getit.
Thankyouforyourfeedbackinyourcomment.
It's importantformetousethiseditorbecauseitis a toolthat I feelveryinvestedininhelpingitgrowandforbeingsomethingthatis a reallyfriendly, easyplaceforpeopletostarttolearncoding.
Sowhen I docertainprojectsthatreallydon't fitwellwiththewebeditor, I certainlywilldothingsoutsideofit.
But I dofeellikeitis a usefultoolformetodemonstratethebasicnatureofcodeexamples.
Umokay.
Ah.
Hello, Argentina.
PeopleofArgentina.
Okay.
Allright.
I think I'm trying.
I justtryingtofigureoutwhere I wanttokindofbeginwiththis.
Allright, I amgoingtoactuallygothroughups, and I don't wantitdownwiththis.
Um, wecan I'm prettysurelikeoverlaying a diagramshouldbepossible.
Although I'm gonna, like, pointtoitandstufflikethatthat's gonnareallymessthisup.
Butwhatever.
We'regonnatryourbest.
We'regonnahopeforthebest.
Everybody, Um, thatisanabsolutemistake.
Um, allright, soif I'm making a brieflist, I'm gonna, um, Doesthisoverheadthingworking?
No.
Whathappened?
Myoverheadcamera.
Sosad.
That's weird.
Well, I amgoingtoletmemake a list.
Sothefirstthing I'm gonnadoisjustdoattraction, andthen I'm gonna I thinkinthesamevideo, I canmakeanarraymakingnotestomyselfhere.
Youknowwhat?
Usually I typedtheseout.
Letmedothat.
Youcanseeit, right?
Becauseactually, I haveithere.
Right.
OK, herewego.
Allright.
So I'vedoneallthesealreadyhavethesenotes.
Umallright, sothisisdone.
Sogravitationalattractionplusarray.
I think I coulddothatinonewillfilemightchangethat.
I thinkthatcouldbeinone.
Then I'm goingThiodorepulsionplus, um, like a kindofgroupbehavior.
Soinsteadoftherebeingseparateattractors, a separate a tractorand, um, moversorbodies, whateveryouwannacallthemparticles, I'm gonnahavetheminteractwitheachotherandthen I'lladd, uhumand I thinkthiscould I thinkthiscouldallbeinone.
So I thinkhopefullythiswillbetwovideoswhere I dotheimplementthebasic, uh, gravitationalattraction.
Then I justswitchittorepulsionandshow I couldmakeit a groupbehaviourandWallForce.
Andthen I alsohave I shouldlooklikesomeofthisis a littlebitredundantcontentbecauselastyear I didattractioncodingchallenge.
Couldn't challenge 56.
I guessthat's morethanno, that's whatthreeyearsago.
Areyouinsane?
Have I reallybeendoingthisforthislong?
Thatitfeltlike, Oh, thatwasjustlastyear.
Thatwasthreeyearsagothat I didtheattractionandrepulsioncodingchallenge.
Um, justlookatthecode.
Did I?
I'm hopingthat I wasusing s sixclassesatthetime I wasor I changedit.
Umwhoa.
Right.
Okay, sothenthere's alsothis, So I'm gonnarefertothiscodingchallengeandalsoincludedintheplaylistandarenotlovingthechatandmymind's airExactlyalignedhere.
So, bytheway, myThebookisCreativeCommonsnoncommercialandKhanAcademywith a bushelYouththeancorrectdiagramalso, uh, has a basicallyduplicatedversionwith a bunchofchangesofthenatureofcodebook.
Hopefullythat I'm creditedonhere, but I thinkthat I amandbut I'm lookingforYeah, thisiswhat I wouldlookfor.
Yeah.
Herewego.
Allright.
I havesuchtroublegettingstarted, butitistimeformetogetstarted.
I gottogetsomestuffdonetoday, notlookingatmyemail.
Allright, letme I have a suspicionthatmaybewherethisreceiverisplaced.
So I haveanidea.
Sothankyoufortellingmethatyouheardthechirp.
Andnow I'm hoping I movedsomewiresaround.
Um, holdon.
There's oneotherwirethat I shouldmaybemovethatcouldbehaving, like, someinterference.
Okay, sohopefullythat's goingtodothetrick.
Youneedthesiege a timewhere I definitely d'oh!
Okay, happenswhen I docertainposes.
Go.
Coulditbe I don't haveany.
Like, I don't haveanyotherelectronicdevicesinmypocket.
Coulditbethezippersomething?
Thisisthemike.
Well, allright.
Allright, everybody, listen, listen.
Standingstilltalking, talking, talking, talking.
Doesithappen?
What?
I'lldoanything.
Donothavetodolikecoating.
Canyoutell?
Okay.
Oh, it's 10 forthis.
Isthisis, umallright.
Helloandwelcometoanothersayingthat.
I mean, nobodywantstolookuptherewatchingthesequence, and I justkeepthinkinghelloandwelcometo I don't knowwhatelsetosay.
Allright?
No, I don't likestartingwiththatway.
I ItistimeforNewton's lawofuniversalgravitation.
Sothisisthefinalexamplethat I willbedemonstratingaspartofChaptertwo.
Althoughtheconceptofforcesandhowtheyareappliedpermeatethroughouttherestofthevideosthat I intendtomake.
But I'm goingtowrapupthischapterbylookingattheequationforuniversalgravitationthatlooksexactlylikethisandtryingtoseeCan I takethisequationandimplementitin a P fivejazzsketch?
That's good.
That's everyone I wantedtosayatthebeginning, Um, sothatyouand I, we'regonnasortof, likehopewecanfixthis.
Um, well, see, Well, I couldalwayscomebackand, uh, rerecordorsomething.
I didsomethingverymuchlikethisinthefirstexampleispartofthisSiri's where I hadactually.
Look, letmeputthishere.
Um, allright.
Oh, it's mywatch.
Ismywatchdoingit?
Okay, that's easy.
I don't needtowearthissilly, overpricedpizzahunkaexercisetrackeggsurveillancecouture.
Okay, well, I feelsofreefood.
What?
You'regone.
Uhhuh.
Allright.
So I I don't thinkit's worthme.
Wasn't reallybad.
And, uh, isitreallybadthat I needtogobackandredotheintro?
Orwasitfine?
Liketheglitchinthisaudio?
It's gonnaendupintheeditedversionofthis, butifit's justlike a littleminorhome, bigdeal.
Didithappenagain?
Allright.
I'm gonnajustkeepgoing.
I hearditagain.
Well, whatcoulditbe?
I wonder?
I guess I couldchangetheIsitjustthebell.
Findgood.
Allright.
Allright.
I'm gonna I'm gonna I'm gonnakeepgoinginthefirst.
Inthefirstexampleinthischapter, I didsomethingverysimilartothisideaofthelawofAttraction.
I created a vectorthatpointsfromthemoverobjecttothemouseandthenmadethatvectortheaccelerationofthemoverobjectitself.
Anditappearsifit's thisbodylikeorbitingthemouseitself, I gotthereissortof a problemwithme.
Keepingmyeyeonthechatisit's verydistractingand I losemymoment.
So I'm gonnajusttake a breakfromlookingatthechatand I'm in a minute.
I'm gonnaplowforwardthisbecause I shouldn't keepstoppingandstarting.
Hey, what's goingonhere?
I didsomethinginthefirstexample.
InthisSiri's verysimilarwhere I took a moverobjectandcreated a vectorthatpointedfromthatmoverobjecttothemouseitselfandsetthatvectorastheaccelerationoftheobject.
Sothiswaslikeattraction.
But I wasn't thinkingaboutmassand I wasn't thinkingaboutdistance.
Letmetrytodiagramwhatitisthat I wanttodio.
I wannahave a newobjectthat's calledin a tractor.
So I'm notactuallygoingtoatthismomentinYeah, I just I realizedsomething.
Um, letmediagramwhat I wanttodointhisvideo.
So I'm gonnasimplifythingsandhavethisconceptofanattractorobject.
Sotheattractorobjectisn't a reallybodyintheuniverse.
It's a fixedentitythatdoesn't thatthatattractsthingstoit.
Then I'm goingtohavethemoverobjectwithsomegivenvelocityandthemoverobject.
Theattractorisbasicallythemousefromthepreviously, butthemoverobjectisgoingtoexperience a force, a gravitationalforcethatpullsittotheattractor.
Andthatforce, whichis a vector, isgoingtobeequaltothemassiveoneobjecttimesthemassoftheotherobjectdividedbythedistancesquared.
And I putthisinthewrongorder, butalsotimes G, whichistheuniversalgravitationalconstant.
Nowthere's a veryrialnumberthatisthisvalueintheuniverseasweknowit.
Butforus, inourfake p fiveor I don't want a fakepretend, butforusinourinourpretend p fivecanvasover.
That's where I understandwhat I'm doingnow.
Butforusinourpretend p fivecanvas, if I drawlike a boxaroundthis G isjust a wayforustokindoftunetheworldtohavestrongergravitationalattractionorweakerattractionforces.
Andin a way, I couldthinkofthis G as a propertyoftheattractoritselfmaybedifferent.
Thedirectionisjustah, vectorthatpointsfromtheobjectbeingattractedtotheattractorandsothat I cangetifyourememberupthatthere's a bunchoftimesnowwithsubtraction.
Sothesubfunctionforsubtraction.
I couldtakethepositionoftheattractorminusthepositionofthemover.
Andthatgivesme a vectorthatpointsthisway, saiditsmagnitudetotheresultsofthisformula.
Andvoila, I havegravitationalattraction.
Okay, socomingbacktothisexample, I amgoingtonowgetridofthisaccelerationcalculation.
Andwhen I runthesketch, I shouldjustseethismovernotmovingatall.
I'm andinthemaintapandinthemainjobscriptfilewhere I havesetup a draw.
I wanttoaddanattractorso I'llcreateanattractorthatalsogetsan X Y positionandmass.
I'llsay a tractortracksmoverand a tractordotshow.
Now, I'm justconfusedyoufor a secondtherebecauseyoumightbethinkingWait, did I misssomething?
Didyouwritein a tractorclass?
Andisthisjustgonnaworkrightnow?
Definitelynotlikewhen I run.
Thisislike, I havenoideawhatthatis.
Sothisisthewaythat I work.
Sometimesit's a littlebitofflawedmakingthistutorialvideos.
Thisisprobablyexamplethat I'vewrittenmany, manytimes, So I haditjustsortofrightinmymindattheready.