Skip to content

Instantly share code, notes, and snippets.

@piotoor
Created October 30, 2018 18:56
Show Gist options
  • Save piotoor/1dc2ada33259df5980d186c853bf036e to your computer and use it in GitHub Desktop.
Save piotoor/1dc2ada33259df5980d186c853bf036e to your computer and use it in GitHub Desktop.
OpenSCAD simple Earth model with four buildings
earth_r = 6371000; // Earth's mean radius in meters
$vpr = [80, 0, 320]; // Viewport rotation
$vpd = 500 + 100000000 * $t * $t * $t; // Camera distance as function of time
translate([0, 0, -earth_r])
{
color("green")
sphere(earth_r, $fn=1000);
translate([0, 0, earth_r])
{
color("blue")
cube(100);
translate([-300, 0, 0])
{
color("red")
cube(150);
}
translate([350, 200, 0])
color("yellow")
cube(50);
translate([-150, -200, 0])
color("white")
cube(60);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment