I'm sureit's fine, butyoucouldseethatpeoplearesharinggiftsthatthey'vemade, and I hopetoseemoreofthese.
Thisis a prettyinterestingonebythecomposerofthe I willrefactorthislatersongverywellliked, sopleasecontinuetosharethoseinadditiontosharingonTwitter.
I supposeif I evergotaroundtousingInstagramsharestuffwith, youknow, I havethishigh, thiswholethingwhere I wasgoingtoswitchovertousingmastodons, andsomehow I neverwasabletomakethatreallyhappen.
Herearefourheartsubmissionsthat I willnowsharewithyou.
The 1st 1 I willsharewithyouisloveheartsbyUnruh.
GehasRaSo I guess I canclickAndeverywhere I clickitmakesahheartLookatthisAndthey'relike, Oh, oh, It's likeextracingitscontoursMaurandMaurThisisbeautiful.
Excellentwork.
I loveit.
Let's lookatthechangingtheCassiniovaltoahheartbySimon A differentSimonthantheusualcoatingtrainviewerSimonTigerAh, lookatthat.
Oh, it's comingfromthesides I thinkthisoneneedsThatisbeautiful.
I lovethis.
I lovethecreativeusethewaypeopleareusingthissortofpathofthatformulaheartcurvecreativelyandhavingitbetheboundariesofbasically a particlesystemthat's cominginreallyniceworkonLet's lookatoneMaurheartbeatbycopperFranceAndherewego.
Andthisalsois a wonderfulThisis a wonderful, um, referencethiowonderfulillusiontothecirclesquareshapemorphingcodingchallengethatGolanLevinpresentedonthischannelhere.
Buthowdoyouhavesomethingthat's sorandomandchaoticandyet, somehow, accidentallyorbydesign, endswith a frameattheendthatmatchestheonefromthebeginning?
Andthisisexactlywhat I willpresenttoyoutodayin a codingchallengeaboutcreating a pearlinnoiseloop.
Sobeforekeepgoingandtalktoomuchaboutthis.
Letmethere.
Sothisisanotherreference.
Thisis, I think, evenmoresalienthere.
LikethisParticular.
Like, howintheworldisthislooping?
Howisthatlooping?
Theaanswertothisisifyouread a Tien's articlehereallaboutPerlanoisefunctionsandthisparticulartechniqueforhowtoanimatenoisystuffwith a nicetrick.
So I'm gonnapresenttoyoumyownwayofdoingthis, which I suspectisexactlywhat's inthereconsideringthis.
I think I readthisarticleprobablyin 2017 whenitcameout.
Andthensomehowyesterdayinthemiddleofclassand I t p here I waslike, I inventedthisnewidea, andthen I was I messagedgoal 11 I rentedthisnewideaislike, uh, yeah, bytheway, thisismy P fivejazzsketchthat I madethat I senttoyoulike, a yearagoorsixmonthsago.
Thatdoesexactlythat.
Soclearly I didn't inventthat.
I justthoughtthat I did.
I hadrememberedsomething, but I'm gonnagothroughthiswithyoutoday, and I'm soexcitedaboutitbecauseit's reallygonnachangeforit's I thinkit's gonnaopenup a lotofinterestinganduniquecreativepossibilitiesforyou.
So, bytheway, ifyoulikewhat I d'oh, there's norequirementtodothis.
I willmentionthereisanopportunitytojoinas a YouTubemember.
I alsohave a patriotic I'm notsosureaboutthepatriondrivingyououtwhattodoaboutthat?
But, um, youwillgetaninviteto a slackchannel.
I will, atsomepoint, someabouttime, Mel, yousomestickersandyouwillalsohavemythanks.
SothankyoutoNewMember.
Youget a littlefancyicon, so I don't knowanybodyinthechat.
Who's a member?
I'm justcurious.
I forgetwhatitis, Butyouriconchangesyourlittleemojiiconchangesbasedonhowlongyoubeen a member, and I can't rememberwhat I dotthisstockcharacters, the 1st 1 theythinktherainbowisthelastone.
Maybe I hadbeen a memberfortwoyearsorsomething, so I canimagine I don't evenhaditforthatlong.
But I'm curioustoseewhatthoseWhatthose?
I setthemupatonepoint.
Allright, so I think, umum, I thinkAllright, soisthatokay?
Uh, bytheway, I just I'm notbotheringwithslowmovinganymorewiththechatsomebodyin.
Yes, it's thesphericalandcoordinatepolarsong.
Thankyou.
Okay.
Weakmindforthatsuggestion.
I I haven't rememberedinrecentweekstoputslowmodeoninthechat, andsonow I'm kindofleavingitwithoutslowmodeinthehopesthatthecommunityonmy, uh, mycontinuouspresentationofheartswillkeepthechatundercontrol.
Butplease, ifitbecomesunwieldyor a problemforanyone, letmeknow, inparticularthoseofyouwhoareinthepatronYouTubememberslackgroup, youcanletmeknowifyouneedmetoturnonslowmode.
Yes, I amcallingthispolarnoiseloops.
WelcometothePolarExpress.
Allright.
I don't knowifthat's a goodnameforit, butthat's what I'm callingit.
Allright, let's Let's getthisstarted.
Timetodosomecoding.
Hello?
Okay.
I knewsomethingwentwrong.
Welldone, ZanniDollyPeeinthechatasks.
Hey, isthere a fixedtimewhenhegoeslive?
Andinfact, therehasneverhistoricallybeen a fixedtime.
Butthereis a fixedtimenowandthatfixedtimeisrightnowEveryWednesday, a 10:30 a.m. Easterntimeshoots.
What I'm gonnadois I'm justgoingtosay, uh, let a equalzeroislessthantwopi.
I'm a turnofftorefreshfor a second.
I'm workinginthe P fiveJessWebeditor, which I thinkwouldbe a gooddemonstrationofthisonthen.
Thisissupposedtosayfour I gotSowhat I'm doinghere, Justincaseyou'rewondering, I'm writing a littlefourloop, andwhat I'm gonnadois I'm gonnausemypolartoCartesiancoordinatessong, and I'm goingtosaylet x equalareTimescosignofthatangle.
Letwhyequalaretimessignofthatangleandthen I'm goingthio, makeupsomevalueof r r isgonnabe 100.
I'm gonnatranslatetothecenterofthewindowondhe.
Then I amgoingtosaybeginshape.
I amgoingtosay n shapeand I'm goingtoset a vertexvertexat X y And I'm gonnasay, uh, I spelledtobuywithzero, whichisreallycomplainingtosay a stroke.
2 55 no, Phil.
Andtherewego.
Look, I justwrotethecodefordrawing a circlebecausethisis a fourloop.
I'm gonnagothroughallthesedifferentangles I'm gonnacalculate I'm gonnachangeincrementtheangleontokeeptheradiusconstantAnd I'm gonnasetalltheverses x y have a circle.
Nowifourisrandomandthisisbasicallywhat I didinblobbyif I sayrandom 50 to 100 lookwhatwe'vegot.
But I'm gonnaassumeknowledgeofparole a noiseforthepurposeofthisthiscodingchallenge.
Sorightnowwhat I'm gonnadois I'm gonnasaylet t equalszero.
Somethingused t asmyoffsetthroughtheonedimensionalPearlannoysspace.
I'm gonnachangethatexoffsetin a littlebit, butlet's justkeepit a tearightnow.
Then I'm goingtosayourisnoiseofteatimes 100.
So, interestinglyenough, letme.
Weget a differentsizecircleeverytime I runthesketchbecausewe'regetting a new, randomlyseededsetofpearlannoysvalues, and I'm nevermovingthroughthattimespace.
Soeachvertexisexactlythesame.
Sowhat I wanttodonowissayintheLoop T plusequalsomeamountofdelta.
SotheideahereisthatWhatif I couldwalkaroundthrough a twodimensionalPerlinnoisetogetspacetogetrandomvaluesandalwaysendupbackwhere I started?
Andwhynotjustwalkin a circularpath?
I mean, that's kindofwhat I programminganyway.
Sowhynotjustdothat?
Whatif I weretostarthereandgetthispearlannoysvaluethanthisone?
Thisone?
Thisone?
ThisoneThisoneThisoneThisoneThisonethisone, thisoneandthisoneandthisone I wouldhave 123456789 10 11 12 13 Randomnumbers.
Andthelastoneisgoingtomatchupwiththe 1st 1 if I keepgoingso I couldgetthosethoserandomnumbersoverandoveragain, andthatifthere's a mountainoverthere, issovast, it's goingtoappearlikeitis a continuoussequenceoftotalrandomnesssmoothwithpearlannoys.
What I havehereis a processingsketchthatisvisualizingPerlinnoisein a twodimensionalspace.
Sothisis a prettysortoflikeclassicvisualizationoftodeeperLanoisasthiscloudyliketexture.
Andthisisliterally, exactlythiswhereeachnumbereachrandomPerlinnoisevalueinthetwodimensionalspaceisrepresentedas a pixelwith a brightnessvaluebetweenzeroand 2 55 Andwhenyoulookatthat, yougetthiscloudlikepatternbecausethecolorseamlesslysmoothlymovesbetweenwhitetoblacktogray, toeblacktograytoewhite.
Sotheideahereiswhatiswhat I wanttodoiswalkaroundthisspaceandpullthosenumericvaluesbutmapintosomethingelsebesides a pixelvalue, andwalkingaroundin a circleis a nicewaytocreate a loop.
So I wanttostartmoving, but I actuallydon't wannastart.
Youwanttostartoverhere, so I havetodealwiththefactthat I that I needtofindthis 0.0 isinthetopleftbecause I can't havenegativevaluesinthePearlannoyedspace.
Thisis a littlebitof a trickypieceofthis, but I wanttousethatsamepulledhertoCartesiancoordinateformulawhere I wanttosayexoffsetequalscosignofthatangle.
Whyoffsetequalssineoftheangle.
Nowlookatthis.
I kindofgotsomething, butit's weirdlysymmetrical.
Andthereasonisthat's exactlywhat I justalludedto I theseexoffsetand y offsthatvaluesaregoingbetweennegativeoneandone.
Whathappenedto T plusequal 0.1 Now I have X offset, Wildesaid.
Whyaren't I saying X offset?
Plusequal 1.1 y offsetPolitical +11 Well, actually, theincrementalisthis.
Itisthe 0.1 hearscosignoftheangle.
Andintruth, I couldhave a separatevariablefromtheonethat's incrementalingintheloopbecause I couldmovethrough.
But I needtogoallthewaytotwopisothat I don't wanttodo I think a wayformetovarythisin a moreflexiblewayisactuallytousethemapfunction.
Soif I mapcosignof a whichgoesbetweennegativeoneandoneandthenmapthattoarrangebetweenzeroandtwo, wehaveandthisissignwehaveexactlywhat I hadbefore, and I cankeep.
I cankeeprerunningthesketch, and I'm getting a new a newversionoftheshape.
Butinterestinglyenough, whathappens?
Thisisreallynowsomethingthat I shouldmake a parameter.
So, forexample, whatif I weretosay, Letmemakethis a globalvariable?
Let, um I'm gonnacallthisnoiseMaxequalto, and I'm gonnaputthishereandwatchwhathappensif I makethisfiveversus 10 versus 1220 versus 0.1.
Andlookatthis.
0.30 pointfive.
Lookatthis.
Thisisreallykindofinteresting.
Withjust a littlebitofnoise.
I havewhatappearsalmostlike a perfectcircle, butitkindoflookslikeah, humanbeinglikemewithfalse.
I havelotsoffaultsdrewthatcircle.
It's gotsomeslightsopearlynoisecanactuallyusedas a nicelywith a littlesubtleperlanoiseofmakingsomeperfectshapelike a letterformor a circleor a square, have a littlebitofwiggletoitthatmakesitseemmorehanddrawn.
Sothat's a nicethingtosee.
Theotherthingwecouldseehereveryquicklyislike, youknow, itwouldmakesenseformetocreate a slider, I'm goingtosay.
Andthis I'm usingthe P fivedomlibrarytodothis, whichis a reallyquickway.
I'm gonnacreate a sliderwhichhasarrangedbetween, like, 50.1 and 10.
I'm gonnastartitat, uh, zero, actually.
Let's makeitbetweenzeroin 10.
I'm gonnastartit.
Zero.
So I havethesliderherenowandthen I wantnoiseMaxtoequalnoiseMaxtoequalsliderdotvalue.
Sowatchthis.
Okay, Thatdidn't work.
Createslider.
Therangegoesbetweenzeroand 10.
Holdon a sec.
Let's takethisout.
Oh, I havenoLupinhere.
Nowonder.
Takeoutthenoloopandnowletmeslideit.
Weneedtomakethat.
Firstofall, I needtogivemyselfsmallertimestepswhenmovingtheslider.
Okay, Uh, what I'm gonnadoisshowyou, uh, letmemake a variablecalledphase.
Wehavethatbezero.
I'm gonnahavecosignofangle.
PlusFay's signofangleplusphase.
Whatdoyouthink's goingtohappenif I incrementsphase?
Well, itlooksliketheshapeisrotating.
I mean, itisrotatingorit's not.
Rotatingvisuallyisrotating, but I'm actuallyjuststartingin a differentpointofthenoitnoisespace, interestinglyenoughlikeAndif I makethatmuchsmaller, you'llactuallyseethat, like, smallerthantheamountofVergisis I haveyoustarttosee a wigglebetweenthemsointeresting.
Like I couldmakethis 0.2, andthat's gonnabeevenmoreapparent.
Soanyway, youseethesortoflikeexcitingpossibilitiesofthinkingaboutpearlandnoisevaluesasonedimensionalvaluesthatwemightpullovertimein a onedimensionalfashionbutactuallypullthemfromthepathof a circleinthetwodimensional, pearlannoyedspace.
Nowwhat I happentobedoinginthisistaking a veryliteralapproach.
I'm takingthosepearlynoise, patpathvalues, walkingaround a circleandapplyingthemtolikethedistancefromthecenterof a circleoverasdrawingit.
Soit's verylikeveryliteral, sortoflikevisualizationofPerlinalwaysdiesin a circletotheedgepointsof a circle.
I havePerlinnoisevaluesinonedimensionalspace, buttheydon't loop.
Whynottakethoseloopingvaluesherealongthepathof a circleandthenunfurlthembackintothissortofonedimensionallineandthenusethosetoapplytoanyvalueinanyvisualizationtomake a perfectIf, Luke, that's theidea.
So I'm gonnajustputthatoutthereandputtingthisoutintotheuniverse.
So, forexample, ifthisismyvisualizationofpearlannoysintwodimensionalspace, thatcloudyimagewell, I couldmakesortoflike a cloudysetofcubesinthreedimensionalspace.
Butanotherwayofthinkingaboutitishavethatthirddimensionbeslicesofananimationso I couldshowyouthepearlinIllinoisspaceovertimewhileincrementalng a Z valueof Z offsetshowyouPerlanoiseforaneasyoffsetequalzeroKensiOffsettingwas 00.1 pointtwopointsthreeandsothatactually, allofthosewillhavenumbers.
I thinkwe'vemadeactually a superinterestingofshapefor, like, a crazyanimatedgameversionofasteroidslikeCouldimaginehavingPerlinnoisegiggling, oscillating, looping, noisypolarasteroids.
That's thething.
Youshouldmakeitanyway.
So I hopeyoufindsomevariationsforthis.
Umand I lookforwardtoseewhatyoumakeandstaytunedforthenextvideo.
A touristshape?
Yes, a touristshape.
Increasedresolution.
Uh, allright.
I probablyshouldhaveif I thoughtaboutthis.
Madethestrokewaittoo, forittobe a bitmore.
Giveit a littlemorepopular.
Morezing.
Yougottahave a thingcoatingtrainsponsoredbythingthing.
I haveanidea.
Howhardisitgonnabe?
Two.
Ah, Can I justgetthemic?
Like I couldjustdothisright?
Mikeequals p fiveaudioin.
Andthen I couldjusthave, uh, thisbe, umdoesitgetlevel?
No.
Getvolumeshootfivesound.
I justwantedtotieittothesoundrealquick.
Um, audioend.
It's funny.
There's apparentlythere's a videoaboutthiswork.
I'm wearing a tinfoilhatbecause I really, reallymicinput, myoldmate.