This video is titled circle animation example. So now for a bit of fun, we get to produce some animations with our code. We're going to be working with a given code and inserting the codes that we've been working with into that code. So I need to go over this process. You're also going to be of course, given these codes, and I've commented them pretty thoroughly to help explain what you need to do. But I'll also go through it step-by-step here and I want to explain the parts of the code and what they do. As of this first example, I'm doing a pretty simple animation that's just based on moving a circle. If we just take a quick look at the animation code, you'll see that between these lines here, 26 and 11, is where I'm going to be or you're going to be inserting your code that you're working with. You'll also note that it needs to be indented. That's important because it actually exists within a loop that's producing the frames of our animation. So in this case, I'm creating a circle and then I'm just moving the circle in the x. Up at the top of the code here, I have my only input, which is the number of frames that I want to output. The default is 10. Of course, I can do more than that, and then I loop through this number of frame. So the variable frame is our iteration variable, and that's simply a counter. So it starts at zero and then it goes to the maximum number of frames that I've input. Now, it's important to know that to do some animation, I'm probably going to use that iteration variable within my code. So in this case, I'm using it, I'm adding a little multiplier to it and saving it in a variable u and using it as my x. We could even make that x, because it is our change in our x. So let's just do that so it makes sense, because it's setting our x position for each frame. That's essentially animation, it creates a circle at the origin and then moves it by certain value and then it's going to save each frame. So the rest of the code down here, just to explain it, the other thing, you need to give a location for where you're going to save all these frames. Because the code essentially is screen capturing my right on screen, run on space screen, and then saving it as a PNG file into a folder that I specify. So I need to specify the path to that folder, and I'll show you an easy way to do that. All this stuff here, all this is really doing in this render step function is it's giving a name to the file. Because each file, it needs to be named sequentially. So it's doing that automatically as it captures the frames using this command line code. So you're not going to change anything here, that's going to work the same. You don't need to change. This is calling that and it's sending the frame number to that because it's using the frame number to do the naming of the files. Then this is just telling it where to render it to. It's giving it the render folder name. Something that you do need to change though down here, although it could be optional, this is deleting the circle before it creates a new one. So we get to see the circle marching across the screen. If we didn't have this and I can show you with and without it, it's going to overlay the frames on top of each other. Before I run this, let's just talk about the location, because you're going to want to specify a location because this produces a lot of frames. At default, it is just 10 frames, but if I set it to 50 or 100, I'm going to want to specify a folder to save that in. So if I close this and I've created a folder on my desktop called render. If I right-click it and I go under properties, it's going to give me the path for its location. You'll see I've c, users, gwill and desktop. So I could copy that and then go back into my code. Here I've just put a double backslash. So you're going to want to do that, but you can paste that in whatever your path is to your folder. Then you have to put the name of the folder in exactly as you wrote it, followed by ending it with two backslashes. So that's something that you're going to need to specify also. So let's see how it works. So essentially what this does is that I input the number of frames and it runs a loop that loops through those number of frames, and it's going to move this circle using that frame loop as a way to move it along the x. So we should see a circle here and then we'll see its copies march along here. So it's asking me number frames to output, 10. Let's go to 20 and hit Enter. Then we see our circle marching along 20 times. Now, let's go to our folder and it's produced are 20 frames. If I double-click on the first one, should open that up in a viewer. Then I can click through these and it shows me the frames of my animation. So in the last part of this lesson, I'll show how to compile these into a gif animation. So in the next video, I'll show slightly more complicated patterning animation and how to drop that into this code, which is what you're going to be doing and producing an animation from that.