Lomont.org

(Also lomonster.com and clomont.com)

WarningLegalese: I am not responsible for any damage these downloads cause, etc. I cannot ensure they will perform on all systems as they do on mine. However, I have used these programs with no problems. If you have any comments, suggestions, bugs, or want source code, email me.

 

Click on pics to see larger images where available

 

Graphics Demos

One of my best sections - many computer generated images and realtime graphics ideas. Programs are written in C#/C/C++, and some assembly when needed. Some rendering in OpenGL, DirectX, and some are custom.

 

 

Mandelbrot Pixel Shader I

Dec 2006
Out of curiousity I wrote a Mandelbrot pixel shader in OpenGL GLSL. It took an afternoon, and was my first attempt at pixel shaders. The result is a spinning cube, with each face showing a zooming in and out mandelbrot set, with randomized palettes to make all the coloring look nice.

This requires shader model 3.0 or higher, so should run on all modern (year 2006?) cards. Mine is an NVidia 7800.

The code is not very clean - I hacked it together quickly to learn how subdivision surfaces.

Controls: left mouse button to orient the cube, and right mouse buttons to spin the cube.

Click the image for a larger version.

 

TRS-80 Color Computer Retro

July 2006
CoCo Mandel
My first computer was a TRS-80 Color Computer, circa 1980. I recently decided to program some assembly on it to see what I can do compared to what I could do as a child. This simple mandelbrot renderer is the result. The version I wrote as a child/teen took 10-20 hours per image (on a 0.8MHZ 8-bit computer using BASIC). This version has much higher precision, and takes under 10 minutes per image, and is not optimized much at all.

Click to see the page describing it and to get the source code (among other things)

 

Subdivision Surfaces I

2006
Out of curiousity I wrote a Loop based subdivision renderer in OpenGL. It took a few days, and is just a simple scheme, although I plan to implement a much more advanced version, including creases, boundaries, correct corners (ala Zorin), normal interpolation (Zorin again), textures, color interpolation, collision detection, as well as attempt to derive some new rules of my own to obtain some shapes not in the literature such as cones, and sharp point corners. I might also implement other types such as Catmull-Clark, butterfly, etc., but I think loop is most useful for my needs. The goal is to make as fast of an accurate software subdivision surface renderer, and use it as a base for an article on using subdivision surfaces in production tools like games and CAD systems.

The code is not very clean - I hacked it together quickly to learn subdivision surfaces.

Click the image for a larger version.

 

Spinning Plasma Cubes

2002?
An image of spinning plasma cubes, with crazy colors. Prepare to be lobotomized.

 

Font Outline Demo

2002?
A GDI+ demo of font outline stuff, mimicking an old screen saver I had made for DOS once upon a time.

 

Knot demo

2001?
A program I am very proud of. It makes animated (p,q)-torus knots, and is interactive. I made a screen saver out of it, with many more knot types and colors, found under the screen savers section.

 

Warp Rings

2000
Ring Picture
This is a warping series of colored rings, like a circular sinus effect. It uses transparency and some neat morphing effects.

 

 

Jello Cube

2000?
This is an OpenGL rendered cube made of jello. It is done by making a cube out of many smaller cubes, and making them "wobble." Rocket science.

 

Plasma

1998?
This is a pseudo-traditional plasma demo showing nice animated layering effects. If you are familiar with the standard plasma effect from the demoscene, you will like this version. There are three sets of concentric circles, warped as they wobble, and then XOR'ed in bitplanes to get the nice coloring.

 

 

Screen Savers

Mandelbrot screen saver, 3D polyhedral screen savers, fire images, etc. To install screen savers, look on your drive for other *.scr files (usually in Windows\system32), and copy these to that directory.

 

Lego Screensaver

March 2008
lego small image
This is a screensave that assembles and disassembled many Lego models. Renaming the *.SCR to an EXE allows you to add your own LDRAW models to the mix.

Included is C# sourcecode and a VS 2008 project to compile the code. This is my first C# program, and was done to immerse myself in C# to learn how much I like it compared to my standard C/C++.

Click the image to see a larger version of an assembled Technic set from the screensaver.

 

 

Money ScreenSaver

2004
A 3D animated US currency screen saver. Designed to test currency laws when used for art. It supports selecting which denominations to show, from the penny through the $100,000 bill, as well as supporting many other options

 

