Created
November 18, 2018 21:33
-
-
Save piotoor/f927143325b8bea21b7e4f8a389daa5d to your computer and use it in GitHub Desktop.
Leaning buildings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
earth_r = 6371000; // Earth's mean radius in meters | |
diff = 1; | |
angle = 15; | |
a = 1200; | |
b = 1200; | |
h = 2500; | |
space = 3000; | |
translate([0, 0, -earth_r]) | |
{ | |
color("green") | |
sphere(earth_r, $fn=1000); | |
translate([0, -50, earth_r]) | |
{ | |
color("blue") | |
rotate([0, angle, 0]) | |
cube([a, b, h]); | |
translate([-space, 0, 0]) | |
color("red") | |
rotate([0, angle, 0]) | |
cube([a, b, h]); | |
translate([space, 0, 0]) | |
color("yellow") | |
rotate([0, angle + diff, 0]) | |
cube([a, b, h]); | |
translate([-space, space, 0]) | |
color("white") | |
rotate([0, angle, 0]) | |
cube([a, b, h]); | |
translate([space, -space, 0]) | |
color("orange") | |
rotate([0, angle, 0]) | |
cube([a, b, h]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment