From 01938278e9e9e4963bee21d4e2a7b2476837e166 Mon Sep 17 00:00:00 2001 From: Matt Jakeman Date: Fri, 20 Nov 2020 01:58:43 +1300 Subject: [PATCH] Update README.md with build instructions + license --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83a9bab..65d54ee 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # tinyray -A simple raytracer in exactly 450 lines of C +A simple raytracer in exactly 450 lines of C-code. ![Output](output.bmp) @@ -12,6 +12,26 @@ A simple raytracer in exactly 450 lines of C * Output to image with stb_image * Gradient Background * Watermark + +### Building +Find a compiler and build `tinyray.c`. Run the executable and it'll create an image called 'output.bmp' in that directory. Simple as that! + +Some examples: + +``` +# Building with gcc +$ gcc tinyray.c -o "tinyray" + +# Building with cl +> cl tinyray.c +``` + +tinyray uses [the excellent stb_image_write library](https://github.com/nothings/stb/blob/master/stb_image_write.h) for outputting a bitmap image. + +### License +Public Domain - Do whatever you like! + +Credit would be very much appreciated though :) ### Helpful Resources I created this toy raytracer to learn about basic raytracing (and for fun, of course), taking inspiration from the following resources: