This video is titled 3D Point Matrix, and in this video we're going to take a closer look at our 3D Point Matrix and RJK structure within the code that I just described in the lesson. So, how I set this code up is, there's a main function which is calling, collecting my xyz, my maximum xyz values. And I'm calling the point matrix function from that, loading those values in. By default, I have x set up to 5, y to 2. And z to 5, just to make a shallow matrix in the y direction, just to help for legibility. So, those values are brought into the point matrix, and then I use them in my nested loop structure. So, now we have an additional nested loop, the k loop, which creates our point values for z. And, I've done something a little different here, saving my x, y, z values as a tuple in a temporary variable called point that gets overwritten every time I go through the loop. The only reason I do that is for the sort of quick access, quick reference. So, then I can just say point in all of these operations below it, to printing it out, adding it to the scene, then I'm also saving those points. In addition to saving them in the dictionary, I'm also saving them in a continuous list, which I'll explain in a minute. So, let's go ahead and run this. So, maximum x5, y2, z5. Okay, so it's creating a three-dimensional point matrix now, that's, of course, only two points deep in the y because I set it up that way. And it's five points deep in the Z and five points deep in the X because there's a maximum value. Now if we go back and look at the code, we can see where I printed out the key value pairs down at the bottom. That those key value pairs are currently identical, and that's because straight up in my loop x, y and z are just equal to i, j and k. I'm not doing anything to the i, j and k values, but we know from experience with the i, j loop that if I add a multiplier in here, that it's going to change those point values. So, now they'll be multiples of 5. So if we run that again, we'll see that. So now I see in the printout that those point values are now multiples of 5. And the i, j, k key values stay the same. Now, as I said, I saved these in a linear point list, as they were created. And the reason I'm doing that is, I want to loop through that point list so we can take a look at the structure of how they, the order in which they are created. Let's run that. Okay, and we'll take a closer look at this. So, this shows me the exact order in which the points were created. I can see it starts at the world coordinate, where all three values are 000. And then, as I explained with the ij loop that it went through all of j first and then the jump back out to i. Well, this goes all the way to the inner loop. So, it's going to run through k until I've reached KMAX, and then it's going to jump out. And it's not going to jump all the way back out to i. It's going to jump out to j, until it gets to JMAX, and then it'll jump out to i. And so, we can see that structure here, that everything starts at 000. And then it runs through the k. So, it's creating all the points in the z direction. Because the k is the z changes in the z value. And then when it's done with that, that jumps back out to j, and makes as 1 to j, and then it runs through the k, goes into the k loop again. And then remember I'm only doing 2 in j, my JMAX is only 2, and then it goes to i. Goes all the way back into the k again, runs through that. Then, adds another 1 to j, runs to the k, and then comes in, adds another to the i. So, it's showing me that structuring, it's good to be handy too if you don't clearly understand that to just play around with this a bit. To be able to understand that it's a very handy visual tool for understanding that nested loop structure. Now, let's look at it in a different way. So, as rather than a point list, let's look at it as our dictionary structure. So, I've created another nested loop here, below this. So, we'll uncomment that. So, here I'm going through my i, j, k loop. And I'm adding a text dot with my I, j, k structure to each point within the matrices. And now, it's showing me the structure of the i, j, k loop. So here, that's my first point, and then it's changing k, so K gets to 4, and then it jumps back out to j. j changes to 1, and then it runs through the k loop again. Gets up to 4, then jumps all the way back out to i, j and k becomes 0 again, they're reset, i becomes 1. Then it runs through the k again. And then it jumps back out to j, j becomes 1 over here. And then it runs through the k again. So, really super handy tool for understanding multiple nested lists. Now, we can do the same thing that with this matrices structure that we did with the i, j structure. So if I pull out that module, and if I delete everything else here. I've already created a model of this here, in my i, j, k structure. So, we can change these as we did with the i, j and the 2D matrix. We can now create a 3D matrix, which is using the i, j, k structure, and we can start to draw between them. Now, I just created a cube here, just to help for legibility and understanding the position of things. As you can see is super helpful, because these things, these text dots can get lost, overlapped on each other. What I want you to do now after you view this, I think the best thing to do is download this code I've created. Create your own matrix. Pull out this module, and then change these values to reflect the i, j, k structure. So, for example, if I double click here, okay? Anywhere I have a 0 is going to be a minus 1. So, 0 and the first slot is i- 1, 1 in the second slot is a j, 1 and the third slot is a k. And so all you have to do is double click on that, and you can edit it, so 1 1 1 is just i, j, k. And if you wanted to, you could also change the font size to make it a little easier to read. I set mine at 22. And so 0, 0, 0. Well, that would be i-1, j-1, k-1. So, do that for your own module and save that file, so you have it to reference to, because you can use that to create geometry pseudocoding from that in the code and we'll do that in some future videos.