1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 22:35:18 +02:00
This commit is contained in:
Justin Lin
2020-02-10 14:25:32 +08:00
parent 0a64658378
commit 5567476120

View File

@@ -1,6 +1,7 @@
use <pixel/px_gray.scad>;
use <experimental/pt_to_sphere.scad>;
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);
}