## 7. Maths Radians

Radians are the hidden core behind trigonometry and can be a little tricky to understand at first. But once you get the hang of it, you will never want to go back to measuring angles in degrees.

OpenGL, GLSL & WebGL Tutorials for the computer graphics beginner

Radians are the hidden core behind trigonometry and can be a little tricky to understand at first. But once you get the hang of it, you will never want to go back to measuring angles in degrees.

Trigonometry is one of those things that makes people run for the hills, but once you understand it, you won't know how you ever lived without it.

The dot product is one of those elusive things that you aren't taught soon enough (In my opinion). If you want to do any lighting calculations yourself, then the dot product will be used extensively for diffuse calculations.

Vectors are the back bone of 3D graphics, without them, the world of computer graphics would be a very messy place. And knowing the length of them often comes in handy, especially when looking at intersections and collisions.

Lines, who doesn't love lines. They start at one point and end at another. In fact, lines are essential. What makes up a triangle? 3 lines. How do we draw a circle? A lot of lines. Knowing about them would be a good idea :)

Pythagoras theorem is essential if you are doing anything that involves triangles. One of the building blocks of mathematics.

The distance formula is one of the first things you learn once you get into maths. It is fundamental, especially when it comes to collision in computer games.

Level of Detail is a means of decreasing the polygon count of an object to gain a speed boost in your application. This is an extremely simple take on this, which simply draws every fourth vertex. The best part is, that on such a large terrain, you don't even notice this.

Vertex Buffer Objects are used to store vertices, their indices and other information on the graphics card, for OpenGL to access directly. They are extremely fast and effecient, and are meant to supersede Display Lists. So lets use them for our terrain!

Textures are going to be what make and break this terrain. A nice looking tutorial, and you will be seeing grass, mud, rocks and sand, but a bad texture and you will see just a bunch of colors. Lets add a nice texture to our terrain shall we?