We know how to get a flat object into a computer by using a grade of 2D coordinates. But that doesn't help us if we're trying to study a tornado. How can we get a 3D object into a computer so that we can virtually explore the storm so scientists can do their research in safe conditions? Rather than using a flat, mostly two-dimensional object like my hand. Let's take a rounder, more three-dimensional object as an example, like this teapot. It would be difficult to capture the full volume of this shape by flattening it onto the x and y axes. What we need, is a third axis, which goes forward and backward out of this grid. This third axis is referred to as the z-axis. This is a representation of a 3D Cartesian coordinate system. We still have our x and y axes, x going in this direction and y going up and down. But now we have our third axis, z, going this way. If we place our 3D teapot object into this coordinate system, we can trace its outline in a way similar to how we did with a 2D object in a 2D coordinate system. To turn this 3D object into numbers, let's begin by quantifying the position of this point. If I take my ruler and measure first any x-axis, that's about 28 centimeters, in y, it's about 27 and in z, it's about 25 centimeters. If we repeat this process many times for different points along the tea pot, we'll end up with a whole bunch of x,y,z positions. If we then load those positions into 3D software, we'll get something that looks like this. But now how do we connect the dots? We know from working with 2D objects, that we can connect our vertices with edges. Edges are one-dimensional lines that when put together can form a two-dimensional shape. Similarly, you can put together two-dimensional shapes to create a three-dimensional object. When we connect our vertices with edges to make a closed shape, that resulting shape is called a face. With these four vertices, we can make our face four-sided like this or we can make two three-sided faces like this. One of the rules of this virtual connect the dots game is that edges aren't allowed to cross. Every corner of a face has to be on a vertex. Here, we have some corners that aren't on a vertex. So if we were to define our faces like this, we would likely run into problems. If we connect the vertices that we collected from our teapot with faces of all different kinds of shapes, we get what results in a polygon mesh. There are many different kinds of meshes, but the most common type of mesh that's used to describe 3D surfaces is a triangle mesh, where all faces are made out of triangles. But no matter how we connect the vertices, you can see that there's a lot of blocky parts to this teapot, with lots of straight lines where our physical teapot was smooth and had lots of curves. To make our virtual teapot looks smoother, we have to go back and collect more vertices. By making more vertices, we can make more triangles, and more triangles, is what makes the teapot looks smoother. You can think of increasing triangle count as increasing the resolution of your object. This looks like a good amount of triangles. While I could keep increasing the number to millions, or even billions of triangles, and it might look a little bit smoother, you don't want to go too crazy because having too many triangles can start to slow down your software. So how do we get, from a bunch of vertex positions written down in your notebook, into something that a computer can actually understand? There are many standard ways for importing data like shapes into a computer. One of the most common types of file formats that understands the polygon mesh format that we learned about, is called an OBJ. OBJs end in the file extension.OBJ. They're simple text files that can be opened in any old text editor. Let's take a look at this very simple OBJ file. The first part of this file describes the vertex positions. Each of the lines that starts with a V describes one of the five vertices in this file, the three numbers that follow describe the x, y, and z positions. The second part of the file describes the faces. So this object has two faces that start with the letter f. When we're describing faces, we are not actually referring to the positions like we do when we describe vertices, but we're referring to the number of the index. So here, one is referring to this first vertex. Two, is referring to this second vertex. Five, is referring to five. Three, is referring to three. It's important that these are described in the correct order. The next face describes one, two, and four. We can see that these two faces share two of the same vertices; one and two. If we load this OBJ file into any 3D software, we'll see this result. Here we're looking at a square connected to a triangle, and they share these two vertices, just as we expected. There are many other file formats that you can use to describe a shape or an object. OBJ is just one of the easier ones to create and it's supported by all major software. An OBJ file can have additional information but vertices and faces are all that you need to describe a basic shape. More advanced file formats are often written in binary, which can only be read by computers as opposed to plain text, which can be read by humans. When you're doing coding tasks like writing an OBJ, remember that the computer doesn't check for typos or errors. It's important that your spelling, spacing, and order, are all correct or you might end up with a puzzling result. Now that we know how to digitize three-dimensional solid objects like teapots, we're one step closer to learning how to digitize scientific objects like tornadoes. The virtual teapot that we've been using in this lesson is not actually a digitized version of this exact teapot, but rather it's a famous teapot in computer graphics that comes pre-installed in most computer graphics software. It's called the Utah teapot, because it was modeled by University of Utah researcher Martin Newell, in 1975. The teapot shape was perfect for graphics experiments at the time. It's got a simple body but a complex top and spout with lots of concave and convex curves that meet at interesting angles. The Utah teapot is a standard default model in simulations and computer graphics papers until this day.