Hack of the Whenever I Get Around to It

May 23, 2006

Pendulum Attractors

Filed under: Uncategorized — Chris Merck @ 6:34 pm

More eyecandy coded in C…
This code demonstrates a way to generate strange attractors. They play a role in chaos theory.
See the first comment for the C code.

May 7, 2006

Half-Life in Linux

Filed under: Uncategorized — Chris Merck @ 5:28 am

Here is a screenshot of Half-Life running at 30fps on QEMU in linux.
Sound is perfect at 640×480, but at 800×600 the sound becomes shakey.
Game is very playable!

Instructions for installing:
* download qemu and kqemu
* configure/compile/install qemu
* install windows on qemu
* install half-life on windows
* run half-life

My qemu command line is: qemu -hda hd.img -cdrom ../iso/halflife.iso -soundhw all -loadvm vmsave
where hd.img is a 2GB hardisk image, and loadvm resumes my game from where I left off.

I have also installed MS Office 2003, and am happy to report that Visio 2003 is quite usable.

May 3, 2006

Particle physics simulation software

Filed under: Uncategorized — Chris Merck @ 8:06 pm

A long while ago I wrote some QuickBasic code to simulate the movement of massive bodies about one another in 2D space (SMLPRT I called it). It made a nice MS-DOS screensaver. I rewrote it in C a few years ago for DOS on a 286, and just the other day ported it to linux using svgalib, then sdl, then sdl-opengl 3d.
The new code simulates the flow of water by calculating the forces between individual molecules. The code can easily be customized by changing the force – distance function. Some features I have added are using the mouse to prod the particles and gravity.


Kate as a C IDE

Filed under: Uncategorized — Chris Merck @ 8:02 pm

Here is a screenshot during coding of bifurcate_png. I like the simple interface. Note that I simply press Ctrl-O to save, and Ctrl-Shift-O to compile and run the program thanks to custom keyboard shortcuts I set in Kate. Ctrl-Shift-O executes sh filename.c, using the self-compiling .c file script from my last post.

Self-compiling .c file

Filed under: Uncategorized — Chris Merck @ 7:56 pm

#This comment is a shell script to self-compile
#this .c file. Just run sh filename.c
cd /mnt/data/projects/src/bifurcate_png
echo “compiling .c file”
gcc main.c -o bifur -lpng

//C code goes here

Blog at WordPress.com.