Git Product home page Git Product logo

aktina's Introduction

Ακτίνα - Ray

Software ray-tracer written in C. Inspired by, The Ray Tracer Challenge by Jamis Buck.

Building

To build run meson setup build, then meson compile -C build. To run the tests, run meson test -C build.

Dependencies

Project Structure

The project roughly follows the structure laid out by the book, deviating where deemed necessary.

Directory Structure

Directory Use
src Source code and header files
test Test source code
subprojects Meson subprojects (dependencies, e.g. Criterion)
LSAN-suppresions.txt Clang LeakSanitizer suppressions file

Modules

Module Files Notes
Tuples tuples.c, tuples.h Chapter 1; Unused, merged into Vectors
Canvas canvas.c, canvas.h Chapter 2
Matrices matrices.c, matrices.h Chapter 3; Unused, merged into Vectors
Vectors vectors.c, vectors.h Chapter 1, 3, 4
Rays rays.c, rays.h Chapter 5, 6, 7, 8, 9; Demo sphere, lighting, camera, shadows, planes

Demos

Sphere - Chapter 5

Source code for this demo is located in test/sphere.c. It shows two spheres in 3D space rendeded by casting rays on a canvas. No shading or light simulation is done, thus the lack of "depth". sphere

Lighting - Chapter 6

Source code for this demo is located in test/lighting.c. It shows a sphere that is lit by a point light. lighting

Camera - Chapter 7

Source code for this demo is located in test/camera.c (dd88842). It shows three spheres surrounded by two "walls" and a "floor". camera

Shadows - Chapter 8

Source code for this demo is located in test/shadows.c. It shows three spheres surrounded by two "walls" and a "floor", illuminated by two light sources. shadows

Planes - Chapter 9

Source code for this demo is located in test/planes.c. It shows three spheres, sitting on a plane, illuminated by three colored lights. planes

aktina's People

Contributors

therealglumfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

artvanya

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.