Knot Screen Saver

2003
This is a 3D animated collection of knots, with many user settings. It is one of the prettiest screen savers I have written, making beautiful animated images. See the additional page for more. OpenGL fun fun fun!

 

Stringart Screen Saver

2003
Here is a 3D, antialiased string art screen saver that I wrote to test line rendering quality for different algorithms (Wu, Bresenham, Run-slice, Nelson, many more). It uses a very high quality anti-alaised, gamma corrected line algorithm to draw lines.

 

Metaballs Screen Saver

2001
Here is one of my best: a realtime metaballs screensaver with many options and styles! It requires DirectX8 or higher, e.g., will run natively on WinXP, WinME, and up. It has many color themes and rendering options, including background starfields, cube maps, and user definable image selection. Look at the page for more!

 

Mandelbrot Mosaic

2000
A nice mandelbrot screen saver, using SSE on P3 chips, allows making of tiled images for webpages, etc. Be sure to click on the about box a few times.

 

Polyhedra Screensaver

1999
Polyhedra Picture
This is an OpenGL polyhedra rendering screen saver with over 500 shapes. It includes all Johnson solids, polyhedra, and many, many more polyhedra I have collected over the years.

 

Rubik's Cube Screen saver

1996?
Rubik Picture
A Rubik's Cube Screen Saver - allows setting the number of cubes, cube size and colors, and creates many, many patterns along with a general randomization and solving algorithm. I hope to take some time one day and update the rendering to OpenGL for more effects like lighting, bumpmapping, etc.

 

Flame screen saver

1996?
Flamles
A simple flame screen saver. It changes colors and shapes as it wanders around the screen. It is pretty :)

 

Polydot Screen Saver

1995?
Polysaver
This screen saver morphs collections of dots between moving, 3D shapes, including a few funny ones. Old school!

 

Bouncing lines, circles, boxes...

500 B.C.
Lines Picture
An old bouncing line, ellipse, and rectangle screen saver I wrote for Win3.1, but it runs under NT/95/98/ME/XP and up.

 

Game and Puzzle programs

Here we list some games and puzzle programs to play with.

 

Lomont's WPF Planet Wars simulator

Sept 2010
This is a C#/WPF implementation of Planet Wars for testing bots to enter in the Google AI challenge at the University of Waterloo. This simulation is much better than the ones they created; the interface is much nicer, shows more information, and most important, I am supplying source code to the entire thing. I added background maps from NASA Hubble shots and include the maps from the contest for ease of use.

Source code is included.

 

Lomont's WPF Chess PGN Editor

Sept 2010
During a trip to New Orleans, I had time to do some programming on the drive down and during the evenings. I wrote a Chess program mostly to investigate some endgame table building algorithms and forced game positions, but never got the chess engine working (ran out of time). However, I did get the chess logic, interface, and some basic save/load things working. This makes an ok PGN file editor. It also provides decent code in C# and WPF for those wanting some place to start when making a chess program. Source code is included. Have fun!

Source code is included.

 

Lomont's WPF 4x4 Tic Tac Toe analyzer

Sept 2010
This is a C#/WPF 4x4 Tic Tac Toe complete table analyzer. Select an algorithm and build a complete retrograde analysis of the 4x4 game tree. Left and right mouse buttons toggle entries. Code and interface to doodle included!

Source code is included.

 

 

 

Lomont's Vista capable FMTracker

Oct 2008
fm-tracker small image
This is newer version of the old DOS FMTracker below. This one runs in Vista and XP, using OPL2 emulation avoiding the need for the old chipsets. C++, source and some old songs included.

 

 

Lomont's Ataxx Game

May 2007
Ataxx Picture
This is an implementation of Ataxx, a popular board game similar to Othello. Ataxx is the name of the arcade variant by Leland in 1991.

My version is very strong, with user selectable opponents.

To run, unzip the file, and place the exe and two image files in the same place. Run the exe to play.

May require DLL files from Microsoft, since it was built with Visual Studio 2005.

 

Lomont's Game Of Life Explorer

Mar 2007
Life Picture
This program is an implementation of HashLife, an algorithm for running Conway's Game of Life quickly and on large Universes. Although not as fast as Golly, it offers another implementation, and a nicer start to an interface. Click the picture for a bigger image.

