diff --git a/examples/photo_sphere.scad b/examples/photo_sphere.scad index c8f9b2d1..4b81cd8c 100644 --- a/examples/photo_sphere.scad +++ b/examples/photo_sphere.scad @@ -1,6 +1,7 @@ use ; use ; +photo_size = [100, 100]; levels = [ [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], @@ -109,14 +110,14 @@ dots = px_gray(levels, center = true, normalize = true); color("white") for(dot = dots) { - translate(pt_to_sphere([100, 100], dot[0] + [50, 50], 50, [180, 180])) + translate(pt_to_sphere(photo_size, dot[0] + [50, 50], 50, [180, 180])) square(dot[1] * 2.5); } rotate([180, 0, 0]) color("white") for(dot = dots) { - translate(pt_to_sphere([100, 100], dot[0] + [50, 50], 50, [180, 180])) + translate(pt_to_sphere(photo_size, dot[0] + [50, 50], 50, [180, 180])) square(dot[1] * 2.5); }