This is a simple Mandelbort implementation with raylib and Gambit Scheme. Highly inefficient and slow, I made this some time ago as an experiment. I'm cleaning out my home directory, so this is going on Github for posterity :)
It comes with a simply CMake-based language configuration for Gambit Scheme.
These are the tools you need to use the code in this repository:
- CMake
- make (or any build system you prefer, like Ninja, etc.)
- Gambit Scheme
- Optional: Raylib (if you want to use a system-wide installation instead of the submodule provided here)
Because I'm using Arch Linux, there's a bit of a naming conflict when installing Gambit Scheme. So the Gambit compiler gsc
is called gambitc
on my system. To avoid this problem, there are two options:
- If you already have Gambit Scheme compiler installed as
gsc
on your system, change all occurences ofgambitc
intogsc
in all files in thecmake
subdirectory. - If you build Gambit Scheme from source, use the
--enable-interpreter-name
and--enable-compiler-name
options during the configuration step to renamegsc
intogambitc
.
It's a bit annoying, but this will be fixed when I improve the CMake language definition (see #-)
This repository comes with raylib already integrated as a git submodule. This reflects my personal preferences, if you prefer to use CMake's FetchPackage
, it should be easy enough to modify the main CMakeLists.txt
to do that (I haven't tested it, though).
So start writing code, clone this repository and make sure all submodules are downloaded too:
git clone --recursive https://github.com/georgjz/mandelbrot-gambit-scheme-raylib.git mandelbrot
To build the example code found in src/main.scm
, just execute:
cd mandelbrot
cmake -S . -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -B build
cmake --build build
./build/mandelbrot
If you wish to change the name of the output binary, just edit line 14 of CMakeLists.txt
.
Everything in this repository is released under the MIT License (see LICENSE
). For the raylib license, go here.