Skip to content

A mostly object orientated library providing C++ code for physics computations.

Notifications You must be signed in to change notification settings

DJWalker42/laserRacoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laserRacoon

A mostly object orientated library providing C++ code for physics computations.

Notice 1: This code was written with education and learning in mind so do not expect a fully optimised library.

For example, the linear algebra solvers (Cholesky, LU decomposition, etc) are much better done elsewhere (Eigen3 for an example) but the code as presented is intended to be as clear and straightforward as possible.

Notice 2: For excellent YouTube videos of how to run Physics simulations in Python I highly recommend:

https://www.youtube.com/@MrPSolver/featured

It's a great jumping off point to learn Python in general, as well as learning the detials of libraries such as numPy and sciPy.

The library can be constructed from the header and source files found in the inc and src directories respectively. As provided the Makefile will build the library using the g++ compiler the output will be placed into a directory called lib that will be created on the first call to make (tested on Ubuntu and Mac OS X). The intermediate object files are saved in directory called obj that will be also created on the first call to make. For Windows and other operating systems were you might be using an IDE, add the source files to your project and point the IDE to the location of the header files. The IDE will manage the build for you.

For the Visualisation module to work you will need a copy of OpenCV. For Mac and Unix/Linux users you can use your install manager, or you can download a version from the official OpenCV website. This code will work with either OpenCV2 or OpenCV3. The Makefile may need to be modified with the location of the OpenCV headers or point your IDE to the location of the OpenCV headers. You may exclude the Visulisation module from the library; you will just have to remove any references to the Visualisation module in program code ("Viewer" class) and plot any data elsewhere.

In the 'progs' directory is a list of example programs using the library; the majority of these use the Visulisation module. For Linux users there is a MakeFile for your convenience; this will automatically link to the required OpenCV library files for the Visulisation module. For others using an IDE you will have to provide the relevant information to your IDE to link with the correct OpenCV libraries namely, opencv_core, opencv_highgui, opencv_imgproc, and opencv_imgcodecs (when saving the viewer plot as an image). On Windows these library names append the version number and end in a .lib extension. For example if you have OpenCV2.4.9 on Windows then the "core" library is called "opencv_core249.lib".

Why laserRacoon? Well lasers are to do with physics and racoons are cute. Plus now you've all got an image in your head of racoons with lasers strapped to their furry little backs. It's memorable.

About

A mostly object orientated library providing C++ code for physics computations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages