flebeau / raytracer Goto Github PK
View Code? Open in Web Editor NEWRaytracer project M2
Raytracer project M2
####################### # Raytracer # # by Fabrice Lebeau # ####################### ### Prerequisite ### - C++ compiler with C++11 standard - CMake >= 3.1 - Boost - OpenMP - Threads ### Compilation ### In order to compile the program, execute the following commands: mkdir -p build cd build cmake .. make ### Usage ### There are two parts in the program: the random scene generator and the raytracer itself. See the help commands: - raytracer -h (for the raytracer) - raytracer -R -h (for the scene generator) ### Scene file specification ### The raytracer takes as input a scene file containing all the info about the scene. The format is as follows: - comments: line starting with # are ignored - camera: a line of the form "C <x> <y> <z>" (x, y and z are float numbers) is required, specifying the position of the camera (the camera always point to the negative z coordinate) - light: a line of the form "L <x> <y> <z> <intensity>" (x, y, z and i are float numbers) is required, specifying the position and intensity of the light - spheres: a line of the form "S <x> <y> <z> <radius> <material>" specifies the position, radius and material of a sphere. Th <material> argument can be: * one of the predefined materials (see file src/material.hpp, namespace Materials) * of the form "object <r> <g> <b>" where r,g and b are float numbers between 0 and 1 representing the color of the sphere. ### Scripts ### Two scripts are provided with this code (you must first compile the program before using them): - generate_images.sh: generates all the images used in the report. I recommend to lower the resolution (to 500x500 or even 400x400) if you just want to test the program, otherwise the computation times are too big - random_scenes.sh: takes as input an integer and generates as many random scenes, with a fast rendering with the raytracer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.