Placeholder Image

字幕表 動画を再生する

  • looking test.

  • 12 check.

  • 1212 Check.

  • How is how is my audio?

  • How is my audio relative to the music?

  • I should be live in Just a minute.

  • Uh uh.

  • Check 12 Testing the sound again.

  • This time for real.

  • I think it's everything is working.

  • All right, here.

  • Here we go.

  • Polar to Cartesian Coordinates.

  • Polar to Cartesian Polar too cartoonish in four minutes.

  • Hey, here.

  • Welcome, Thio.

  • Oh, no!

  • Train whistle, Nobel!

  • Where did I put these things?

  • Pickle Pickle.

  • Have a new sidekick.

  • You can't see my psychic.

  • I gotta get a sidekick can on this whole extra camera here, which will allow you to see my little sidekick Cam.

  • But where you going, Pickle?

  • I don't know where I am.

  • I don't know My buttons.

  • Wait a sec.

  • Oh, there we go.

  • Excuse me.

  • Everybody hold on a sec.

  • We start over.

  • Let's start over.

  • We're gonna start over.

  • Okay?

  • Pickle?

  • All right.

  • Uh, we're putting on this music.

  • We're going back to the opening screen on Coming to You live from Brooklyn, New York.

  • It is the coating train with your host.

  • Me, Daniel Sheaf mon and its coating, buddy, Okay, look.

  • All right, I'm back.

  • I'm attempting to get back into life Streaming.

  • It's very hard for so many different reasons.

  • And I know everybody around the world is dealing with so many different kinds of things.

  • And I hope that me just being here, uh, you know, possibly once a week if I'm lucky, maybe even more making some coding tutorials, say hello.

  • Bringing sum's from China cheer and ridiculously well, the music is actually quite excellent.

  • My interpretation and maybe my use of the music I could do a better job of.

  • But, you know, here we are.

  • I've got a green screen.

  • That's little upgrade for today.

  • I've got a one of these blue microphones that's working.

  • I have a headset which, um currently there's nothing going on in here.

  • But if I had a producer they could like, tell me when I'm getting things wrong.

  • Like my physics formulas off.

  • My code is broke and I could hear them in my ear So you eventually could talk to my ear if if things go well, it's 4 p.m. Eastern time right now, and we can make it till 5 36 o'clock and our half to two hours towards the end.

  • I might like to see if I can answer some questions.

  • I gotta introduce you to Pickle.

  • Pickle.

  • Pickle is sleeping so calmly here on the floor.

  • I think it's worth it here.

  • OK, come on, Let's go.

  • Oh, alright.

  • What's this gonna do?

  • Um, here.

  • Where?

  • Where We're gonna go here.

  • Here we go.

  • Hi, Pickle.

  • Say hi.

  • Oh, yes, It's my baby's.

  • Uh there she is.

  • A girl.

  • Good girl.

  • Yes.

  • We're going to do some coded.

  • Trained together?

  • Yes.

  • Good girl.

  • Good girl.

  • Okay.

  • Okay.

  • Putting this care of back wherever it was supposed to be, Uh, which is here?

  • What's the chances in the right spot?

  • Maybe this is where it's supposed to be.

  • That's better.

  • This is for my diagramming.

  • Um, and there we go.

  • Erase here.

  • Wait.

  • Where?

  • What happened to my soundboard?

  • The battery died?

  • No, but it's plugged in.

  • You should be getting charged.

  • Charged power?

  • No.

  • It says it's not plugged in, but is plugged in.

  • See?

  • See if don't come alive.

  • All right.

  • I have no sound board right now.

  • Sorry.

  • Uh, that's that's a good girl.

  • That's a good girl.

  • It just really keeping me saying I lost my soundboard.

  • Here I am.

  • Uh, wait, Mark Robur is live streaming right now.

  • I thought that was at four o'clock on a Friday.

  • Go watch, Mark Rober.

  • I'm just here doing I'm not even like sweating.

  • More women here have no idea what I'm doing.

  • Gonna do a coating tutorial.

  • I think I'm gonna be talking.

  • Hopefully more than just like the brothers doing right now.

  • Soundboard.

  • I really feel all right.

  • I have another idea.

  • Let's see if this works.

  • But this Give me power.

  • Come on, Sound board.

  • You could do it.

  • Look, it must be cable.

  • Which way do you go?

  • This way.

  • Down there we go.

  • I've got power.

  • I've got power.

  • Got power.

  • Okay.

  • All right.

  • Okay.

  • Pickle.

  • How would I need another?

  • I definitely need another web cam.

  • Okay, but wrong one.

  • Here we go.

  • All right.

  • Welcome to the coating train.

  • I and Dan, I am at home, as almost all of us around the world are.

  • I am in New York City and wriggling in Brooklyn, which is definitely a scary and place to be these days on.

  • And I hope that all my neighbors are doing well.

  • I hope that you're watching this.

  • You're doing well.

  • And, um, I'm trying to get back into the rhythm of doing work.

  • I teach classes of N Y.

  • U.

  • Those classes were happening remotely.

  • My kids are here being home schooled me.

  • They have some some video calls with their teachers and classmates and work being assigned to them.

  • But they need a life hoping, supervision.

  • So that takes up a lot of time and energy to eat all the time.

  • There's a lot of feeding going on, so my week's air just kind of insane.

  • But where we're here, we're happy.

  • We're doing okay.

  • And I found that its last week I'd managed to finally get around to make trying to live stream.

  • It was Saturday.

  • This week's a little bit earlier.

  • It's Friday afternoon.

  • Who knows?

  • Maybe next week I'll be back to Thursday, so a little bit different I've never actually done this is not too happy about it.

  • Actually, I might want to change is that I sit.

  • I always stand when I live stream.

  • I liked a piece around, move around, jump around, just have that energy of standing and it's kind of like it lets me know that I am live streaming.

  • I am performing in a way for the Lifestream right now I'm sitting.

  • So, um, I'm not so sure about that.

  • Um, I know, but I'm just gonna sit for a little bit.

  • I also actually, it's looking fine.

  • I have a secondary light.

  • If you look at this, there's pretty.

  • There's, like, a pretty good, decent shadow here.

  • Have a new light which is coming from this side.

  • I have a new polarizing filter on my camera, which I think is helping with the reflection in my glasses.

  • I really wanted to eliminate the reflection in my glasses, which I think I've done a pretty decent job of.

  • I don't know.

  • I can't actually tell you what I'm looking at.

  • You can't see my monitor over here, but I do have another light.

  • This doesn't This is the emperor's new light here, but this I have a light that I could attach to here.

  • I was gonna put it right here and try to fill in the shadow.

  • But I'm not gonna worry about that right now.

  • I also need to figure out about recording two disc so that, if anything that I do today as any value whatsoever that I could that I could work with Macha, who is the editor for the coding train, and put together a video that would be uploaded separately afterwards.

  • For example, I'd like to try to do a coding challenge today.

  • I have my whiteboard over here.

  • Wait, that's weird.

  • And my smaller Oh, no.

  • That's what this is what it should be.

  • And then this just goes to the full camera.

  • There we go.

  • Um, So there's So let me think about this.

  • How am I going to work this?

  • Um uh my soundboard back.

  • Everything will be fine once I have my back.

  • No, it's charging up.

  • Its target are drawn up, charging up, searching up.

  • People are watching from Iceland.

  • That is amazing.

  • Hello, Iceland.

  • Um, let's go to here.

  • I think we should do some wheel spinning today.

  • Ah, would just start with a wheel spin Wehrli noise?

  • These are things that are in the sort of pipeline marching squares.

  • What are some other like algorithms that I have not programmed recently?

  • That could be fun to do because I could just pick between these two.

  • I should just do early noise.

  • Let's take a look at the, uh um coding train.

  • Suggested topics Sitting thing is really weird.

  • I feel so low energy.

  • Um, we've got some new ones that have been opened up recently.

  • Two dimensional to scream for a transformed for images.

  • Didn't I do that?

  • Or maybe this this has to do with the image crossing.

  • I visualized common math algorithms.

  • Um, particulate id pie.

  • Let's see.

  • Let's look often, I assigned them to myself when I feel like it's something I'm going to do.

  • Auto encoder.

  • Okay, just do that.

  • That would be fun.

  • Uh, Fibonacci Spiral.

  • Think I have I think I kind of did that already.

  • I've done a lot of these.

  • The open ones.

  • A lot of these have been done.

  • These are the two that I was sort of most recently thinking about.

  • Lets you were Lee noise as just Let's forget about that wheel spinning thing I'm gonna get to.

  • I'm gonna get to the wheel spinning.

  • Uh, Tetris, Um, let's just do let's do a coding project that is, like, totally manageable.

  • And look at these images.

  • It's that that is manageable.

  • That will give me a pattern like this.

  • This might look like a lot of these Look like a paranoid test elation, Which there's Worley noise, which is a variation of which is that its name for Steven Wereley, But truly cellular noise, which can be depending on how you implement it.

  • It's basically a you're getting this Brian test elation, which is another coating.

  • Tom said I should do.

  • But look at this one.

  • Interesting gizmos and games, but there's there's some ways to get some interesting variety.

  • Look at this.

  • I don't actually know how to get it to look like that.

  • That's interesting.

  • I know.

  • I feel like this.

  • I've seen you.

  • Look at this.

  • These are interesting.

  • All right, we're gonna attempt to do this.

  • I'm just, like, launching right into it.

  • I'm gonna open up processing.

  • It's gonna be a test.

  • Now I need to record two disc.

  • So I'm gonna press this button here, and I'm recording this.

  • I want to attend to also record.

  • I want to attempt to also record the green screen separately.

  • And the software that I do that is, um, here and I'm just give me a minute here.

  • I didn't get a chance to do this in advance.

  • I talk amongst yourselves.

  • Um, it's how do I create that virtual?

  • Oh, it's just too.

  • It's our audio coming in.

  • No, there might be, though, if I do this, um, audio, audio, audio, audio, audio, audio, sex.

  • There we go.

  • Audience settings.

  • Um, it's getting some audio from interesting from the camera itself.

  • I need to create a virtual camera.

  • Um, and I don't remember how to do that.

  • New ad Input a puppy back in a minute.

  • Sorry.

  • I'm setting up some good figure agent stuff so I could recur this green skin on its own, which maybe is not really gonna video.

  • Browse blank broth.

  • More, more, more virtual virtual virtual set.

  • No, that's interesting.

  • Video image camera, virtual camera camera.

  • Uh, no, that's the one that I want.

  • Um, stop capture.

  • Virtual.

  • No virtual set is what I want.

  • Camera.

  • Huh?

  • You should understand.

  • That's definitely true.

  • Bands done this before on my other streaming computer.

  • This is faster.

  • Go walk.

  • Go watch Mark Rober stream.

  • Come back in just like five minutes.

  • Tell me what's going on in there.

  • Maybe I could do.

  • Is there something that he's teaching that I could do a coating version of, um, input.

  • All right.

  • I gotta look this up, people.

  • I'm looking up on my V mix virtual camp.

  • Is that not what it's called?

  • I guess I could just try to record this audio.

  • Maybe I just need to Do I have an idea?

  • Uh, add input settings.

  • All right.

  • I think I might just have to record NTSC 29 1929 7 That's right.

  • Um, audio courting.

  • All right, let's just hit record and see what happens.

  • Audio mixer.

  • But there we go.

  • Inputs game captured.

  • I wanna add an input.

  • Oh, I know.

  • That's what I could do.

  • Add an input.

  • Uh, audio.

  • There we go for house.

  • No, no, no, no audio, but not a file.

  • Don't be ridiculous.

  • Sorry, everybody.

  • What happens?

  • Audio.

  • More audio input.

  • There we go.

  • At device?

  • Yes.

  • The microphone is exactly what I want.

  • Yes, there we go.

  • I've got my microphone audio.

  • There we go.

  • Now I'm gonna do record.

  • 00 it is.

  • The monitor is on.

  • That's okay.

  • I could just meet this.

  • Do you hear that?

  • Weird echo you're gonna get feedback to.

  • Okay, Here we go.

  • That's good.

  • Now I'm gonna hit record, and I put one fine before.

  • It's fine.

  • Let's just try that new file.

  • Every let's say every 30 minutes on Dhe.

  • Okay?

  • And am I recording?

  • I'm recording.

  • Okay, I'm recording.

  • Oh, look at me here.

  • Um, okay.

  • All right.

  • The lifestream today, I made a, like a last minute decision.

  • Like I'm just gonna do it.

  • Just go live stricken.

  • Today market's doing a full on physics class on howto way stuff without gravity, complete with what I believe will end up with differential equations.

  • Well, I would say Mark is doing an excellent job without having watched it.

  • Probably well rehearsed Prepare.

  • Not just like configuring settings on another computer.

  • That's look over here.

  • I'm so sorry.

  • Everybody is not going well.

  • Wehrli noise tweaking of C points and colors would be necessary to make this look like Stone.

  • Who let me.

  • I also need to record separately a screen capture here.

  • Let's see how that works.

  • New screen recording.

  • Oh, uh, record.

  • Entire screen court.

  • Okay, so I think I'm recording now.

  • Here.

  • I want to get the paper out.

  • Cellular texture basis from 1996 and closest point basis.

  • OK, I think that's think I understand how this works.

  • We all want you to make Tetris.

  • I just do Tetris today.

  • I probably should.

  • I'm gonna come back into Tetris.

  • That'll be fun.

  • Not today.

  • Who hate open with?

  • Let's see how my batteries are charged.

  • All right, everyone.

  • How's everybody doing?

  • Good.

  • All right, Let's just give this a try.

  • I pick who?

  • Oh, my goodness.

  • Pickle pickle is a little bit scared of my train whistle.

  • It's gonna be okay, Pickle.

  • You pay about why you haven't made Tetris yet?

  • Is an excellent suggestion.

  • All right?

  • Yes, Yes, I got it.

  • I got it.

  • All right, Tetris, with worldly noise instead of colors.

  • Okay.

  • Yes.

  • Somebody's knocking at my door.

  • My microphone.

  • Come on in.

  • What's going on?

  • I am live through me right now, so you know.

  • Yeah.

  • You want me to view the microphone?

  • Hold on.

  • We've got we've got Let's let's move, Thio, Let me do this.

  • A mute the microphone.

  • Okay.

  • Back that I don't know why my soundboard won't get any power.

  • Should be getting power.

  • Come on, we're getting started in just a minute.

  • Don't worry, This is no professional operation like the Mars rover.

  • Lifestream.

  • Just This is a very unprofessional upper working here.

  • Have I lost all the viewers yet?

  • No.

  • I seem to be gaining viewers.

  • Understand how that's possible?

  • Okay, I doubt this is gonna get edited into anything later, but it's a good it's a good could practice.

  • All right.

  • Welcome to a coating train coding challenge.

  • Okay, Who?

  • I don't know.

  • And hi, Bruno.

  • Yeah, I was gonna D'oh.

  • I sort of felt like I should do one of these, sir models, which I think is interesting.

  • Toe Look at you know why?

  • How how an infection spreads how social distancing or physical distancing whatever term you want to apply to that can slow that spread.

  • And there's an excellent visualization in The Washington Post on that from several weeks ago, three blue one brown did a video.

  • Simon Tiger, one of, um, has done one, and I don't know, I just I don't want to do something that I really have no riel knowledge or expertise in.

  • I'm not sure what I have to add to that discussion, So I think I'm just gonna go with my usual stuff but I will consider that one's gonna be some encouraging words.

  • Alright, here we go.

  • Hello?

  • And welcome to my first coding challenge from home.

  • A new sort of studio set up that I have Looks kind of like this.

  • I don't know how this is gonna go.

  • I've got a green screen behind me.

  • I'm sitting, which is really kind of a problem in terms of my I think the blood's not flowing to my brain properly.

  • I should probably stand up, But what you gonna do?

  • What you gonna do?

  • Here I am.

  • I'm going to attempt to program Wehrli noise.

  • What is worldly noise?

  • What's the algorithm for worldly noise?

  • How could you program early noise?

  • And can I get an image?

  • And I can't think the point over there because I am.

  • I have this little tiny area for myself.

  • This is not good.

  • Like this setup.

  • I don't like this setup.

  • I don't have a sound board.

  • I made a mistake.

  • Should just think I should have taken a nap.

  • Okay, uh, we're gonna go ahead and do this anyway.

  • Oh, you will try.

  • Is this is a test street?

  • This is not my actual coating train.

  • Livestream, move the camera.

  • Yeah.

  • Hello and welcome to coding challenge.

  • Worldly noise.

  • I'm going to attempt to program this algorithm.

  • That is I found over here.

  • Move the O.

  • B.

  • S camera.

  • Yeah.

  • Yeah, Correct.

  • All right.

  • I promise you that.

  • I'm gonna get used to this, and I'm gonna get the momentum going.

  • This is your first time watching.

  • I'm very sorry.

  • This is your second.

  • I'm watching any If you're watching.

  • I'm sorry.

  • I think I can.

  • I think I can manage to bring myself to start to code an example.

  • I just need to get over some sort of like mental block.

  • What's happening to me right now Weren't for 25 PM All right, bag Poland.

  • We didn't get a one million special.

  • No, no.

  • Having trouble?

  • I'm having trouble.

  • Welcome to a coating train coding challenge.

  • I am recording from a new studio set up, so things might be a little wonky, but I'm gonna try to make this video.

  • I'm gonna try to program this worldly noise thing.

  • I'm here in Brooklyn, New York, at home with the lights and the camera in a laptop.

  • But I'm sitting, which is really weird, and I don't know why I'm sitting, but we should be standing.

  • I like to stand while I code.

  • I'm sitting, Everybody just take a deep breath with me And let's try to make something fun.

  • Let's try to make something beautiful.

  • I'm gonna make a very simple version of just this algorithm, and I don't think it's gonna take that long.

  • And from there, maybe you can make your own creative twist on it.

  • Share it.

  • We can do that will be something.

  • That's a thing we could do to learn something to enjoy ourselves and to be together through this medium off the Inter Net video through a lens myself back.

  • No.

  • All right.

  • I have to give up on this, and I gotta plug it in.

  • Um, I gotta plug it in over.

  • Cameras falling, Do you hear?

  • A weird.

  • Can I turn on slow mode easily right now?

  • Not usually.

  • I'm gonna plug this in over here.

  • Really Should charge this in advance.

  • Come on.

  • I think this is gonna make everything good.

  • No, no, no, no, no.

  • Okay.

  • Okay.

  • Okay.

  • She's not used to being on my huh?

  • All right.

  • Okay.

  • Ready?

  • Okay.

  • Okay.

  • Here we go.

  • Try this one more time.

  • We're gonna try this one more time.

  • It's nice that everybody is always leaving me friendly comments in the chat.

  • Alright, here we go.

  • Welcome to the first coating.

  • Train coding challenge from home.

  • Gloria Pickle and I are really into this new algorithm called Wehrli noise, and, uh, she suggested it, you know, I think so.

  • At least knows, kind of pointed in the direction of worldly noise when I was looking into her web pages and I thought, Let's program it as the first coding challenge from home, I've got a new setup.

  • Things are probably gonna be a little bit wonky.

  • I'm just gonna give I'm just gonna do my best.

  • Honestly.

  • Like, if I'm recording this during a live stream, I don't know if there's ever gonna make it to edit video.

  • If it does, I'll be shocked.

  • But the poor people who are watching this live street have watched me try to get started coding something for just like the last half an hour.

  • And I'm really having a difficult time.

  • But I think my friend little friend here, Gloria Pickle, she's gonna help me out.

  • I'm going Thio, be strong and get to coating something built like a tank.

  • This one.

  • Okay, go down there, girl.

  • Okay, Go back to sleep and we're gonna get started.

  • Um What What is worldly noise?

  • I've got Oh, shoot.

  • What happened I had set up is all messed up.

  • Oh, this is the wrong, huh?

  • It's doing so well.

  • Physical.

  • This way back.

  • Come on.

  • Whenever I moved anything, it's not.

  • I totally like the whole thing is out of whack this way.

  • Okay, good.

  • Okay.

  • Um, so what is worldly noise?

  • First, let's just have a discussion of what noise is.

  • And I want to visualize noise in a two dimensional canvas in a window on a computer and the way that individualized noise noise being another word for randomness is by setting every single pixel color of a two dimensional window to some pixel to some color.

  • And I'll just do pure noise readiness.

  • Gonna open up my processing window here, and I'm going to add set up and I'm going to add draw.

  • I'm gonna make the window size 400 by 400 let's run this and I've got my window over here.

  • I'm gonna save this as worldly noise draw black background.

  • Then I'm gonna do a nice four loop.

  • I'm gonna loop over all the exits and all the wise, um, I'm going to get an index.

  • Finally is the top.

  • The typing noise is good.

  • Yeah, I know.

  • Processing.

  • Processing.

  • Okay, so here I am in processing, I am going to write, set up and draw.

  • You know, I don't think this needs to be commend.

  • This is this is how I get that they're okay.

  • How's the font size?

  • By the way?

  • I'm gonna make this project in processing, and I will also release a job script version of it.

  • But because I'm gonna do this Operation Pixel by pixel could be very slow and jobs for canvas.

  • So without worrying about optimizing and right now, I'm just gonna stay in a desktop environment processing built on top of java.

  • So I was set up function.

  • So I have a setup function up there, which give me my window size 400 by 400 in the draw loop, what I want to do is set every single pixel, so every single pixel in the window is going to have an X Y location.

  • I can generate over every single Fick pixel with a nested four loop.

  • I want things to be excess.

  • So this.

  • So this loop here looks at every single X and every single.

  • Why, then what I want to do is set every pixel at that exit.

  • My location.

  • So pixels index something to a random value.

  • So I have to figure out the pixels in a processing window.

  • Our store, the colors are all stored in an array, a one dimensional array.

  • So I need to know for any given X y, what is the index into that array?

  • And there's a nice formal I can use where the indexes x plus y times with with itself.

  • Now, this is something I've gone over countless times, but I'm just gonna go over it again.

  • This particular video let's say that I have my window that has 1234 That's five by 1234 It's five by five.

  • Okay.

  • And if I'm looking over here, the x 0123 which is right here.

  • And the why is 01 which is right here now, if I were to count the pixels individually.

  • 0123456789 10 11 12 13 14.

  • How do I get this number?

  • Well, it is.

  • How many over its X is three.

  • So it's three over 45678 It's actually pixel number 83 plus five is eight.

  • Then this pixel would be 13.

  • This pixel would be 18 because we've got to go five more down every row.

  • So the X value three plus the why value one times how many pixels are in each row?

  • Five gives me eight.

  • This is the formula, so I can apply that formula in my code here X plus y times with, say, pixels index and run the sketch.

  • I'm curious what I'm missing.

  • A really important detail.

  • Let's run it, See what happens anyway.

  • Yeah, no point.

  • Your exception.

  • Why don't I get a no pointer exception?

  • Because the pixels don't exist.

  • I mean, they do exist.

  • I see them.

  • They're they're they're pixels, but they don't exist because I didn't know they exist.

  • They're they're they're pixels.

  • That's what I said.

  • But I don't have access to them because they haven't unlocked the key to them in memory.

  • And the way that I do that in processing is by calling load pixels function pixels would be a pixel would be a good name for a dog.

  • Sorry, Pickle.

  • Her name is Pickle, not pixel like color.

  • Pixel is a name pixel.

  • Hi, Bixel.

  • Update Pixels.

  • I also have to say update pixels once I've done with the pixels.

  • There we go.

  • So now I have noise.

  • This is not whirly noise.

  • Don't be misled by the title of the window.

  • I haven't implemented Wehrli noise.

  • This is pure noise.

  • Randomness.

  • Now I just want to have it run once.

  • So I'm gonna add no loop here.

  • So draw happens once and I just get a random set of pixels.

  • Load Pickles.

  • Look!

  • All right, So what I've implemented so far is noise.

  • But there are lots of other kinds of noise.

  • I probably haven't least 10 videos on something called Perla noise and a lot of people are you is that my videos that are called Perla noise is actually not really Perlin noise.

  • It's fractal noise.

  • Or maybe it's radiant noise because can Perlin revised Perlin noise to something called simplex noise But simplex No way says it's sort of interesting history to that.

  • But I was using a different video, open simplex noise and what all these different kinds of noise algorithms are.

  • They're all rooted in randomness at their core, but something different happens along the way.

  • What I implemented here is literal, just randomness.

  • The only algorithm is pick random brightness value between zero and 2 55 But each one of these has a different kind of twist on that with Pearl annoys, The idea is really to create a smooth noise, and you get these nice textures and appear like clouds or marble, and you could do a lot with them.

  • So I would love in my life to implement every kind of noise that ever existed.

  • I've done some of these different videos.

  • I implemented them, but I made use of them.

  • But in this video, we are going to do worldly noise.

  • Another name for that is cellular noise.

  • Okay, were Lee Noise was in his name for Steven Wereley in 1996 and there's this actual paper, a cellular texture basis function.

  • So I encourage you to posses video now and enjoy reading this paper I would love to do a dramatic reading of it for you, but I'm not going to at the moment, I'm just gonna stick to something very, very basic here, which is just following what literally written.

  • I'm gonna make my own.

  • I'm rather than read the paper all the way through and try to follow that to build worldly noise.

  • I'm just going to follow this summary simplified Sylar That's on the Wikipedia page.

  • And there's really just two steps in this algorithm.

  • Number one randomly distribute feature points in space, and I could use a two dimensional space or three dimensional space.

  • And actually, what's interesting about this is I even know what I'm drawing here is a two dimensional space.

  • Every pixel is in two dimensions.

  • I could think of the worldly noise space as three dimensional, but visualize a slice of it.

  • I think that's the way I'm gonna start this, to be perfectly honest.

  • So if I go back to we could be the first step is randomly distribute feature points in space.

  • I'm gonna make an array of P vectors.

  • We call that the features.

  • Let's just make five of them and make each one a random point.

  • So each point has an X and A Y and Z now the range of what The X and y are clearly within my two dimensional canvas of 0 to 400.

  • I'm just gonna consider it to be a box a cube where every dimension with the height and the depth is all the same.

  • I'll just use it with four Z.

  • Come on back to me, then, just to understand that this is working, I'm gonna comment this out and I'm gonna draw all those points.

  • Let's skip the Z actually, and I must say the background so we can see that there were Each time I run this, I'm gonna get a new set of points.

  • No, I don't.

  • I'm not so worried about visualizing the Z I could do.

  • The interesting thing I could do is I could say, um, let's make the stroke Wait.

  • I will map the features Z, which has arranged between zero and with, and I'll make that between one and like 12.

  • So that way I can sort of see the depending on the Z value will be a larger or smaller point so you can see what's going on here?

  • As if this one is closer.

  • Now, the perspective not rendering this with any kind of three D perspective.

  • I'm just trying to get a sense of what the data is.

  • So now that I have that, the next step is af of an ex is distance and closest point to X.

  • What does that mean?

  • I don't like my lighting lighting.

  • Seems weird.

  • What's it?

  • Uh, a lot of people watching this right now, which is giving me a little boost of energy.

  • This is, by the way, a nice little coffee mug here.

  • I guess there's some green in it, but this is, ah, drawn by my daughter in her art class class.

  • Mmm.

  • Can you put your laptop up?

  • You're looking down, which is weird.

  • Yeah, and I've got this hat on too.

  • So I'm probably doing this.

  • I should stand.

  • Shall we move to standing?

  • It's too late.

  • I should move to standing.

  • I should move the camera back.

  • I should move to standing.

  • Um, okay.

  • Do I trash?

  • I try to do this slow mode thing because I can.

  • I could make that happen.

  • How's my only see how my sound boards doing 12%.

  • It's up to 12%.

  • That's pretty good.

  • Okay, alright.

  • Here we go.

  • How these these parties?

  • Not bad.

  • Um okay, that because it's the Orioles.

  • No, I'm gonna tell you something.

  • Baseball has canceled, which means the Orioles are tied for first place.

  • This is there year.

  • I think they might finish the year tied for first place.

  • Okay, um, moved to standing, please.

  • All right, What part of this was all right?

  • I'm trying to understand this noise.

  • Half of an ex is distance to end.

  • Closest point to ex.

  • See?

  • This shadow behind me is really bothered.

  • Ready?

  • Here with us.

  • Make it happen, people.

  • The car is there.

  • Still.

  • There you go.

  • We have sound word.

  • Complacent music.

  • World noise thing is gonna continue that a second.

  • Don't worry.

  • Good.

  • Let's just see here.

  • Here's how this goes.

  • I have these rechargeable batteries and I just charged up.

  • I'm going to attach this light here.

  • Let's let's make sure it's actually gonna turn on.

  • That's right.

  • Okay, that's good.

  • You know how long it's gonna last, But Okay, here we go.

  • This helping anything?

  • How's that?

  • How I look it Let's, uh weird.

  • It's going on.

  • I don't know if that's better.

  • Maybe I should just have this light over here, like from two sides.

  • All right.

  • I don't haven't really improved anything, but that's what it's gonna be all right.

  • Okay.

  • Where's my mom?

  • So I have my noise space with some number of seed points.

  • Now what I want the next step is for any given X y point, which I guess is just really called X here.

  • So for any given X right here, the noise function of X so I could have a f of one of X, I can have an f of two of ex.

  • He is basically equal to the F closest point meeting wth.

  • This is maybe the first Let's let's draw these points in a more obvious way.

  • And then I will number that.

  • Where's so we have this point this point, this point this point and maybe I don't know another point over here.

  • So this is the first closest point.

  • This is maybe the second that this is the third.

  • I don't know.

  • I have to get out, ruler, But this is the fourth and this is the fifth.

  • So the idea is, but I can choose a different end.

  • But for any given end, I want to color this, get a random value.

  • It's not ran, it's it's random because thes seed points are randomly distributed.

  • But now that those points have been distributed, the color for this particular pixel is specifically a function of the first closest point second close point or the third closest.

  • So going back to the code and let's make these let's make these red so that I'll be able to see them more easily.

  • Let's put the pixels back in.

  • Just make sure everything's working together.

  • Let's make these points a little bit larger so I can see them better.

  • So now I want to look for ever given pixel.

  • Which point is the closest are actually I don't know.

  • It's like for every giver, every given pixel.

  • I want a sordid list of the distances to all the points.

  • So right here I'm gonna create an array of distances, which is a new array.

  • Uh, how many values need to go in it?

  • The same number of values of the same number of C points, so features not length, then I need to loop over all those.

  • Let's get the distance between Actually, I need to store the distance between what?

  • Between the X and A Y, the given pixel that I'm looking at and the given a feature point that I'm currently on in terms of this iteration cycle.

  • And actually we want to keep Z here.

  • So these points, I'm just looking at a slice where z zero.

  • But I want the X, the Y and Z of all those feature points that you know.

  • It's lovely about this.

  • I could just sort that because it's just an array of floating point numbers.

  • The process pressing has a sort function which knows how to sort an array of numbers.

  • So I could just say sort the distances that makes a new array.

  • Well, we'll find out.

  • And then I just need Thio Get that distance.

  • Let me get the closest one.

  • So this is, uh this is if and is zero.

  • So just have everything named correctly in my code.

  • Let's create a variable called end and set that equal to zero.

  • So the distance I want to look at the ends.

  • Closest it.

  • I want to look at the end closest distance in the array and then set that to be the color interesting in sort of start to see little.

  • It's little circles that are going on here Now I need to deal with some map in here.

  • The mapping is way off, right?

  • Because what are these?

  • What's the range of these distances?

  • Well, it's somewhere between like I mean, really depends.

  • The cube is the with height and depth is all equal to 400 or or with is the global variable.

  • Let's use a mapping.

  • So let's call.

  • The brightness will just call.

  • That B is mapped the distance, which has arranged between zero and with divided by two.

  • Just take half of that.

  • And when it's really close, I wanted to be super bright when it's really far away.

  • I wanted to be super dark.

  • So let's make that the color for every given pixel.

  • Mmm.

  • What did I get wrong here?

  • I've got something quite wrong here at a distance.

  • This looks good to me.

  • I run it again.

  • Like get a different result.

  • No.

  • Oh, wait.

  • I wonder if no no germs.

  • Distance Sore brightness in next.

  • This looks X.

  • The Why?

  • Let's get rid of the Z for a second go.

  • I guess I just My range is really off because of the Z.

  • The depth space.

  • Oh, you know what's going on here?

  • I think I think the sort function in processing is making a new array.

  • Yes.

  • OK, so the sort function this sort function was not with sorting the array, but it copies all those distances into a new array so that Ray wasn't actually sorted.

  • So I need to create a I need Thio take the new array and said, You said equal to itself on now Let's put the Z back in.

  • Oh, this is zero.

  • It's just that slice.

  • There we go.

  • That makes more sense.

  • Uh, let's create a lot more points.

  • I'm just curious people in the chatter very upset with my wasting of memory.

  • Well, you know, life goes on interesting.

  • So I'm going to draw the sea points anymore.

  • So this is what I've got.

  • It looks a little bit strange, mostly because of Max said I'm not upset.

  • Upset.

  • Good.

  • Yeah.

  • I'm gonna worry about the memory stuff in a bit, but this is this is this is good enough, right?

  • now, so this has a kind of strange, almost spherical like quality to it.

  • It's because I started with this three D space and once again let me let me Let's go back!

  • And, uh, let's just have three d seed feature points to D features.

  • So if I get rid of the Z point now I have you can see this looks much more like a verone oi test elation Because literally what we have is every point is colored according to its closest to the closest point we have.

  • This looks exactly of runaway test elation is the definition of a Verona test.

  • Elation is cells where cells that are divided by the dividing line, where all the points in the cell are closest to a particular seed pointer feature point.

  • You can kind of see these now because I'm coloring them according to the distance.

  • You get these kind of like blowing little spots, and what's interesting about this is right now and I don't know.

  • I don't know what the frame rate is here.

  • Let's let's take off no loop.

  • And let's, uh, let's let me just print the frame right out for a second just to see.

  • Am I even going to possibly get a reasonable animation here?

  • I'm kind of running.

  • You can't see this because I'm covering it, but I'm running it like five frames per second, which is terrible.

  • Let's go back.

  • Let's go down to, like 400 by 400 just 25 seed points.

  • There's lots of things we could do to optimize this on.

  • I've got 30 frames for a second because what I want to do now that I think will be fun to look at is what happens if I go through and look at do this same loop where I look at all the points and move them around randomly.

  • Gonna do essentially a random walk with each of them.

  • We could see if we could see what's happening right.

  • If those points move around the world, the noise is interesting.

  • Now.

  • I haven't done anything having them moves smoothly or with any kind of thoughtful behavior.

  • But you could start to imagine if these points were moving with a flocking system or any other kind of thing that I've done in this channel.

  • It's pretty interesting what we've got.

  • Let's go back to the three D features?

  • Yes, the distances are much greater.

  • I cannot get the three d one toe look like what I want.

  • I think I know what the issue is.

  • Cindy, Let's move these around again.

  • I have interesting.

  • You know, I guess the Z is so large that it might make sense to actually, uh, consider this something like, Oh, because I'm a zero also.

  • Oh, interesting.

  • You know what I should do?

  • I should really for this to make more sense.

  • I should really have this be a number like this.

  • Move on.

  • I should really have ze range.

  • Like, I want that slice to be in the middle of this cube that visualizing.

  • So I think that that would make more sense.

  • And then I think it's gonna kind of map yet.

  • So this is

looking test.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

自宅でできるコーディング電車 (The Coding Train at Home)

  • 2 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語