Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

School project: A simple ray tracer in C

License

NotificationsYou must be signed in to change notification settings

matboivin/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniRT is an individual school project at42 Paris campus.

42 is a private, non-profit and tuition-free Computer Science school based on peer-to-peer learning and hands-on projects.
All programs written in C follow 42 style guideline.

This project is an introduction to the beautiful world of Ray tracing. Once completed you will be able to render simple Computer-Generated-Images and you will never be afraid of implementing mathematical formulas again.
The goal of your program is to generate images using the Raytracing protocol. Those computer generated images will each represent a scene, as seen from a specific angle and position, defined by simple geometric objects, and each with its own lighting system.

render

dragon.rt file generated usingmesh converter.

Disclaimer

This project is a school assignment. It was done forlearning purposes and is thusnot intended for production.
Don't copy. Learn.

I gathered all the resources that were helpful in thedoc directory. You can check it out but don't copy and paste code without understanding how it works.

Requirements

This program was developed on Debian Linux. It runs on Debian and Ubuntu.

  • make
  • gcc
  • libxext-dev and libbsd-dev packages (seeinstall rule in Makefile)

Dependencies

Installation

  1. Clone the repository and its dependencies:
$git clone --recursive https://github.com/matboivin/miniRT
  1. Change it to your working directory and run:
$make install&& make

Usage

This program takes as a first argument ascene description file ending with the.rt extension. Example files are provided in thescenes directory.

$./miniRT<scene.rt> [--save]optional arguments:  --save  save the rendered image in bmp format
  • PressESC key to exit the program.
  • Press space bar to switch view point in case of several cameras.

Examples

$./miniRT scenes/room.rt$./miniRT scenes/scene.rt

example 1example 2

Acknowledgements

School project done at42 Paris.

Many thanks to0auBSQ for contributing!

License

SeeLICENSE for more information.

About

School project: A simple ray tracer in C

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp