Placeholder Image

Subtitles section Play video

  • Hello.

  • Good morning.

  • Afternoon.

  • Whatever time it might be, It's morning for me.

  • Hi, it's Friday.

  • Something exciting to tell you.

  • Look way um how are you?

  • Eyes my mic on when Mike is on, music is playing.

  • I am so excited for today's live street because I'm going.

  • I have a plan.

  • I've thought about it.

  • I'm not exactly prepared.

  • But I spent I spent some time on the subway doing some reading and watching some videos to think about what it is I'm going to do today.

  • And the first thing that I'm going to do has to do with this box of toothpicks.

  • Could there possibly be What could possibly on the coating train related to a box of toothpicks you might be asking?

  • Well, soon, I will tell you first, let me do some housekeeping here, um, and talk to you about what's happening for the rest of the year on this YouTube channel that you are watching.

  • So there are only two Maur live streams in 2018 both of which are happening next week.

  • And then I will be off for quite a while until January.

  • So I believe here whips.

  • If I go to a website youtube dot com slash the coating train.

  • I will see first that I am streaming life, and then I want to show you these two things.

  • So two things are set for next week.

  • On Monday at about 3 p.m. Eastern time, I will be coming to you live from not this room, but from about five floors down.

  • On the fourth floor is the program called I T.

  • P.

  • That's the graduate program.

  • The undergraduate program is called I Am A.

  • These are both programs at Testicle the Arts in New York University.

  • The end of the semester show is coming over hundreds projects made by an incredible set of talented students from all over the world.

  • So I'm gonna walk around with my phone and somebody to help me on interview students and show project so you can tune in for that.

  • If you miss it, don't worry, it will all be archived, and I also will produce.

  • Probably the whole lifetime will probably about two hours, but typically after that's done, I produce about a 20 minute, kind of like edited, compilation highlight reel of a bunch of the projects by the way.

  • If you have any experience life's treating that might that you might have some tips for me I'm looking into currently getting I have Ah, gimble.

  • I have a person is gonna help me hold the camera.

  • I have a variety, different microphones that I'm looking at using.

  • But I'm looking at getting one of those kits for Mike that goes with the camera and a handheld thing and all that sort of stuff.

  • So if anybody has and experience or some things, you want to suggest that I get that I could get between now and Monday, let me know, then coming to you next Thursday at about 10:30 a.m. In the morning.

  • Um, I will be doing my annual processing foundation holiday Total bi annual.

  • I mean, second annual Did it last year, Spur of the moment last year.

  • I'm a little bit more planned this year, although I don't actually have any topics in mind.

  • But I am looking for you to suggest stuff.

  • So let's let's move over here for a second if I go to and I want to come back to this in a second.

  • But if I go to, uh Look, I don't want to import my bookmarks.

  • Go away.

  • Whatever.

  • If I go to get hub dot com slash website slash rainbow topics, I think I need to rename this report.

  • You know it?

  • No.

  • Oh, no coding.

  • Train coating, train slash rainbow topics.

  • This is a repositories where I kind of keep a list of things of suggestions of things that I might do in a video on a live stream.

  • And currently there are 877 everything.

  • Look at this.

  • Suggested four days ago.

  • Toothpick patterns, Toothpick, toothpick, tooth, pigs.

  • Nice.

  • Nice sponsor.

  • Um, so, uh, I'm gonna do the toothpick challenge today, but I am thinking what I would like to do is at a label, um, goto labels.

  • I'm gonna create a new label.

  • I'm gonna call it Holiday Telethon.

  • Probably be.

  • Should be some red ish.

  • Oh, I like that green.

  • I can't hold on.

  • We'll get there eventually.

  • Yeah, that's not really very Ah, that's that's good.

  • Um, so that's very dark, but holiday telethon label.

  • I will.

  • So I'm looking for holiday themed coding challenge ideas.

  • For example, one that I will most likely due next week is the Koch snowflake, which looks like any of these patterns.

  • Whoa!

  • I've never seen it done like this, so we're gonna have to figure that out.

  • So this is something like things that are wintry holiday themed.

  • That's my plan for next week.

  • Hey, start up, guy.

  • Thank you for the super chat from India.

  • The other thing.

  • I'm trying to get working, but I don't believe that I'm gonna get it unlocked.

  • Unfortunately, there is a YouTube as a feature called Super Chat for good, which is a way of sending super chat donations directly to a nonprofit 50 N.

  • C.

  • Three organization of which the Prospect Foundation is one.

  • So I've been in contact with YouTube to see if I could get that enabled for my account for next Thursday.

  • But I don't know if that's gonna be possible.

  • So just to be aware, I'll be asking people if you're if you have, if you are able to make your donation through crossing foundation dot ord slash the port.

  • But anyway, that'll be next Thursday.

  • Um and, um Ah, Bill Jeet McGee.

  • And the chat asks.

  • You really came up with this video after smarter every day?

  • Yes.

  • So I mean, uh, So I I was I had the honor was lucky to get to actually meet Destin at Thinker Con, which was a conference that he organized a little while back in Huntsville, Alabama, and I've been obsessively tuned into his channel ever since.

  • On the for a serious video.

  • I also want to show in reference the three blue one brown Siris on for a serious, which is also excellent.

  • And that's something that I had tuned into quite a while ago and re watched.

  • So I want to get started with that Simon Tiger is saying I'm pronouncing Koch wrong.

  • I know, I know.

  • I'm pronouncing it wrong, but sometimes in life, we just have to pronounce things wrong to get through the day.

  • Um, Okay.

  • Now, uh, smarter Every day just said hello in the chat.

  • What up?

  • 48 people.

  • Okay, so this is what I'm looking for for next week your holiday themed, uh, coding ideas.

  • I have purchased a new ukulele.

  • I have purchased a new ukulele, which, if you can stomach your way through about an hour from now, if you're still actually watching or two hours from now, I might actually, Unbox, I hear Unboxing is like a thing.

  • I never mind.

  • I'm just gonna, like, forget this coding thing and just make unboxing ukulele videos.

  • But, uh, we'll see.

  • I'm gonna open up my new ukulele and try it out because I will be singing very badly next Thursday, a coding themed holidays.

  • It's really a terrible idea.

  • But as you donate to the wonderful A nonprofit, the Process Foundation, So I'm also looking in addition to suggestions for holiday themed coding challenges, I'm looking for your lyrics, lyric submissions of holiday music with coding lyrics.

  • And I had a bunch of them from last year.

  • Thank you to me.

  • I am C.

  • M.

  • Samy, who wrote a whole bunch of those.

  • All right, so that's what I have to say Now, One thing I want to do is I want to briefly, before I get started with the first coding challenge, I want to show some of the projects that the community has made.

  • So I'm gonna go to the coding train here on the most recent coding challenge I did was this flocking simulation.

  • Oh, and I was, uh, recently speaking with Nikki Case, who was one of my absolute favorite Internet artists ever.

  • If you do not know the work of Nick in case you should check their work out.

  • But, um, explore, Nikki Case reminded me explore a bles website.

  • I hope this is gonna come up.

  • Here we go explore.

  • Alexa nations.

  • Do not.

  • Does anybody recognize that?

  • That those air Boyd's right there on the explora ble Explanations website.

  • So if you want to know how to code these this boy's algorithm, you can go right here and watch the flocking simulation one.

  • Now, I'm gonna go to this page here and we have a couple.

  • Look, we have a bunch of submissions from the community, so, as you know, as he might not know.

  • But if you watch where my coding challenges that make your own version of it, you can submit it over here.

  • So I'm gonna click through these.

  • There was also one that isn't submitted here, but came through the comments, have to dig it up and find it.

  • Somebody made a flocking simulation in unity, which kind of like blew my mind.

  • So let's before I get started with the coding challenge, let's take a look at a few of these.

  • So I'm to go here.

  • This one I love.

  • I'm gonna go to the full view of it.

  • What this one is here is the tasteful, toasty love.

  • These Internet names took my flock in coding challenge and combined it with my quad tree coding challenge.

  • This definitely gets a four.

  • I really like a person in their forties who hasn't train whistle on the Internet.

  • Okay, um but so what?

  • This combination is one of the things you might notice if I go to just my actual coding challenge.

  • Let's let's actually Oh, shoot.

  • See it live.

  • No view Code Web editor.

  • So I wanted it.

  • So I'm gonna run this, and I'm going to add This is 200 Boyd's.

  • Thank you, Daniela.

  • Still a row for the super chat?

  • I feel also awkward about these super chats, but thank you.

  • That is really, really nice of you.

  • I appreciate that.

  • Okay, So what I want to show here is see how there are 200?

  • Boyd's flocking right now.

  • If I increase this to even just like 500 look how slow that's running.

  • This is because every single Boyd has to check every other Boyd in relation to where it is.

  • If you watch the coding talent, that's what I went through.

  • How did these boys move?

  • According to their neighbors, this is incredibly slow.

  • If you could do the math 500 check Boyd's.

  • Each one checking every other 500 is 500 times 500 which is a number that I could get the answer to on a calculator or in my head.

  • But it's too stressful when your live streaming.

  • Um, so if I made this 1000 look at that, it can barely go now.

  • This is not a limit of a computer to draw, right, if I do, if I comment out this line, look at this.

  • If the computer is no problem drawing 1000 circles quadratic complexity, thank you, I always say exponential, which is absolutely wrong.

  • It is quadratic.

  • Thank you on DSO here.

  • Now, if I go back to this, this what this is doing is it's using a quad tree algorithm.

  • What is a quad tree?

  • It's a way of sectioning, a computer graphics window or any two dimensional space.

  • You can have an OC tree in three dimensional space into various buckets and all the voids register themselves in particular buckets.

  • And then when it's time to look at the neighbours, it doesn't have to look at everyone.

  • It could look at just the ones that are within its bucket, and this is called quadri optimization.

  • It's very fancy, but it's not that it's a thing you can do.

  • You can actually did.

  • Squat is called Quadri because you can actually keep subdividing subdividing based on how many boys are in any particular area.

  • But you could also just do what's called Spatial Subdivision like we could just divide the screen into equal parts.

  • And that would also be worked well for flocking.

  • Now I should go back to the code, and I changed this.

  • Look, that's already 500.

  • Let's change this to 1000 you can see like Okay, it's not running super fast.

  • That's because there's still a lot of stuff to do, and this is Java script in the browser.

  • But this is a reasonable animation with 1000 which is really wild, and there's probably a lot of like, further authorizations you could do like there's tons of stuff in my coat where I'm doing on this extra square root calculations in that type of thing.

  • Um okay, so I am going to, um sorry.

  • I'm distracted by multiple chats going on.

  • I'm gonna just traces back to 500 which is a nice number for us to see.

  • Look how fluid and thank you.

  • Tasteful, toasty for doing this, eh?

  • So I'm gonna leave now.

  • I'm gonna go back to where was I here to find the other ones where the Internet is a hard thing.

  • There we go.

  • Let's look at colorful wreck regular polygons flocking by Juan Carlos.

  • Um on Let's click on that.

  • This I love to see a couple things about this I love one is a nice new interface.

  • That's a little that's quite a bit more nicely designed with actual labels to play with the different rules.

  • And then, you know, a lovely designed take on this instead of just using circles to use different polygons with different colors.

  • Wonderful work.

  • Um, let's move on to three for three D.

  • Does this involve quite attorney ins?

  • Three D Boyd's with Quad Tree on this one.

  • Let's actually, once again, I want to go whether things I think would be nice to add to this Web editor is a button that immediately gets me to the full screen view.

  • But I could just type it into the address bar.

  • So this is really cool to see.

  • So this is actually now I wonder, is this using the web gel render of P five?

  • Amazing.

  • If it is, and you can see this is happening in three D, we can decrease the number of Boyd's, increase them, change their perception, bump up the separation so many fun things.

  • I encourage you to play around with this on your own.

  • Then we've got evolution Aquarium.

  • 00 I saw this.

  • I think someone said to me on Twitter, or like posted in a comment, I don't underst know exactly how this is working.

  • But this this is the kind of this is like my dream project.

  • If you ever have seen the nature of code book, the sort of like working exercise through that whole book is to make your own ecosystem with a lot of different agents that are have different rules and revolving different behaviors.

  • And this looks like it is a manifestation of that.

  • A smarter every day is still in the chat, says, Oh Dang, I was hoping for three D.

  • The three D is coming.

  • I'm gonna find that unity one, which is really wild.

  • So what I love about this is each one of these creatures.

  • I haven't looked at the code.

  • I don't know what's going on here.

  • I I actually think it would be in this kind of case.

  • I would love for the creator of this, maybe to consider a write up about how all this is working.

  • But there are predators.

  • There are avoiders their food, There's food, there's poison and those creatures.

  • And you can see that everything is that.

  • I imagine this is also built on top.

  • In addition to the flocking behavior is using my genetic algorithm evolutionary Siri's to evolve different behaviors.

  • What I love about this is I can click on show names and they all have names like Sweet or Daisy.

  • I just love that like, where do these names come from?

  • Maybe they could use some kind of like text generative generation, neural network thing toe like generate names for all these creatures.

  • And then I can do things like add a predator.

  • I think that's spelled incorrectly off.

  • I'll pull requests that up will address that predator.

  • So I think if I click now Oh, so the red or the predators so I could get distracted with playing with this the whole day.

  • I think I want to feed them.

  • Okay.

  • So, I mean, I could feed them, look like eating the food that could drop little bits of food.

  • Oh, the's kind of problems.

  • Get me so excited.

  • So I would I really want to, like, play around with this and explore the code and kind of understand what is doing.

  • But I'm going to set that aside.

  • So I was planning on starting with the toothpicks.

  • That was gonna be my warm up.

  • Because I have to admit, I checked out this book from the Koran library, which is the like math computer science library here at N Y.

  • U called for e analysis.

  • So exciting.

  • Like, I'm gonna go get a math book, so I left it downstairs.

  • I want to have it.

  • Here is a prop.

  • I'm gonna read it on the sub, and I started looking at us.

  • Oh, dear.

  • This is this is a little bit beyond, but So I have two things I want to do.

  • One is the 40 a Siri's and one is the toothpick challenge.

  • I don't know.

  • I don't know.

  • I don't know.

  • I was playing into the Toothpick challenge first, but now I'm thinking maybe I should start with the Foret Siri's.

  • I could always just go.

  • Oh, the unity thing.

  • One more three D.

  • So I'm gonna find this video, and, um, yeah, sure.

  • You can show me notifications.

  • Um, I am going to find the unity.

  • Can I find a comment?

  • Where is it?

  • Somebody commented and linked to their unity version.

  • Maybe somebody watching confined this more quickly than me.

  • Uh, unity.

  • Seriously.

  • I just thought OK, I could find this.

  • Hold on.

  • Not Maybe it was wasn't on this video.

  • Let me find it on this computer.

  • I have to decide.

  • Um, shoot.

  • Here, let me play some awkward waiting music.

  • All right, let me try If anybody in the Chad can find Yeah, I was trying command f confined This comment, recent comment.

  • I'm gonna go into my YouTube studio over here.

  • It was your l was an itch dot io.

  • I'm gonna go to community.

  • I have a second computer here.

  • If you're wondering what's going on, I'm gonna go honor.

  • Ah, here it is.

  • I found it.

  • I found it.

  • Uh, okay.

  • Ox, Rock ox rock dot dot io slash blocking, boys.

  • Okay, here we go.

  • Here is someone ox rock to K one on YouTube writes I created a three d implementation with Blue Jays.

  • I love birds.

  • I love birds.

  • I'm like a wannabe burner.

  • I have one of those life books.

  • You know what the life book is, where you write down every single bird I've ever seen.

  • I travel.

  • I know I've talked about this.

  • I traveled to Norway to ruined up Bird Island to see the puffins, which I didn't see.

  • But I had an amazing time there.

  • Well, I won't rehash that story of going to Norway, but allow you to adjust relevant values in real time.

  • You can play it here, Linc.

  • I also posted the scripts on Get Hub for any who are interested.

  • I will bring its get hub dot com slash ox rock slash Boyd's.

  • But let's run this and see.

  • I don't not know how to program in unity.

  • It's something I have always wanted to explore.

  • But I love like I love the fact that there's this actual, like bird flapping three D model animation.

  • I don't know how well this is reading.

  • You know one thing I would love.

  • Everybody who watches my videos to always be conscientious of is contrast ratio.

  • This is really important thing to consider when you're making content on the Web for except accessibility.

  • People with low vision can honestly read text that it's not high contrast in there.

  • Certain Web accessibility standards that would be good to follow.

  • So anyway, I'm not sure if you can see this, but you can see there's bird count separation distance cohesion, Elijah Mint alignment, momentum and settings.

  • So So, anyway, I would like I would play around with this.

  • You can add a lot more birds, but I encourage you to check this out on your own.

  • It is really interesting to see this play out in three D, Daniel asks in the chat.

  • Is unity only first c sharp?

  • Um, so, uh, is unity only for C sharp?

  • You both.

  • I think C Sharp is the programming language of unity.

  • You can also program, apparently in Java script immunity, but wonderful.

  • So thank you for this To Ox Rock.

  • This is really exciting to see.

  • It kind of makes me think about wanting toe try a little unity.

  • And also, I still want to put this out there.

  • Anybody who wants Thio try No one tried this.

  • I don't think I'm gonna go here.

  • Um view Rule Flake.

  • Yes.

  • So I mentioned this that in the book The Computational Beauty of Nature, which is Ah m i t press by Gary Flake Gary Flake describes 1/4 rule for flocking view Move laterally away from any boy that blocks the view.

  • And the theory here is that if the Boyds in addition to the alignment separation cohesion rules are also trying to keep their view clear.

  • They might actually end up in the kind of pattern you typically see of birds in the sky.

  • That V pattern.

  • That pattern emerges without a leader through the local interactions between those birds.

  • Okay, so let's go Thio.

  • Uh, let's go to Shiffman dot net Randomizer No, it's not that Shiffman dot Get hub dot io Let's put in a toothpick for yea, let's submit these Let's spin the wheel.

  • OK everyone.

  • Speaking of accessibility, I really need to work on this.

  • Uh, look, it's very like holiday themed today.

  • Okay, Um, here we go.

  • Which one will I do?

  • Oh, it's gonna It's gonna stop before it gets all the way through this.

  • I'm pretty sure.

  • Oh, I really have to.

  • The Foret Siri's first.

  • I really want to do the toothpick series.

  • I even even rigged up overhead camera, which is no longer on Wait, my overlook, They even rigged up overhead camera.

  • You know everybody.

  • These are my nose hairs.

  • Whoa, That maybe a little bit dizzy, actually.

  • Be perfectly honest.

  • All right.

  • I guess we're guess we're starting with four.

  • Yea, Siri's Oh.

  • Huh?

  • All right.

  • So I need to get myself set up a little bit on.

  • Um, first, let's pull up a bunch of links.

  • Smart every day.

  • I thought this video Let's pull.

  • Um actually, let's go.

  • Thio, Dogus blawg, which is in Turkish.

  • But there's actually dough.

  • GE has a post which was translated into English.

  • How am I gonna find this Twitter?

  • I think so.

  • What I'm doing right now, just so you know, is trying to find all the resource is that I used to make sure I credit things properly.

  • Ability Mrs Lovell about.

  • Okay, hold on.

  • I just want it.

  • Either we go.

  • I'm pretty sure that's the Twitter handle on, then.

  • Yep.

  • And then somewhere in here is a post translate English the great.

  • We're gonna do this.

  • Um, we're gonna come down here to look at this.

  • Okay, um, then we are going to also go Thio three blue one brown for a A um, this this video is really remarkable if you have not watched, but what is Oh, I forgot that this is still on the move.

  • The overhead.

  • I'm so sorry.

  • And I realized that was there if you have not watched this, but what is the 48 transform?

  • So when I make an edited when I make an edited version of this asses like a short coding challenge video, I will probably reference to watch this and the smarter every day Video first, because I'm essentially, like the way that my channel works if you haven't watched it before death, is that I try to do that Sort of like last step implementation.

  • Sometimes I know exactly how the math works and I can explain that sometimes I'm relying on somebody else's deprivation or proof of a formula.

  • I'm just figuring out how to make it work, but I want to show the entire process from start to finish of creating this visualization.

  • Even if we don't understand every interim step, we could understand every line of code.

  • So that's what.

  • But this could not is really a remarkable explanation of the 48 transform.

  • There's also actually a really nice, better explained, better explained for Yea, I was looking at this also, um, is excellent and interactive guide to the four game transform.

  • And so now I think I can close out all these other things and then I'm gonna do this.

  • I'm gonna do this in the P five Web editor.

  • I think this can work in this, I think is I mean, there's nothing simple about what I'm gonna do.

  • It's very hard.

  • I had a really hard time thinking about this and trying this out this week, but, um, I think it's a a smallest amount of code.

  • What is the password?

  • Oh, no, it's just coding train.

  • That's why, um, it's a smallish amount of code that I think I could do it in this editor so that there's an online version that you confined.

  • Oh, and then, of course, we would not be able to live without Wikipedia.

  • Uh, no.

  • For a serious I want for a a serious.

  • Yet Here we go.

  • All right.

  • And so one of the things that I love, but OK, here we go.

  • Oops.

  • Did I lose?

  • The better explained.

  • I've got this.

  • I've got the Wikipedia.

  • I've got the block post.

  • I've got the three blue in Brown's video.

  • Let's let's get this somewhere as I referenced it.

  • There's a, like, a mind blowing part of this to me.

  • There's so many mind blowing parts of this video.

  • I've watched this video.

  • Probably think over 10.

  • So but And also we can move this to, like, just like this would be good.

  • Like, look at this.

  • The mechanical.

  • See, this is I wish I could do stuff like this.

  • Build mechanical things.

  • Uh, someday we can dream.

  • Okay, so this I've got the code thing here.

  • I'm gonna put that here.

  • Oh, better exploit.

  • Lost the better explained.

  • I don't know why One of the things I love about this page is talking about is this smoothie to recipe?

  • So I was trying to come up with my own metaphor to explain what a 48 transform can do.

  • And then I read, though that's really good.

  • Maybe I should use it.

  • I should come up with my own, but I'm gonna use this and credit it.

  • Okay?

  • All right.

  • So, uh, how's everybody doing?

  • Everybody ready for this?

  • Let's get the white board going.

  • Looks next time I live stream, maybe you might remember to actually erase the white board before I use it, huh?

  • This, by the way, is a book of Christmas songs for the ukulele that I just got delivered to me yesterday from Amazon.

  • I also have this keyboard, but that's what I used last year.

  • But then there's the eraser.

  • Wonderful.

  • Okay, so this was my diagram of the flocking stuff.

  • Let me erase that.

  • I have so many good toothpicks chick ideas, dropping them on the floor.

  • They were gonna be lots.

  • I All these plans on the four.

  • A series is gonna really get him.

  • It's gonna It's gonna make my head hurt.

  • Race, race, race, race, race.

  • Let's make sure I have a working marker.

  • Hello?

  • I'm over here.

  • Um, and four years.

  • Four.

  • Yeah.

  • Let's write this for E A.

  • Fully a new full.

  • Okay.

  • Very.

  • I'm not gonna write transform.

  • Just gonna I'm missing for a series.

  • All these aren't related into related terms.

  • And that definitely gets, um, like hearts.

  • Like a little rainbow for 40 eh?

  • Maybe, Like some stars.

  • Okay, how we doing?

  • All right.

  • Can you tell that I'm procrastinating?

  • That I'm, like, terrified and don't want to drive it?

  • All right.

  • Uh, here we go.

  • Okay.

  • Toothpicks.

  • Just just think of the possibilities.

  • I will have Thio first Read some random numbers.

  • Uh, let's see here, huh?

  • It's gonna help me relax.

  • Before I get started with the for a series, I will be reading from a 1,000,000 random digits with 100,000 normal deviants.

  • If you were waiting for me to actually do some coding, I'm so sorry.

  • Page 165.

  • 4289.

  • 214,176.

  • 88,185.

  • 52,360.

  • 665 785 7626.

  • 5000 for 79.

  • 91,000 140 Ok, CC Goche writes in the chat.

  • I'm French and you don't pronounce for you.

  • Hey, correctly.

  • Okay.

  • Sorry.

  • Uh, if you would I'm totally game for a lesson on pronouncing Foley a correctly in French.

  • Um All right, let's get started, actually doing some coding, So let's call this, um okay.

  • All right, here we go.

  • How's this font size?

  • Can people see this font size?

  • Okay, I think this is gonna be a fine size for the canvas.

  • Why?

  • What is going on?

  • It's weird.

  • There we go.

  • Okay.

  • Something weird happened for a second.

  • The whips Let me do this.

  • I think it's actually better for me too.

  • Just increase the font size this way.

  • My computer is really acting up and then have a larger canvas to work with and then give myself a little more space.

  • Okay, fool.

  • He eh?

  • Is that Is that better?

  • What is going on on this computer?

  • I let me just It makes me nervous.

  • Hold on.

  • Just make sure things were working.

  • Yep.

  • Alright.

  • We're fine.

  • Having a little panic attack.

  • Okay.

  • Uh, what did you not just see that change?

  • Just command s that it changed.

  • What is going on?

  • All right.

  • I gotta just We're going to code.

  • Doesn't a second, but I'm having a little bit of a panic.

  • Here.

  • Let me close this.

  • I have a feeling that this pain, not this page, but this page is running a lot of real time job, script e stuff.

  • And so I wonder if that is causing problems.

  • Yeah.

  • Editor, I wonder if I need to, like, move away from the editor.

  • Some weird stuff is happening.

  • Um, okay.

  • All right.

  • Something weird is going on, but let me just just bear with me for one more second, all right?

  • It's not getting the last thing I say.

  • You know, something got fixed, so I'm gonna not use the web editor right now.

  • I'm just gonna actually use a a visual studio code.

  • I think this might I'm sorry to, like, go off topic yet again.

  • I'm really proud.

  • I really will be starting this in a second, but I'm just gonna point this out.

  • I have a feeling that issue 6 75 Yes, I have issue numbers memorized.

  • This is a bug in the web editor that the leaf site dialogue shows even after you save your work.

  • And this was just fixed within the last 18 hours.

  • And I think there's, like, something.

  • Maybe something that this fixed, like, broke something else.

  • So, um, so I am going to what I'm gonna do this will take me just another couple minutes.

  • So apologies.

  • I could also just do this in processing, but, um, I think I want to do this in jobs for a couple of reasons.

  • So what I'm gonna do is, um give me a second here, actually.

  • Better take this way.

  • So if you're wondering what I'm doing, you can check out all my workflow videos which show how I work and create these projects.

  • Way use.

  • Okay, Now I'm ready.

  • Sorry for that little, uh, pause thing, but now we are ready.

  • Um, this is actually a nice Oh, you know what?

  • I'm gonna start with this This because this is basically exactly what I'm going.

  • Thio recreate.

  • So I will have this open here.

  • Being is I don't know how to pronounce that.

  • This which is the problem uh, let me cycle the cameras again.

  • Really?

  • Getting started now.

  • Everybody Okay, You know what?

  • I'm going to I'm gonna do this.

  • Yes.

  • Okay.

  • All right.

  • So just so you know, this is basically exactly what I am about to program, and I'm going to get started right now.

  • Just open this computer backup in case there's any emergency messages.

  • Um, okay.

  • Stretch.

  • Hello.

  • Welcome, Thio.

  • A coding challenge for a a Siri's.

  • So what, I am going to program in JavaScript using the P five Jess library is exactly this.

  • This is what's known as a four e a Siri's.

  • It is a Siri's of wave patterns that when summed up together, approximate some other function.

  • What does that even mean?

  • So I'm first of all, you should I'm gonna show you some resource is the things that got me thinking about this topic and wanting to make this coding challenge.

  • And you probably should, if you want, stop this video.

  • Look at these Other resource is and then you can come back if you want.

  • Or maybe you're just off doing something else.

  • So pretty recently, smarter every day came out with a video called What is a for a serious explained by drawing circles.

  • This video reminded me of amazing video that I watched a TTE some point in the past, I guess, like almost a year ago, called What Is the 48 transform of Visual introduction?

  • You?

  • Probably if you've done any coating and programming, you've probably heard these terms before.

  • F F t fast Fourier Transform.

  • It's usually referenced in the context of analyzing sound and so smart.

  • Every day's a video was a collaboration.

  • Worked with a a Turkish researcher on this website here.

  • I'm not gonna attempt to pronounce it.

  • I will.

  • Billy Nina's goose salon dot net.

  • I encourage you to check out and read this whole article, but this is a visualization again of exactly what I want to do.

  • A series of wave patterns visualized as a path along a circle.

  • Periodic functions some together to approximate a square wave.

  • And if we can make this happen in Javascript, then there in theory, is no reason why we couldn't then figure out how to draw any given path as a series of 48 transforms, and there's like a sort of well known gift for video of this like crazy set of circles drawing Homer Simpson.

  • So I'm hoping to get there.

  • But this video, I just want to by the end of the video, have exactly this pattern in Java script.

  • Okay, so I also want Thio a reference this website better explain dot com, which has a nice article, an interactive guide to the 48 transform.

  • And this, I think, is a really excellent excellent relations gonna get started coding in a second, But you're just gonna have to humor me.

  • So let me kind of talk about this a little bit more just to get my feet under me here.

  • So the idea of a 48 transform So a sound wave, right?

  • We have this idea of a sine wave.

  • You've probably seen me draw sign ways on the board or in code and countless videos usually drawn something like this.

  • The sine wave has a frequency, which is how fat How how often doesn't repeat like if if this is the sort of X axis like this is one whole cycle, right?

  • And I could think of that as like the time it takes for this circle to pat this dot to go around the circle, so frequency is like how, how, how, how many cycles of the wave per unit of time, like per second per frame?

  • There's also amplitude.

  • Amplitude is the height of the sine wave.

  • How how much distance between the very top and the very bottom, and so a sound, a pure sound, the tone, the musical note that was meant to pit a G And that was I don't have any close to perfect pitch.

  • Who knows what note I just sung.

  • We could get the Ml five machine learning rejection model.

  • Tell us that's another story for another time could be represented as a sign with So But you probably have seen like, Oh, I've got this recording device Sound d thinking.

  • And what it's doing is it's like thistles like the sound.

  • This is the wave.

  • This is the representation off the sound that I'm listening to right now.

  • Well, you can create this kind of wave pattern is typically, actually the sum of multiple wave patterns can be represented this way.

  • That's so so in other words, if this is like the musical note a and then this is like the musical note something else and would add these two waves together.

  • Can you still see where I'm driving?

  • You know, I might get something that looks like this, right?

  • And I've done this.

  • I think I have, like, an additive way video in the nature of code.

  • Siri's about this kind of idea.

  • The idea of the Foret transform is Can we go right?

  • I could have these two waves.

  • I could add them together and get this pattern.

  • Could I go in reverse?

  • If I'm listening to a sound like this, Could I pull out all of the waves, the sounds, the frequencies that make up that that's like pitch detection Or if I wanted to then filter out a very high pitch sound If I could take the sound, break it apart, take away one of the high pitched sound added back together, I would get this.

  • So this is akin to I love this metaphor here in the better explain off Unscrew the ing a smoothie.

  • So I'm like to make smoothies.

  • Actually, little note back.

  • Uh, I was like anyway so but could you like right?

  • Let's say I take some mango and some kale into blueberries and some like almond milk and mix them all together and I give it to my Children.

  • I say, Major, this beautiful smoothie.

  • Can you guess what's inside of it?

  • There's actually a game we actually play at home.

  • I just realized that this is perfect.

  • Well, if I could do a foray transform, I could take the mixed smoothie and filter out a new going reverse and find out all the ingredients.

  • That's the idea.

  • So that's the idea before a transform.

  • That's conception.

  • What is now?

  • What I want to do in this video is I'm not gonna worry about figuring any of this out.

  • I'm just now I understand what it is, what it can be used for.

  • I have this goal eventually of having it, using a for a serious to draw any arbitrary path.

  • But one way to get started with that is exactly what's demonstrated here on this website, which is, Could you What What way is you need to add up together to end up with a square wave and you can see here This is actually a really nice visualization is as as you have.

  • You have Maura more iterations of the Foret Siris how it converges even closer and closer to the square wave.

  • I can also just go here to Wikipedia and find this again.

  • So this is the clue.

  • So there's this idea in a 40 a series of 48 coefficients and some kind of like, intuitive thing of like n and n plus one and end plus two.

  • And we can actually see a nice clue to that in here.

  • This is actually a very this is one of the simplest for yea Siri's.

  • What is the Siri's +1357 Can you guess the next number nine?

  • Right.

  • What's up with that 11.

  • So if I could just implement this each one of these circles and, like, have them rotate around like this at that period or frequency with that amplitude, we're gonna get somewhere.

  • So let's talk about this for way too long.

  • Let's try to actually cut this down.

  • All right?

  • So the first thing that I'm gonna do iso where's my coat?

  • Here it is.

  • Here it is.

  • Okay, so the first thing that I want to I'm just gonna start.

  • I'm gonna start, like, kind of You're not thinking about the Foret Siri's.

  • And I'm just gonna make up a variable called angle.

  • You really think that it's time It might be more appropriate for me to call this time because time is moving forward.

  • That's a sort of crucial idea.

  • And I'm just going to say time equals every time through draw.

  • If you haven't.

  • Sorry, let me make this a little bigger.

  • Um, that's too big.

  • If you haven't a working p five before, draw is a function that loops over and over again over and over again.

  • So time is moving forward.

  • Then what I want to also do is I just want to like a draw circle somewhere.

  • So I'm gonna translate toe like, uh, 200 pixels over and 200 pixels down.

  • I'm gonna have this idea of a radius like the radius of a circle that I want to draw is maybe going to be 50 pixels.

  • And then I'm going to say a lips at 00 with that radius.

  • Times too, because the lips function expects a diameter radius is half that.

  • I'm gonna make this white some to say Ah, stroke to 50.

  • US stroke to 55.

  • Somebody told me how to get rid of that auto complete, and I still haven't done it.

  • And I know, Phil, So when I go back to the browser and refresh it, I've got a nice circle there.

  • Let's make it a little bigger.

  • All right?

  • So now what I want to do is how can I have that dot traveling around the circle, let me have the dot traveling around the circle.

  • So the way that I would do that is I would use a polar to Cartesian coordinate transformation, and I certainly have a video that talks about how to do that.

  • But what I'm talking about here is, if this is the radius and this is the angle which is really in my program the time how far over an ex and how far over and why can be calculate how far up and why could be calculated based on trigonometry.

  • So the radius Times co sign of the angle or angle is the X value.

  • The radius times sine of the angle is the y values.

  • So I'm gonna do that here.

  • I'm going to say, uh, say let X equal radius Times Co sign co sign of time and let why equal radius times Sign of this sign of time.

  • I should write pause and turn that off on.

  • But let me get through this first point x.

  • I'm definitely gonna pause and turn this off point X Y I'm gonna say stroke 2 55 stroke.

  • Actually, let's make this a circle also s So we're gonna say, like, a lips ex wife.

  • Just gonna make it smaller, like eight pixels.

  • And let's also say Phil to 55 that's making me crazy.

  • And here we go.

  • Look at that.

  • There's that circle moving right circle is moving.

  • And maybe it makes sense to also draw a line from a lying from 002 X y.

  • And now I've got this and I wanted to move a little bit faster and honestly, I'd like it to go the other direction.

  • I'm not sure I should actually check.

  • What is it doing If I want to recreate exactly what's here?

  • Yeah, that's moving the other drinks.

  • So I've got the beginnings of this now, I haven't worried about the number four here and the fact that I've got the angle divided by pi, but we'll get there.

  • Okay, um I'm gonna pause for a second.

  • This will get when I release this as an editor video.

  • This will get edited out.

  • Let me try to find.

  • Okay, So also, bomber is, um, makes a good point.

  • Writes in the chat I am I am using for a series and 48 transform interchangeably.

  • But they're not the same thing.

  • That is absolutely correct.

  • Not my intention to use them interchangeably.

  • Let me see.

  • Um, let me.

  • So first thing I want to do is figure out.

  • How does somebody in the chat No.

  • How to turn off that auto complete?

  • That's making me crazy.

  • And then maybe I will try to give a statement to clarify the difference.

  • Um, um, So hold on.

  • How do I turn off?

  • Visual studio code auto complete.

  • Uh, press.

  • Simply press escape.

  • All right.

  • Second could disable it in the V s tool settings.

  • Requires a restart.

  • A visual studio to take effect.

  • Um, thank you.

  • Smarter every day for the super.

  • That's very kind.

  • Unnecessary, but kind.

  • Did I miss any?

  • I should really make sure I didn't miss anyone else.

  • Um, so hold on, I Let's just turn it off completely for right now.

  • Visual code, studio tools.

  • Um, auto Complete.

  • I was Java script like it's not just gonna turn this off right now.

  • I like Tab completions, but let me just turn this off.

  • Okay?

  • Now, still doing it?

  • Let's let's see if I restart a visual.

  • Studio code was what the doctor ordered.

  • Um Ah.

  • Oh, This, by the way, is what programming really is.

  • The instructions do not match the behavior.

  • Let's actually, this is unlike the unity website.

  • Someone's got no.

  • Oh, editor, Except suggestion on commit character.

  • False.

  • Okay.

  • Thank you.

  • Me?

  • I am so me.

  • Let's try.

  • By the way, it's a visual studio

Hello.

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it