Also, this program comes with 4000+ patterns collected from around the web.

May require DLL files from Microsoft, since it was built with Visual Studio 2005.

 

Lomont's Four 4's Solver

Mar 2007
Source Picture
This program solves four 4's problem, which is to write various positive positive integers using exactly four 4's, and various sets of operators. For example, 12 = 4*(4-4/4), 10 = sqrt(4)*4 + 4/sqrt(4), etc. Output is a CSV file easily viewed in Excel. Output is in Postfix (Reverse Polish Notation).

Run 44.exe -h to get command line parameters, which set the depth of the search, operations allowed, etc.

Also to the right is an excel CSV file with all combinations up to 10,000, using a large set of operators, and up to depth 14. The first several smallest integers not on the list are: 2087 2189 2237 2263 2453 2753 2777 2779 2827.

May require DLL files from Microsoft, since it was built with Visual Studio 2005.

 

Lomont's Zombie Infection Simulation

Mar 2006
Zombies!
This program complete with sourcecode (.NET 1.1, Visual Studio 2.3) allows easy creation of external DLLs implementing brains for the popular Zombie Infection Simulation. I designed (on my own time!) it for a developer training session where I work, and employees tried their hand at making himan brains that try to resist the onslaught of the zombie horde.

Download, expand, and run the file zombie.exe to watch the simulation. Press '?' for a list of keyboard commands.

Unfortunately there is a bug or two in this code which I don't have time to fix at the moment, and it crashes if you resize the playing field. Sorry :)

 

Lomont's Tic Tac Toe tester

Mar 2006
TTT
This program complete with sourcecode (.NET 1.1, Visual Studio 2.3) allows easy creation of external DLLs implementing tic tac toe brains. I designed (on my own time!) it for a developer training session where I work, and employees tried their hand at making unbeatable tic tac toe programs. Several made it. Also included is a brain that is optimal against an idiot (idiot makes random legal moves), which wins 96% against the idiot brain.

Download and run the file tttg.exe to play with this.

 

Lomont's Sudoku Program

Oct 2005
sudoku
This is a beta version of a Sudoku solver/generator/helper. With it you can create puzzles, solve them, count number of solutions from a given board position, and save and load puzzles. This is a beta, and will be upgraded as I find time and interest. Currently there is only an executble file - no installer.

 

Lomont's Cross Sums

Jan 2002
Cross Sum Picture
Puzzle solving program - Nice! It allows automated solving of cross sums, like the ones in Dell magazine. See the page for it for the many, many features. I created this while my wife and I liked doing a cross sum each day before bed in order to generate them for our use.

 

Lomont's Gomoku

2001
An unfinished version of "Connect 4". It plays ok, but is beatable. Note this is NOT finished (and will probably never be worked on again, unless I get the Gomoku bug).

 

Pong (Arkanoid style)

1994?
Old version of an Arkanoid style Pong I was writing in 1994 or so. DOS version only. Unfinshed.

 

 

Old DOS apps

These run from command line, or DOSBOX if necessary. All are old school 256 color VGA programs, and represent a few of the hundreds of graphics effects I programmed "back in the day.".

 

Ball Demo

1995?
Ball Demo Picture
Nice animated balls, the ones drawn in DPaint IIe (which I still have!), with a starfield. Runs a bit too fast nowadays...

 

Circler

1995?
Animated circle effects, done by drawing different colors along the circle pixels based on formulas, instead of one color to one circle.

 

Wormhole

1995?
Wormhole Picture
The standard wormhole effect done by palette cycling. Now these tricks are almost lost.

 

Pixel Morph

1995?
Pixel Morph Picture
A pixel animation - different images built in morph from one to another using pixel mophing.

 

 

HP Calculator sutff: 48SX, 48G, 49G 49G+

I'll upload more as I get time. See www.hpcalc.org for good stuff.

 

 

Miscellaneous stuff

Motley collection of code snippets....

 

Lomont's C# .NET SHA3 Implementation

