
Math
Generating Normally Distributed Random Numbers in JavaScript
Submitted by nwellcome on Sun, 02/20/2011 - 04:53JavaScript's pseudo-random number generator Math.random() outputs what you want a pseudo-random number generator to output: a random number uniformly distributed between 0 and 1. Great, but say you are in a situation where you don't want every number to be equally likely, you want them evenly distributed about a mean. You want a normally distributed random number. To get this you can use the Box-Muller transformation on two uniformly distributed random numbers. Problem solved!
In this demonstration I use the Box-Muller transformation on numbers generated by JavaScript's Math.random() and use the Kolmogorov-Smirnov test to compare the result against a normal cdf table generated by Mathematica to see if they actually come out normally distributed.
Undergraduate Grades Chronologically
Submitted by nwellcome on Sun, 06/06/2010 - 20:37Here's round two of me playing with representing my undergraduate grades. This time I've used Processing which is a neat programming environment for doing these kind of visual sketches.
Visualization of Undergraduate Grades
Submitted by nwellcome on Thu, 06/03/2010 - 00:30I was thinking today that now I have all my undergraduate grades and they represent the largest set of quantitative data I have about myself. So, I started analyzing them and thinking of interesting ways represent them. This is the first thing I came up with:

"Triangulate" Algorithm in Javascript
Submitted by nwellcome on Fri, 05/21/2010 - 03:08Now that the semester is over I thought I would update my nifty Javascript polygon triangulation demo which I first created in February of 2009 as practice for a computational geometry class and promptly didn't touch for a year and a half. It is now interactive (it allows you to draw your own polygon), comes with examples (those that I remember from the class) and works in all modern browsers thanks to the magic of jQuery and excanvas. jQuery is far and away my favorite Javascript library for doing anything and excanvas allows Internet Explorer to join the HTML5 canvas tag party. For the next version of this thing I would like to have an option to explain the ear-clipping algorithm it uses as it goes through rather than just showing it in action.


Nicholas Wellcome is a software engineer fresh out of grad school and newly relocated in Boston, MA 


