Phys 142 - A Complex Matrix Multiplication Program

Note: My code here starts with: #include <iostream> #include <vector> #include <complex> using namespace std; A good introduction for iostream is cplusplus.com’s Basic Input/Output article. It is basically printf, except...

Phys 141 - Sample Quadtree Code

Here’s some very functional Quadtree code. I don’t really want to call it “minimal”, because it includes some bonuses that make the code nicer. Files included are: Vector2.h. This allows...

Phys 141 - O(N^2) Gravity in CUDA

Here’s some sample minimal CUDA code optimized for the lab computers. Simply extract to a directory, type “make run”, and watch the CUDA program create a 30 frame animated gif...

Phys 141 - Winter 2018 Miscellany

Here are some notes I’ve compiled for physics 141/241 winter 2018. Directory On For Loops Fastest way of writing the O(n^2) acceleration code: Unit Conversion in Gravitational Simulations Drawing Many...