A library of examples of using Claudius, a simple retro-style graphics library for OCaml. Many originally created for Tiny Code Christmas and Genuary.
To run these you will need to install Claudius via opam, and then you can dune exec [example_name].
These examples just show a single feature of Claudius, and are a good place to start if you're trying to understand how Claudius works.
- Bounce - example of a bouncing ball made from ellipses.
- Flying Camels - example of using image files to recreate a classic screen saver effect.
- Polygons - rotating filled polygons.
- Red Hexagon - a different style of rotating polyons.
- Screen saver - a recreation of a classic screen saver effect from the early Macintosh era.
- Shapes - using simple shape outlines to create some animation effects.
- TextGrid - drawing characters using the built in font for Claudius.
- DSOTM - using a combination of primitive shapes to build up a familiar image.
These examples start to use Claudius to build up interesting effects based on some simple algorithms
- Fern - drawing a Bansley Fern fractal.
- Julia Set - an animated Julia set fractal.
- Koch Snowflake - an example of using recursion to draw a Koch snowflake fractal.
- Koch Snowflake Filled - a filled in version of the Koch snowflake example.
- Lorenz - an animated Lorenz Attractor.
- Murmuration - another Lorenz Attractor, but this time used to mimic a flock of swarming birds.
- Plasma - an example of a classic plasma effect.
- Tunnel - an example of how simple math functions can create complex looking scenes.
Other more complex effects created using Claudius
- Anni Albers - a homage to leading textile artist Anni Albers.
- Anni Albers Also - a second homage to leading textile artist Anni Albers.
- Islamic pattern - an example playing with Islamic geometric patterns and positive/negative space.
- Islamic pattern filled - a solid verson of the Islamic pattern example.
- Particles - creating a pseudo-3D point cloud of a planet.
- Landscape - using the algorithm from the Plasma example to create a pseudo-3D landscape.
- Lava lamp - yet another effect routed in the Plasma example, this time with dithering added.
- Physics - an example of using a simple Hooke's law library to add physics to the Landscape example.
- Walking Mesh - an example of what looks like a stateful effect being implemented functionally.
- Vera Molnár - a homage to pioneering digital artist Vera Molnár.