Math on Clark Kromenaker
http://clarkkromenaker.com/tags/math/
Recent content in Math on Clark KromenakerHugo -- gohugo.ioen-uskromenak@gmail.com (Clark Kromenaker)kromenak@gmail.com (Clark Kromenaker)Fri, 16 Oct 2020 00:00:00 +0000G-Engine #9: Quaternions
http://clarkkromenaker.com/post/gengine-09-quaternions/
Fri, 16 Oct 2020 00:00:00 +0000kromenak@gmail.com (Clark Kromenaker)http://clarkkromenaker.com/post/gengine-09-quaternions/<p>Way back in
<a href="http://clarkkromenaker.com/post/gengine-04-rendering">G-Engine #4</a>, we rendered a triangle, and there was much rejoicing. Since then, the posts in this series have primarily focused on implementing mathematical constructs in code. This point is the final math pre-requisite before we can move on to more interesting things.</p>
<p>Think of a game engine as its own little universe: at first, there is nothing - the void. Concepts such as time, position, and orientation don’t exist yet. Suddenly, the game loop and delta time introduces the concept of time. With vectors, we can convey positions, directions, and distances. Slowly, our universe takes shape and we can convey important concepts in code.</p>
<p>But what about rotations? Vectors can store position, direction, and scale data, but they are not effective structures for 3D rotations. We need some other option to convey rotations in code.</p>
<p>One structure that is very effective for 3D rotations is the <strong>Quaternion</strong>. Much-maligned for their apparant complexity, Quaternions allow us to efficiently store and use 3D rotation data. In this post, we’ll explore why we use quaternions, what they are, how to perform common operations with them, and finally I’ll provide some tips for writing your own <code>Quaternion</code> class.</p>G-Engine #8: Matrices
http://clarkkromenaker.com/post/gengine-08-matrices/
Sat, 04 Jul 2020 00:00:00 +0000kromenak@gmail.com (Clark Kromenaker)http://clarkkromenaker.com/post/gengine-08-matrices/<p>Matrices are vital tools for 3D rendering. Graphics libraries expect you to use matrices to represent positions, rotations, and scales of 3D objects. Furthermore, matrices provide a convenient/effective mechanism for representing hierarchies of 3D objects and coordinate systems.</p>
<p>This post will briefly explain what matrices are, explain commonly used operations for 3D game development, and provide tips for writing matrix classes for your game engine.</p>G-Engine #7: Vectors
http://clarkkromenaker.com/post/gengine-07-vectors/
Sat, 14 Mar 2020 00:00:00 +0000kromenak@gmail.com (Clark Kromenaker)http://clarkkromenaker.com/post/gengine-07-vectors/<p>We have added a basic math library to the 3D engine, but we’re still missing several fundamental mathematical building blocks to move forward and build full-fledged 3D environments. In particular, I want to implement Vectors, Matrices, and Quaternions. This post will cover <strong>Vectors</strong>, which enable the engine to represent important spacial concepts such as “position” and “direction”.</p>