Archive for the ‘Mathematics’ Category

Vector ND – C++

This is a N-Dimensional Vector class written in C++. While it can be used for any dimension, if you would like to use 3 or less dimensions including rotation functions check out my previous post (here) VectorND.cpp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [...]

Vector 3D structure with Operation overloads and basic functions – C++

This is my Vector3D structure with a set of appropriate operation overloads(-,+,/,*,–,++,etc) that I use for various math operations as well. Feel free to add upon it or do whatever you like with it. (Update the — and ++ operators are not correctly overloaded ) 1 2 3 4 5 6 7 8 9 10 [...]

Ackermann–Péter function (2 arguments) – C/C++ – Recursive Implentation

This is an implementation of the 2 argument version of the Ackermann Function (i.e. Ackermann-Péter function). In essence, this is an example of a very simple recursive function is an example of a total computable function that is not primitive recursive. Instead of making the internet even more redundant with unnecessary text, just click the [...]

Is Prime Number Algorithm

I was randomly surfing around the internet when I stumbled upon Google Labs Aptitude Test (GLAT)(Found here). I can’t really remember which links I followed from there but I stumbled into a question that asks to find the first 10 consecutive digits of E that are prime. While definitely not a hard task I wrote [...]

John Conway’s Game of Life + Mutation (C/C++)

I’ve always been interested in AI, evolution simulations, and other interesting problems. But I will never forget one of my all time favorite classics, John Conway’s Game of Life.. This simulation implements a few just a few simple rules, yet relatively complex structures emerge. The rules are: 1. Any live cell with fewer than two [...]

Graph 3D (Vector Rotation Source Included) C++

This program implements my simple Vector3D.h source to draw simple graphs using SDL. While it’s not terribly advanced, it should be pretty fun to tinker with. To learn more about 3D rotations including the mathematics and more source (Java) examples, view my previous post –> 3D Rotation Matrix – Graph3D. The source code and linux [...]

4D Maze – (Java)

This is a simple implementation of a 4D maze written in Java. As of now it is entirely text based however, a simple GUI is currently under development. Either way, this simple implementation should be useful to modify and/or build off of. The algorithm used to generate the map is quite simple and always generates [...]

4D Rotation Matrix – Graph 4D

This program rotates points about the XY, YZ, XZ, XU, YU, and ZU axises. I then projects each 4D vector to the 2D canvas. The Jar file can be downloaded here: Graph4D.jar Before looking at the source, let’s take a look at some of the fundamental mathematics behind the software. If you are uncomfortable with [...]

3D Rotation Matrix – Graph 3D

This was a simple program I wrote that Displays 3D points. It does so by simply projecting a 3D (vector) into 2D. The Jar file can be downloaded here: Graph3D.jar The C/C++ version can be found here Before looking at the source, let’s take a look at some of the fundamental mathematics behind the software. [...]

Powered by WordPress | Designed by: WordPress Themes | Thanks to best wordpress themes, Find WordPress Themes and Themes Directory