48k483x / MiniRayX

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. ๐Ÿš€


Languages

Language:C 80.3%Language:Roff 15.4%Language:Makefile 2.5%Language:Shell 1.2%Language:Perl 0.5%