Oct 2012
Source Picture
NIST recently finished their SHA3 hash selection, choosing Keccak. Since I had not yet implemented a C# version from the preceeding rounds, I did one now. Here is a .NET class for computing various SHA3 hashes, derived from HashAlgorithm. Also included is a program that computes file hashes of common hash lengths and testing code. It is all a VS2012 project file. The size is large due to containing the test vectors.

 

 

Lomont's C# .NET QR Code Generator

Aug 2012
Source Picture
I was recently looking at decoding QR codes and how to fuzz them for malware analysis, and I wrote a small .NET QR code generator. The image to the left is a QR code (the largest size) that embeds a zipfile of the sourcecode to generate large QR codes. The project to the right is a VS 2012 (beta) C#.NET project file and source code.

 

 

Lomont's C# .NET Intel x86 code Disassembler

Sept 2010
Source Picture
I needed a specialized x86 and x64 disassembler, so I wrote a pretty decent library in C# to do the job. It also has a Windows Portable Executable (PE) file reader to decode the code segments.

 

 

Lomont's Small C# .NET Client/Server Demo

Feb 2010
Source Picture
I needed simple networking for work on the HypnoCube so I wrote one in C#. This is an implementation of a simple TCP/IP client/server architecture in C#, only using a few hundred lines of code, with a Client class, a Server class, and a demo program showing usage. The associated project file is for VS2010 beta 2.

 

 

Lomont's Simple Fast Fourier Transform Code (FFT)

Jan 2010, Updated Aug 2011
This is a C# implementation of the Fast Fourier Transform (FFT). I needed a small, fast, free FFT implementation for my HypnoCube project for audio processing and found none that were quite what I wanted. So I developed a very nice implementation: small, free, fast, standalone. Besides the usual complex to complex FFT, this has a real to complex FFT usuable in most situations people use FFTs. The advantage is double the speed and half the space requirements. Read the associated PDF detailing the design.

 

 

Lomont's C# SSIM Code (Updated)

Sept 2009, Updated June 2011
Source Picture
This is a C# implementation of the Structural Similarity Index Metric (SSIM) for comparing images, which is (supposed to be) better than PSNR or MSE. Download options include a VS2010 project in a zipfile, an executable, or a HTML file version.

Usage is simple, create a SSIM object, and call Index(filename1, filename2) to get the value, or use Index(Bitmap1, Bitmap2) if already loaded. It handles RGB by computing luminance channels and comparing them.

Now with a minor bugfix June 2011.

 

 

Lomont's C# Arithmetic Coding

April 2009
Source Picture
This is a C# implementation of a arithmetic coding using Fenwick trees. It compresses/decompresses around 2 MB/s on my decent (2009) machine. Click the icon to see the main source file or this ArithComp.htmlHTML version, or download the VS 2008 project from the right.

 

 

Lomont's C# Generic SkipList

April 2009
Source Picture
This is a C# implementation of a generic SkipList. I implemented it to test against the .NET containers SortedList and SortedDictionary. The SkipList beats the SortedList O(nlogn) to O(n^2), but the SortedDictionary (based on a RedBlack tree) does better in both time (twice as fast) and space (20% smaller). Click the icon to see the main source file or this HTML version, or download the VS 2008 project from the right.

 

 

Lomont's C# Full Screen Physics Balls

Mar 2009
RocketBalls
This is a demonstration of WPF, physics (simple billiards), and full screen app techniques (overlaying your work as you work). It is a simple C# program with sourcecode that I wrote to test some fullscreen app ideas, and as usual it got carried away. There are simple classes for Point2D and Vector2D along with a simple physics collision resoution class.Click the icon to see a larger picture, or click on the links for the exe or complete source code (VS2008 project file).

 

 

Lomont's C# Skein HASH Function

Mar 2009, Updated Aug 2011
Source Picture
This is a C# implementation of the Skein hash function, version 1.3, current as of 2011. It is not completely optimized, but passes all the test vectors. It is a work in progress. Click the icon to see the main source file or this HTML version, or download the VS 2010 project from the right.

 

 

Lomont's C# Mandelbrowser

Feb 2009
Mandelbrowser
This is a mandebrot realtime browser in C#. It was started as a test for various methods, and included (at one point) C#, C# mulththreaded, SSE, CUDA, C++, OpenMP, and many more. The code now supports a few rendering methods and runs under VIsta x64. To run elsewehre you will have to change the DLL that contains the SSE renderer.
There is also an infinite precision code started, that can render frames, although slowly. This is (as is often the case recently) not as polished as I'd like, but I have other things to move on to.

 

 

