From 5e87f21e480dbe04fcf6cf95c52e5b98fa3b923c Mon Sep 17 00:00:00 2001 From: Sakarias Johansson Date: Wed, 8 Mar 2023 20:46:11 +0100 Subject: =?UTF-8?q?=F0=9F=93=A6=20Move=20scenes=20into=20a=20separate=20fo?= =?UTF-8?q?lder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- racer-tracer/config.yml | 2 +- racer-tracer/scene.yml | 53 ---------------------------------------- resources/scenes/three_balls.yml | 53 ++++++++++++++++++++++++++++++++++++++++ resources/scenes/two_balls.yml | 25 +++++++++++++++++++ 4 files changed, 79 insertions(+), 54 deletions(-) delete mode 100644 racer-tracer/scene.yml create mode 100644 resources/scenes/three_balls.yml create mode 100644 resources/scenes/two_balls.yml diff --git a/racer-tracer/config.yml b/racer-tracer/config.yml index 26aea31..0da36dc 100644 --- a/racer-tracer/config.yml +++ b/racer-tracer/config.yml @@ -16,6 +16,6 @@ screen: width: 1280 height: 720 -scene: ./scene.yml +scene: ../resources/scenes/three_balls.yml image_output_dir: "../" diff --git a/racer-tracer/scene.yml b/racer-tracer/scene.yml deleted file mode 100644 index f9e7571..0000000 --- a/racer-tracer/scene.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -materials: - grass: - Lambertian: - color: - data: [ 0.8, 0.8, 0.0 ] - - center: - Lambertian: - color: - data: [ 0.1, 0.2, 0.5 ] - - left: - Dialectric: - refraction_index: 1.5 - - right: - Metal: - color: - data: [ 0.8, 0.6, 0.2] - fuzz: 0.0 - -geometry: - - Sphere: - pos: - data: [ 0.0, -100.5, -1.0 ] - radius: 100.0 - material: grass - - - Sphere: - pos: - data: [ 0.0, 0.0, -1.0 ] - radius: 0.5 - material: center - - - Sphere: - pos: - data: [ -1.0, 0.0, -1.0 ] - radius: 0.5 - material: left - - - Sphere: - pos: - data: [ -1.0, 0.0, -1.0 ] - radius: -0.4 - material: left - - - Sphere: - pos: - data: [ 1.0, 0.0, -1.0 ] - radius: -0.5 - material: right - diff --git a/resources/scenes/three_balls.yml b/resources/scenes/three_balls.yml new file mode 100644 index 0000000..f9e7571 --- /dev/null +++ b/resources/scenes/three_balls.yml @@ -0,0 +1,53 @@ +--- +materials: + grass: + Lambertian: + color: + data: [ 0.8, 0.8, 0.0 ] + + center: + Lambertian: + color: + data: [ 0.1, 0.2, 0.5 ] + + left: + Dialectric: + refraction_index: 1.5 + + right: + Metal: + color: + data: [ 0.8, 0.6, 0.2] + fuzz: 0.0 + +geometry: + - Sphere: + pos: + data: [ 0.0, -100.5, -1.0 ] + radius: 100.0 + material: grass + + - Sphere: + pos: + data: [ 0.0, 0.0, -1.0 ] + radius: 0.5 + material: center + + - Sphere: + pos: + data: [ -1.0, 0.0, -1.0 ] + radius: 0.5 + material: left + + - Sphere: + pos: + data: [ -1.0, 0.0, -1.0 ] + radius: -0.4 + material: left + + - Sphere: + pos: + data: [ 1.0, 0.0, -1.0 ] + radius: -0.5 + material: right + diff --git a/resources/scenes/two_balls.yml b/resources/scenes/two_balls.yml new file mode 100644 index 0000000..338b8f9 --- /dev/null +++ b/resources/scenes/two_balls.yml @@ -0,0 +1,25 @@ +--- +materials: + left: + Lambertian: + color: + data: [ 0.0, 0.0, 1.0 ] + + right: + Lambertian: + color: + data: [ 1.0, 0.0, 0.0 ] + +geometry: + - Sphere: + pos: + data: [ -0.707, 0.0, -1.0 ] + radius: 0.707 + material: left + + - Sphere: + pos: + data: [ 0.707, 0.0, -1.0 ] + radius: 0.707 + material: right + -- cgit v1.2.3