CLI Reference
Complete command-line options.
Usage
bash
ray_tracer [options] -o <output_file>General Options
| Option | Default | Description |
|---|---|---|
-o, --output <file> | output.ppm | Output file path |
-w, --width <n> | 800 | Image width |
-h, --height <n> | 600 | Image height |
--scene <name> | demo | Preset scene name |
-v, --verbose | off | Show detailed output |
Render Mode
| Option | Description |
|---|---|
-p, --path-trace | Enable path tracing mode |
-s, --samples <n> | Samples per pixel (path tracing) |
Preset Scenes
| Name | Description | Spheres |
|---|---|---|
demo | Demo scene | 10 |
cornell | Cornell Box | 6 |
random | Random spheres | 100 |
Examples
bash
# Default Phong shading
ray_tracer -o phong.ppm
# 4K resolution
ray_tracer -w 3840 -h 2160 -o 4k.ppm
# Path tracing 128 samples
ray_tracer --scene cornell -p -s 128 -o cornell-128.ppm
# High quality path tracing
ray_tracer --scene cornell -p -s 512 -w 1920 -h 1080 -o high-quality.ppmPerformance Tuning
bash
# With BVH acceleration (default)
ray_tracer --scene random -o fast.ppm
# Without BVH (for comparison testing)
ray_tracer --scene demo --no-bvh -o slow.ppm