Skip to content

"MiniRayX" - Unleash your 3D creativity with this compact MiniLibX extension. ๐ŸŒŸ Explore ray tracing and elevate your graphics projects effortlessly. ๐Ÿš€

Notifications You must be signed in to change notification settings

48k483x/MiniRayX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MiniRayX: A Compact Ray Tracer with MiniLibX

MiniRayX is a simple yet powerful ray tracing program built with MiniLibX, designed to generate stunning 3D computer graphics. This project serves as an introduction to the fascinating world of ray tracing, allowing you to create simple yet impressive computer-generated images.

๐ŸŒŸ Features

  • Implements basic ray tracing techniques
  • Supports multiple geometric objects: spheres, planes, and cylinders
  • Handles ambient and diffuse lighting
  • Applies translations and rotations to objects, lights, and cameras
  • Reads scene descriptions from .rt files
  • Renders images in a resizable window

๐Ÿš€ Getting Started

Prerequisites

  • C compiler (gcc recommended)
  • MiniLibX library
  • Math library

Installation

  1. Clone the repository:
git clone https://github.com/48k483x/miniRayX.git
  1. Navigate to the project directory:
cd MiniRayX
  1. Compile the project:
make re

Usage

Run the program with a scene file as an argument:

./miniRT scenes/scene.rt

๐Ÿ“ Supported Objects

  • Sphere (sp)
  • Plane (pl)
  • Cylinder (cy)

๐ŸŽจ Scene File Format

Scene files use the .rt extension and follow this format:

  • Ambient lighting: A 0.2 255,255,255
  • Camera: C -50.0,0,20 0,0,1 70
  • Light: L -40.0,50.0,0.0 0.6 10,0,255
  • Sphere: sp 0.0,0.0,20.6 12.6 10,0,255
  • Plane: pl 0.0,0.0,-10.0 0.0,1.0,0.0 0,0,225
  • Cylinder: cy 50.0,0.0,20.6 0.0,0.0,1.0 14.2 21.42 10,0,255

๐ŸŽฎ Controls

  • ESC: Close the window and exit the program
  • Red cross: Close the window and exit the program

๐Ÿ› ๏ธ Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • School 42 for the project idea and guidelines
  • MiniLibX developers for the graphics library

Happy ray tracing! ๐ŸŒŸ

About

"MiniRayX" - Unleash your 3D creativity with this compact MiniLibX extension. ๐ŸŒŸ Explore ray tracing and elevate your graphics projects effortlessly. ๐Ÿš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published