[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
/ raytracer1 Public archive

raytracer1 project for EPITECH (1st year)

Notifications You must be signed in to change notification settings

MaelDrapier/raytracer1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raytracer1

This project was one of my graphical projects from my first year at EPITECH (2016-2017)

The goal of a raytracer is to draw 3D objects using raytracing.

This is a very basic raytracer, but I made later (in a group of 4 people) a more advanced version, available here.


Language: C

Group size: 1

Project duration: ~45 days (06/02/2017 - 19/03/2017)

Compilation: on GNU/Linux via Makefile

Required library: CSFML graphic library

To install it:

  • on Debian / Ubuntu: sudo apt-get install libcsfml-dev
  • on Arch Linux: sudo pacman -S csfml
  • on other distributions, download it here

Usage:

./raytracer1 'scene.txt'

scene file:

The scene configuration file is composed of one or more objects.

Object values:

  • obj: 1 (sphere), 2 (cylinder) or 3 (cone)
  • trans: tanslation (X, Y and Z)
  • rot: rotation (X, Y and Z)
  • var: object size

All the elements (values and value names) must be separated by a newline.

All the objects must be separated by ******

Scene file example:

obj:
1
trans:
0
-220
-150
var:
60
******
obj:
2
trans:
0
200
0
rot:
20
0
0
var:
25

Authorized functions for this project:

C Math library (-lm), C Libdl (-ldl), Pthread library (-lpthread), open, close, read, write, malloc, free

CSFML functions:

sfRenderWindow_isOpen, sfRenderWindow_pollEvent, sfRenderWindow_waitEvent, sfRenderWindow_clear, sfRenderWindow_drawSprite, sfRenderWindow_display, sfRenderWindow_create, sfRenderWindow_destroy, sfRenderWindow_close, sfTexture_create, sfTexture_updateFromPixels, sfTexture_destroy, sfSprite_create, sfSprite_setTexture, sfSprite_destroy, all of System module’s functions, all of Window module’s functions, all of Audio module’s functions


Screenshots

screenshot 1 screenshot 2 screenshot 3 screenshot 4 screenshot 5

About

raytracer1 project for EPITECH (1st year)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published