Tenoch's dev stuff - Small things

Elasto

Elasto screenshot elasto.c

A simple physic simulation of a mesh of masses connected by springs. You can drag the masses with the mouse and the four corner masses stay in position.

How to run

elasto nbx nby lx ly k m frot
  • nbx and nby: number of masses horizontally and vertically
  • lx ly: equilibrium lengths between masses
  • k: spring coefficient
  • m: mass of each mass
  • frot: coefficient of friction

Requirements

SDL. Compile for instance with:

gcc -o elasto elasto.c `sdl-config --cflags --libs` -Wall -ansi -pedantic -O2

GNU GPL v2

Network thingies

TinyChat: a peer to peer chatting toy. Requires SDL, SDL_image, SDL_net. Public domain.

echo: a simple multiuser echo server in Lua. Requires LuaSocket. To test is you can connect to it with telnet. GNU GPL v3

resolve.c: a very basic domain name resolution utility. Requires SDL, SDL_net. Public domain.

sdlharmo

sdlharmo screenshot

sdlharmo.c

Lets you change in realtime the harmonics of a constant pitch sound, to explore the different timbres that result.

Interesting for the sound generation: includes a basic oscillator for the fundamental, from which are deduced the harmonics, which are finally weighted with the coefficients given by the slides in the window.

Requires SDL. Public domain.

soli

soli2.lua

A Lua script that models the card game of solitaire, and also an artificial "intelligence" that plays as I would do.

The script plays many games and counts the ratio of success.

Public domain.

Clifford Attractor

attr output attr output

attr.c

My attempt to reproduce the images found here

Requires Paul Bourke's library for the image output.

Public domain.

genepic

genepic test genepic test

Inspired by this.

Steepest slope algorithm

Genetic algorithm

Doesn't work too well.

Requires SDL, SDL_image, SDL_gfx.

Public domain.

Ortho

Ortho screenshot

A 3D "engine" written from scratch, just for the fun of it. It has an orthographic camera, points and lines, a z-buffer, etc.

This demo shows random lines in a box, and you can rotate the view with the mouse or arrow keys.

Download. Requires SDL. GNU GPL v3

360

360 screenshot

A sphere map viewer, written from scratch (no 3D engine). Pretty slow too... Use arrow keys to rotate the view.

360.c
Requires SDL, SDL_image. GNU GPL v3

Map

Free trees generator

A script to generate all free trees up to a certain size, and output SVG images of them

An example of tree An example of tree An example of tree

See the page A bunch of dots, for souce code, friendly explanation and the images of the 13188 trees up to size 15.