Skip to content

Instantly share code, notes, and snippets.

@evanharwin
evanharwin / aaa_readme.md
Last active October 29, 2018 21:59
Takes a Vector Field and gives a Particle Visualisation.

Vector Field Visualisation Using Time-Based Particle Simulation

Using three.js and Charlie Hoey's GPU Particles ( file: particles.js )

Takes a function that describes a Vector Field over a given domain. Then spawns particles in this domain with a velocity given by the output of the function when given the particle origins.

Also a colour function can be given to output more information. In this case I have used the Curl of the Function.

One should probably note, that the way the particles move over time is in some ways a little misleading as it can suggest a shifting field, rather than a constant vector field.... it's pretty tho.

Also, might have to allow local file loading in browser for this to work.

A Simple Raytracing 3D Graphics Engine

Python - Definitely Not fast But ¯\(ツ)

Written to get back into Mathematics after 4 months Uni Summer Break. Also an awesome thing to impliment, if impractical.

@evanharwin
evanharwin / aaa_readme.md
Last active June 3, 2024 15:29
Venmo Data Scraper - I found out about Venmo's public API and decided to dig deeper.

Venmo Data Scraper - I found out about Venmo's public API and decided to dig deeper.

Oh and then got sidetracked by a frustation with Python peewee ( http://docs.peewee-orm.com ) so started to work on storing data with JSON's with great success but a new-found appreciation for the robust-ness of SQL.

However, I was eventually pulled away from this by a huge volume of 429 ( too many requests ) responses from venmo.com/api/v5/public - given the infrequency of my requests, I wonder if this is a deliberate move from Venmo given the bad press they got due to the sources below.

inspired by why-i-blasted-your-drug-deals-on-twitter and public-by-default

@evanharwin
evanharwin / aaa_readme.md
Last active October 23, 2018 15:37
A simple web-app that takes two random vectors on page load and shows the projection (red) and rejection (blue) vectors. Uses three.js.

A Simple three.js Vector Projection Demo

Made because I needed to learn the formula for Vector Projection and I obviously decided the most ineffient way possible. ... I still remember it, however, so it must have worked ༼ つ ◕_◕ ༽つ

@evanharwin
evanharwin / aaa_readme.md
Last active October 4, 2018 14:26
*Work-In-Progress* A machine learning network that can 'sometimes' diagnose Breast Cancer given measurements of potential tumor. Data taken from https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/
binary = "11000000 00000001"
mantissa = binary.split(" ")[0]
exponent = binary.split(" ")[1]
def denary(binary, point_pos):
total = 0
index = -(point_pos)
for bit in binary[-1::-1]:
total += int(bit) * (2**index)
@evanharwin
evanharwin / EvLang.py
Last active March 13, 2017 20:38
EvLang.py
# The Data Class, currently this shall represent all numbers and be the base of the Var class.
class Data:
def __init__(self, value):
self.value = value
# The Var Class, this shall be a variable with a name and attributed value.
class Var(Data):
def __init__(self, name):
self.name = name
@evanharwin
evanharwin / were_going_on_a_pi_hunt.cpp
Last active March 8, 2017 22:52
Finds Pi Real Quick.
#include <iostream>
#include <math.h>
int main() {
int radius = 26144;
long int area = 0;
int x = radius;
double max_y = radius/sqrt(2);
double distance;
### for rotation gonna need to change the SDL renderer class. Fun. Needs doing and document.
import time, timeit
bodies_with_velocities = [] # a definitve list of anything and everything that moves
rigid_body_list = []
# class Quadtree: