Posts Tagged: Javascript

Verlet collision with impulse preservation

Nov. 29, 2010
comments

This article presents a system to integrate verlet physics collision with preservation of impulse. Normally verlet physics annihilates a lot of energy from a system, which makes it very stable but also quite unrealistic. Additionally simple methods of preserving impulse yield very unstable systems, a limitation which can be overcome by two steps of integration, one for at-rest acceleration canceling, and one with impulse preservation.

Hard Constraints, Easy Solutions

Sep. 01, 2010
comments

In the previous post about integration methods, I took a look at gravity integration. Gravity is a good example of a soft constraint. It does not impose hard limits to movement of bodies. But what if we need hard constraints, for instance like steel beams? The following post explains how to implement hard constraints.

Integration by Example - Euler vs Verlet vs Runge-Kutta

Aug. 28, 2010
comments

In this post I'm testing different integration methods for a gravity simulation. The results can be inspected interactively in the canvas tags that accompany each test. Hover with the mouse over the illustration to start its simulation or click the illustration to reset the simulation.

Geo programming with python and javascript

Aug. 27, 2010
comments

As mentioned in a previous post, I built a widget using Google maps that tracks a friends journey using GPS logs. This post is about how to build such a widget.

Javascript Compression, Madness

Aug. 25, 2010
comments

A couple days ago I wrote a post about how to do the n-body simulation in javascript with canvas. But if I wanted to submit it to js1k, it needed to fit into 1024 bytes. The following post is about my own javascript compressor written in python. I start with 3.1kb then get with minification to 1.4kb and with my own compression algorithm to 0.9kb.

html5 canvas and the flying dots

Aug. 22, 2010
comments

The header of this page features a couple flying dots in the Grey strip. They are drawn using a html5 feature called "canvas". Canvas is pretty cool, it makes a lot of things possible for which you had to use flash previously. This post is about how this works including lots of code and math.

Abaeus Image Gallery

Jul. 31, 2009
comments

Abaeus is a web image gallery. It is designed with the aim to be minimal and non distracting to the user.

Jquery Suggest

Jul. 31, 2009
comments

jquery.suggest.js is a jquery plugin that allows you to provide a google like autosuggest functionality for your text input fields.