Skip to content

mrElnekave/3D-Rotational-Matrices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotational Matrix Project

This is my project for Mathematical Models in Linear Algebra, where I explore the use of 3D Matrices using my library, rubato. The project comprises a gimbal locking demo that explains the phenomenon, alongside slides and a video detailing the mathematical processes involved in the project's implementation.

SKIP TO THE INSTALLATION GUIDE

SKIP TO ACCOMPANYING SLIDES AND VIDEO

Background

Rotational matrices are mathematical constructs that describe the rotation of objects in three-dimensional space. They can be used to define the orientation of an object and to rotate an object about a specific axis.

The Cube and Donut

The project features two objects: a cube and a donut. The cube was created using 3D modeling software, while the donut was generated using Matlab. The objects were then exported in a format compatible with the programming language used in the project.

Run

Rotational Matrices

The rotational matrices formed the foundation of the project's ability to spin the cube and donut around different axes. The process involved the calculation of a transformation matrix for each rotation and applying the transformation to the object's vertices. The transformed vertices were then rendered to display the rotated object.

Check out how they were made and how they are used!

Gimbal Locking Demo

The project includes a demo that explains the phenomenon of gimbal locking. Gimbal locking is the loss of one degree of freedom in rotation that occurs when the rotational axes of an object align. The demo uses a straightforward example to illustrate the occurrence of gimbal locking and demonstrates how quaternions can help to avoid it.

Try it out here!

Accompanying Slides and Video

These slides describe the mathematical processes involved in the project's implementation.

This YouTube video provides a walkthrough of the project's features and thoughts on the project's implementation.

Conclusion

The Rotational Matrix Project showcases the use of rotational matrices in manipulating objects in three-dimensional space, including a cube and donut. The gimbal locking demo and accompanying slides and video provide a thorough exposition of the mathematical processes involved in the project. The project has potential applications in areas such as game development, computer graphics, and robotics.

Installation

  1. Make a virtual environment *If you want to: Venv

  2. You must install rubato: Rubato

Improvements:

  • Repl.it demo.
  • Linux C support
  • Enhance the gimbal tutorial, adding colors to the different axes zero markers.
  • Use matrix multiplication and possibly create a shader for the GPU, instead of pixel by pixel computation.

About

Creating projects for Math 2B

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published