Lomont's Visual Studio code to HTML converter

Dec 2008
LegoView
This is a C# program with source that converts code from Visual Studio to nicely formatted HTML for web/blog insertion. It uses .NET 3.5, and the source directory builds with Visual Studio 2008.

Click the image for a larger view.

Here is an example of one of the source files converted.

 

 

Lomont's Lego CAD Viewer

Feb 2008
LegoView
This is my first substantial C# program. I am now convinced it is much faster to develop this type of thing in C# than in C++ due to the extensive .NET libraries and the excellent IDE in Visual Studio 2008. Rendering is done in managed Direct3D.

The program loads LDRAW files for viewing and deconstruction. Sourcecode and exe and a sample image file are included for your spastic enjoyment. See my Lego page for a the DAT file for the Technic kits 853 and 854 (pictured). Click the picture for a larger image.

New! - see the Lego screensaver above for a better piece of code.

 

Floating point tricks source code

Sept 2005
Source Picture
Here is the code to accompany my article in Games Programming Gems 6 on floating point tricks. This is version 0.5, released Oct 2005, and contains numerous tricks to speed up floating point calculations by treating 32 bit IEEE754 floating point values as 32 bit integers. For a detailed discussion of a few of the tricks, see my papers on floating point methods on my papers page.

 

Emule 0.43b - Nonsharing version

Oct 2004
Emule Picture
A recompiled version of the Emule client that does not share your files back out. Download the big zipfile, extract it and run. If you don't trust me, download the only source file I changed, get all the original source, compare to your heart's content, and recompile. To learn how to connect and use the system, go to http://www.emule-project.net/

 

 

AES High Speed encryption source code

2000
Source Picture
This is source code for AES - Advanced Encryption Standard. It is the fastest C/C++ implementation I have tested, and is released for any use.

 

Sample Win32 Application

2000
Source Picture
This is a tutorial on how to make a Win32 app under Visual C++ 6.0, but should be useful for other compilers.

 

C/C++ Coding Conventions

2003
Source Picture
Here I have gathered many C/C++ coding conventions I have found useful. I organized for some talks I give to groups of developers on making better developers. There are items useful to languages other than C/C++, although many are C/C++ specific.

 

Quaternion demonstration

2000?
This is an application showing the difference between interpolating between quaternion based orientations and Euler based orientations. It shows that quat interpolation rotates along a great circle as desired, but for some setting Euler angle interpolation makes very ugly rotations.

 

Utilities

Here are some tools such as a source code line counter, a hexdump utility, etc., and other software. Some of them are beta, so use at your own risk.

 

 

Code Statistics

Sept 2011
This is a command line tool that gathers statistics about source code in C#, C++, C, and probably other formats like Java and XAML as well. It can count total lines, comment lines, nesting level, find duplicate files and lines, and much more. It replaces the LineCount utility elsewhere on this page. C# source code and VS 2010 project file included.

 

 

Lomont's DiskInfo tool

Dec 2009, Updated 2012
This tool shows relative disk usage across multiple drives in Windows in an interactive pie chart. It was written in C# using Visual studio 2010 Beta 2. Click the picture for a larger image. Download the project file or the standalone executable. One useful feature is showing duplicate files found across the drives. The source code demonstrates how to draw an interactive pie chart from WPF primitives and how to make multiple threads work nicely with the interface.

 

 

6309/6809 Disassembler

May 2007
This is a small disassembler (and soon to be assembler) for Hitachi 6309 and Motorola 6809 CPUs. It has several nice features, including the ability to view code cycles for disassembled code. See this page for details.

 

 

Mini Compression Code

Jan 2007
Source Picture
This is compression source designed for a small, fast decompressor, useful in constrained enviroments, such as embedded systems. It is a modified LZ77/LZSS algorithm, where I modified the symbol output routines to get quite good compression. For example, this seems to beat QuickLZ (a common, fast, and solid LZ compressor/decompressor) for small files (under 64K). See this page for details.

 

Regular Expression File Renamer

