Features

Scenereader

Objects are added to the scene. The same goes for lights. It is also possible to adjust the camera position and the image size.

    "object":{
        "spheres":{
            "s1":{"radius": 1, "position":[-7, 4, -4], "color":[1, 0, 1], "surface":1},
            "s2":{"radius": 1, "position":[3, 4, 2], "color":[0, 1, 0], "surface":0},
            "s3":{"radius": 1, "position":[-3, 3, 2], "color":[0.2, 1, 1], "surface":1},
            "s4":{"radius": 1, "position":[-2, 3, 2], "color":[1, 0, 0], "surface":1}
        },
        "planes":{
            "p1":{
                "position":[0, 1, 0], "color":[0.7, 0.7, 0.7], "surface": 0
            }
        },
        "cubes":{
            "c1":{ 
                "size": 3, "position":[1, 0, 0], "color":[0.6, 0, 1], "surface": 0
            }
        }
    }
}

Raytracer

Optimizations