Some color tests
This commit is contained in:
parent
613bf68fb6
commit
284167f7c1
1 changed files with 8 additions and 2 deletions
10
src/main.rs
10
src/main.rs
|
@ -50,7 +50,7 @@ fn main() {
|
|||
|
||||
// Image
|
||||
let aspect_ratio = 16.0 / 9.0;
|
||||
let image_width = 1920;
|
||||
let image_width = 1000;
|
||||
let image_height = (image_width as f64 / aspect_ratio) as u32;
|
||||
let samples_per_pixel = 100_u32;
|
||||
let max_depth = 50;
|
||||
|
@ -58,7 +58,7 @@ fn main() {
|
|||
// World
|
||||
let mut world = HittableList::new();
|
||||
|
||||
let material_ground = Arc::new(Lambertian::new(&Color::new(0.8, 0.8, 0.0)));
|
||||
let material_ground = Arc::new(Lambertian::new(&Color::new(0.2, 0.3, 0.0)));
|
||||
let material_center = Arc::new(Lambertian::new(&Color::new(0.7, 0.1, 0.2)));
|
||||
//let material_center = Arc::new(Dielectric::new(1.5));
|
||||
let material_blue = Arc::new(Lambertian::new(&Color::new(0.2, 0.1, 0.7)));
|
||||
|
@ -66,6 +66,7 @@ fn main() {
|
|||
let material_metal_fuzz = Arc::new(Metal::new(&Color::new(0.8, 0.8, 0.8), 1.0));
|
||||
let material_mirror = Arc::new(Metal::new(&Color::new(0.8, 0.8, 0.8), 0.0));
|
||||
let material_dielectric = Arc::new(Dielectric::new(1.5));
|
||||
let material_light = Arc::new(Lambertian::new(&Color::new(2.0, 1.0, 0.0)));
|
||||
|
||||
|
||||
|
||||
|
@ -99,6 +100,11 @@ fn main() {
|
|||
1.0,
|
||||
material_blue.clone(),
|
||||
)));
|
||||
world.add(Box::<Sphere>::new(Sphere::new(
|
||||
Point3::new(0.5, 1.0, 0.3),
|
||||
0.3,
|
||||
material_light.clone(),
|
||||
)));
|
||||
/*
|
||||
for i in -15..15 {
|
||||
for j in -15..15 {
|
||||
|
|
Loading…
Reference in a new issue