Nov 2006
Source Picture
This is a command line tool that allows file renaming using regular expressions. It creates an optional html file to show how each file will be renamed. C++ sourcecode is available, and it was built using Visual Studio 2003. The regular expression part requires boost to be installed (www.boost.org). Like the standard built in rename command ren.exe this is names ren2.exe.

For example: ren2 "([a-zA-Z]{3,3}) ([0-9]+).dat" "$2 $1.dat" would rename the file "dec 2004.dat" to the file "2004 dec.dat"

 

Rectangle Packing Tool

Aug 2006
This application fits rectangles into a larger rectangle, and is pretty efficient. The general problem is NP-complete, so there is no efficient optimal algorithm known. This one is pretty fast on my machine - it places 5000 rectangles into a 2500x2800 rectangle in the image shown in a few seconds. It can read/write delimited text files. This program includes C++ /.NET source code, and requires .NET 1.1 or better. Uses include part placement, texture map merging, and many others.

Click the image for a larger view.

 

Logitech G15 Keyboard Info tool

March 2006
G15Tool
This application show a lot of system information on a Logitech G15 keyboard screen in realtime. Some supported items are drive space, memory, network performance, date/time, winamp info, realtime 3D spinning objects, GDI usage, processor usage, and much much more. See the attached page for details.
LomontG15Info.exeDownload executable (70K)

 

MP3 Tag Editor

Feb 2005
Edit your MP3 tags with the best tool around. Has standard features lie multiple tag editing, filename <-> tag regular expressions, and advanced features like user-configured warnings for tag errors and a similarity finder. See the page for details. Just place the exe file where it can run (on a local drive, not a network drive), and run. Requires .NET 1.1 or higher.

 

Photomosiac Generator

2003
Create photomosaics. It seems to be the fastest one I can find on the net at making images once the database is built. See the page for more info. Beta version. Also use my ImageRipper tool to get libraries of images from Google image searches. Let me know how I can improve it!

 

Google Image Ripper

2003
Get Google images to your hard drive! Good for making image libraries to use with my photomosaic tool. Example ideas are searching on flowers, paintings, faces, etc.

 

ANSI Editor 1.0

2004
An ANSI screen editor. Files are saved as RAW dumps, giving access to use screens in programs. Supports multiple screens, any size screens, floodfills, gradients, and much more. I wrote this in .NET to get a tool for making text mode demos for a competition.

 

FM Tracker

1995?
This is an old DOS based OPL2 tracker based on the HSC format, used in ADLIB and SoundBlaster FM synthesizer cards. You probably need DOSBOX (search the net) to run it. You also can find HSC files to play, and place them in a SONGS subdirectory. I have a much better new Windows compatible version if anyone wants it - just ask me - someday I will post it here :)

 

Texture mapper demo

2004
This is a perspective correct software texture mapper (source not posted yet, but available for the asking). I needed a software version of a texture mapper, so I wrote this - it handles a lot of stuff, and is quite fast, mixing very little assembler with C++ code.

 

MailEdit

Allows quick editing of standard mail files, like PINE mail files. Allows easy sorting, merging, cutting, etc. Comes with Win32 sourcecode and makefiles.

 

Web counter

Dec 2004
Source Picture
A program to implement a simple web counter. I was looking for a simple webcounter that did not need lots of linked libs, etc., and count not find one. So I wrote this one. It is 2 C++ files, takes *.gif digit files, and can keep track of as many counters as you need. A basic readme.txt file contains instructions.

 

File matcher

2003
Source Picture
This program scans directories and finds duplicate files. Good for cleaning house.

 

Bin2H

1993?
Source Picture
A simple command line tool to convert binary files to header files for including in C/C++ programs. Converts file to an array of characters.

 

IconRipper

2004
Source Picture
I needed a lot of icon files to look at when designing icons for my own use. The libraries on the net were not quite as good as many commercial programs, so I wrote this to scan a harddrive and get all icons out of the resources of all programs. So in short - it creates a list of all the icon files from programs on your harddrive.

 

HexDump

1993?
Source Picture
A command line tool to dump a file to a hexdump, with source.

 

LineCount

1995?
Source Picture
A command line tool with many options to count lines of code. It has many options: recurse directories, filetypes, ignore duplicates (using CRC32 matches), etc. NEW - see the CodeStats tool on this page that replaces LineCount.