Skip to content

minishell-yecseo/miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

267 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MINIRT START 2023.05.31.

📖 Table of Contents

Table of Contents
  1. Scene Examples
  2. Support Operating Systems & Requirements
  3. How to Install & Build
  4. Project Structure Summary
  5. How to implement Viewport
  6. How to implement Objects
  7. How to implement Lights
  8. GUIDE for .rt format
  9. Developers







Scene Examples

  1. scenes/universe.rt

스크린샷 2023-06-25 오후 6 27 20

  1. scenes/test1.rt

스크린샷 2023-06-25 오후 6 28 31

  1. scenes/snowman.rt
Screen Shot 2023-06-29 at 1 14 11 PM
  1. scenes/among.rt
Screen Shot 2023-06-29 at 1 14 27 PM







💻 Support Operating Systems & Requirements

1. OS

2. Requirements








How to Install & Build

$ git clone https://github.com/minishell-yecseo/miniRT
$ cd miniRT
$ make bonus
$ ./miniRT_bonus <TEST.rt>

miniRT_bonus takes only one *.rt file as an input. So, you must write an *.rt file according to the guide below. If the file has error, the program should notice you the number of line of the first error.








Project Structure Summary

  • Viewport & Camera with Rays
  • Objects
  • Lights







How to implement Viewport








How to implement Objects

For all rays, We can represent a point on a ray with camera's origin, ray direction, and t that decide length of ray. In a mathmatical expression,

  • O = camera's origin == ray's origin
  • v̂ = ray's normalized 3dimension direction vector
  • t = length from Origin

P = O + tv̂

reference : http://www.illusioncatalyst.com/notes.php

  • Sphere
  • Plane
  • Cylinder
  • Cone
  • Circle







How to implement Lights








GUIDE for .rt format

BONUS .rt FORMAT GUIDE

  1. A, C are same with mandatory part.
  2. L
  • You can make lights more than one up to 1000.
  • color can be specified.
  1. Others (Objects)
  • Every objects's line start with two common tokens, <object_type>, <surface_type, options>

[ object types ]

1) sp : sphere
2) pl : plane
3) cy : cylinder
4) co : cone
5) ci : circle

[ details ]

[ Sphere ]
	available token numbers : 5, 6
	sp surface center diameter

[ Plane ]
	available token numbers : 5, 6
	pl surface center norm

[ Cylinder ]
	available token number : 7, 8
	cy surface bottom_center axis diameter height

[ Cone ]
	available token number : 7, 8
	co surface bottom_center axis diameter height

[ Circle ]
	available token number : 7, 8
	ci surface center axis diameter width

[ surface ] Surface consists of type and options.

[ types ]
  	1) color : takes one option : <color vector>
  	2) checker : takes two options : <color vector> <color vector>
  	3) texture : takes two options : "texture.xpm" "bumpmap.xpm"

[ examples ]

1) sp       texture      images/test.xpm      images/test2.xpm     0,0,0      5
2) pl       color        255,25,255           0,0,0                0,1.0,0
3) co       checker      0,0,0                255,255,255          0,0,0      -0,2,1,0       10     20







Developers


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors