Name of this video is dictionaries. So we're going to look at our 2D point matrix. We're going to look at how we can use a dictionary structure to save the point data within that matrix, and what that affords us differently than just saving it within appoint list. So I sketched out small point matrix here. If we think about our i, j loop, and how we're generating the point data from that, and then we're saving it in this list, one point after another. I've shown in some of the videos how that starts with this lower point, that's our index point zero and then 1, 2, 3. So it goes up this way and then it comes back down 4, 5, 6, so on and so forth. It's saving that point data in a linear version. In this direction is our change in j values, and in this direction is our change in i values. I know that because it first goes through the I loop and then jumps in to solve the values within the j. When it's done with that, it then jumps back out and adds one to the i loop and then goes through the j again. I've shown that in other videos. Now we can look at this structure, this point structure, and think about this i, j organization, and wonder if there might be a way that we could save each point as part of that i, j organization. If we think of the j's as a series of rows and the i's is a series of columns. This is akin to, if you've ever worked in a program like Excel, where I have a grid structure for data and I can save my data in rows and columns. So I could have column C and row 23. I could put a piece of data rather than just in a continuous stream of data. If I use a dictionary structure, I can do that. I can organize my point data in that version. So we're going to take a look at that. I'm just going to erase my index numbers here. We'll start to rewrite our point values. Rather than a series of index numbers, we'll write it in terms of i, j. I can do that if I use a dictionary. So if I set up an empty dictionary in my code, let's say that's called point matrix, and we'll use our curly brackets to set that up. Then in my loop, I'm not going to write the loop out here, but you can imagine inside my loop where I'm saving my point data. Instead of using that list, I'm going to use my dictionary to save whatever my current point coordinates are. If I do it in that way, what I'm really doing is saving these points, starting with the lower one here is my 0, 0 point. Since my change is in j that's reflected in that change of that number, goes 0,1, 0, 2, 0, 3, and then jumps back out to my i loop and then changes my i value to one. J is back to zero, and then this is my 1,1 point and 1, 2, 1, 3, so on and so forth. So now I have my j rows here are starting at 0, 1, 2, 3 and then my eye columns here are 0, 1, 2, 3, always starting counting at 0. So now I don't even need to know my point coordinates in order to form relations between those points. I can do it purely based on this dictionary structure. What that allows us to do is I could then, if I wanted to draw a line from my 0,0 point to my 10,2 point, I could do that. I don't need to know what those point coordinates are in space. It also allows me to think of that matrix in terms of a modular structure. So if we look at this first piece here as a module that I can create geometry in and then set up essentially an equation relationship between these different points based on the i, j structure. Let's look at that first module. We want to rewrite these i, j numbers as an equation based on the i, j. That's going to allow us to draw between these points within the module, constructing geometry just based on that equation. So I can rewrite 1, 1 as i, j. If 1, 1 is i, j, then 0, 1 is i minus 1, j. One, zero is i, j minus 1, and then 0, 0 is i minus 1, j minus 1. So let's say I wanted to, and I'm going to keep this really simple, but I just wanted to draw a line in that module from my i minus 1, j minus 1 point to my i, j point. Imagining that we've saved all of these points within our dictionary structure, and then I set up another i, j loop, and I'm looping through those points to be able to construct my geometry. So using the function add line, I can then construct a point between point matrix i, j and point matrix i minus 1, j minus 1. That has to be within brackets, and then I also want to make sure I have the end parentheses for that. That's going to not only construct a line within this first one module, but since I'm going through a loop here, I'm looping through all my points, it's going to construct a line there, there, there. It begins to treat each part of that matrix as a module in itself that I can then create geometry in. Now, I'm not only limited to these points, but I could then create any number of points from those points. If I have a line here, I could find the midpoint of that and I could start to create other types of geometry. I could then scale that geometry based on its position within the matrix, there's a whole host of ways that we can start to change that geometry based on this relational structure, and then of course, we can manipulate the underlying grid without destroying the matrices structure. So it's a very powerful form for creating this kind of modulized geometry, and we're going to go over a number of videos to explore how we can do that within the code. So this is an introduction to that structure, which we're going to use throughout the rest of the course.