Monthly Archives: August 2013

A Barter Session Engine for a Game

The JavaScript code included below implements a simulated barter session for a computer game. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript.  Or, for an online … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Visualizing a Solar System with a Base Plane and Elevations

The JavaScript code below renders a solar system in three dimensions. Each planet’s height above or depth below a reference plane is shown by a perpendicular line that connects it to a grid on the base plane. To see the … Continue reading

Posted in Uncategorized | Tagged , , | 4 Comments

Visualizing a Network of Nodes on the Surface of Sphere

The JavaScript code shown below generates a random network of nodes distributed across the surface of a sphere, connects them together with links, and then renders them as an image. To see the code in action, copy it into an … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Approximating Mathematical Functions with Taylor Series in JavaScript

The JavaScript code below uses Taylor series to approximate the values of several mathematical functions (namely, e^x, sin(x), cos(x), and ln(x)) and displays the results. To see it in action, copy the code into an .html file and open that … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Filtering Images with Convolution Masks in JavaScript

The JavaScript code below runs a given image through a few different filters and displays the results to the screen. To see it in action, copy the code to an .html file, copy an image named “Test.png” to the same … Continue reading

Posted in Uncategorized | Leave a comment

Generating a Random Landscape in JavaScript

The JavaScript code below will generate a random topological map. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript.  Or, for an online version, visit http://thiscouldbebetter.neocities.org/landscape.html. When … Continue reading

Posted in Uncategorized | Tagged , , | 2 Comments

Exploring Hashing Algorithms and Hashtables in JavaScript

The code below, when executed, implements a hashtable in JavaScript, inserts several values into it, and then reads them back out. To see it in action, copy the code into an .html file and open that file in a web … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment