Skip to content

SaqAsh/SunRays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SunRays - Interactive Raytracing Simulation

A real-time raytracing demonstration built in C using SDL2. Features an interactive light source that casts 500 rays in all directions, with dynamic obstacle collision detection.

Features

  • Interactive light source - Drag with mouse to move the light
  • Dynamic obstacle - Bouncing circle that blocks rays
  • Real-time ray casting - 500 rays with collision detection
  • Smooth 60+ FPS rendering - Optimized distance calculations

Build & Run

make run          # Build and run

Controls

  • Mouse drag - Move light source
  • ESC/Close window - Exit

Technical Details

  • Written in C with SDL2 for graphics
  • Efficient collision detection using squared distances
  • Real-time ray casting with 500 rays
  • ~62.5 FPS rendering with frame rate limiting
Screen.Recording.2025-09-17.at.3.23.58.PM.mov

About

Ray Tracing application written in C and SDL2 that displays sunrays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published