Monthly Archives: February 2017

A Word-for-Word Inline Translation Utility in JavaScript

The JavaScript program below, when run, prompts the user for a passage to be translated into a foreign language and a dictionary that provides translations, then presents the translated text interleaved with the original text. The translation is word-for-word, which … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment

Simulating Hardware in VHDL Using GHDL

Follow the steps below to create a simple “Hello, World” program in VHDL using GHDL. VHDL, or “VHSIC Hardware Description Language”, is a programming language used to simulate the operation of computer hardware in software.  It provides a standardized method … Continue reading

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

Exploring the PNG Image File Format with a PNG Viewer in JavaScript

The JavaScript program below, when run, prompts the user to upload a PNG file and displays that image. To see the code in action, copy it into an .html file and open that file in a web browser that runs … Continue reading

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

Decompressing Data with the DEFLATE Algorithm in JavaScript

The code below, when run, prompts the user to upload a compressed file in GZIP format, which will then be uncompressed, and the uncompressed data will be displayed both as hexadecimal digits and as UTF8 text. This implementation of DEFLATE … Continue reading

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

Rendering to Texture with WebGL

The JavaScript program below, when run, will display a simple three-dimensional scene rendered with WebGL. It is nearly identical to a program from a previous post, except that this version demonstrates how to render a scene to a texture, rather … Continue reading

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

Finding Collisions of Circles and Line Segments in Javascript

The JavaScript program below creates a field full of circles and line segments of random size, position, and velocity, and calculates and displays the collisions between them. To see the code in action, copy it into an .html file and … Continue reading

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

Finding Collisions of Circles in JavaScript

The JavaScript program below creates a field full of circles of random size, position, and velocity, and calculates and displays the collisions between them. To see the code in action, open it in a web browser that runs JavaScript.

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