Clinton Montague

Developer, learner of things, functional programming enthusiast, hacker, and all round inquisitor.

Lunch-time hack: Day 3 – Visualising forces between repelling particles

June 9, 2011

See demo → var WIDTH = 500, HEIGHT = 500, PARTICLES = [], STARTING_COUNT = 100, MAX_PARTICLES = 200, DAMPING = 0.05, CURRENT_FRAME = 0; var canvas = document.getElementsByTagName (‘canvas’)[0]; canvas.width = WIDTH; canvas.height = HEIGHT; var ctx = canvas.getContext (‘2d’); init (); function random (min, max) { return (Math.random() * (max – min) + […]

Lunch-time hack: Day 2 – self organising particles

June 8, 2011

In today’s hack I wanted to play with a self organising particle system, so I set about writing a loop which worked out the distance between each particle and generated a force based on that. It was a lot to think about so I didn’t quite get it working in 15 minutes and decided to […]

Lunch-time hack: Day 1 – playing with processing.js

June 6, 2011

It’s certainly not the most exciting thing you’ll ever see, but hopefully things will start to change over the coming weeks/months when I really start to get a feel for which effects are created by certain of code. For my first lunch-time hack, I thought I’d give myself an introduction to processing.js. It’s not very […]

Introducing the lunch-time hack

Do you ever think it would be cool to tinker with a new technology/framework but never get to the end of a project because it gets stale and boring? Me too. So I’ve invented a new part to my daily routine called the lunch-time hack. The mission is simple: create something cool in 15 minutes. […]