Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wwrad=40; // Radius of the Planet
- wrad=wwrad/40; // Radius of the Spot
- wradp=wwrad-wrad/2; // Distance of the Spot from the center
- wres=100; // Resolution of the Spot
- latx=43.260918; lonx=-2.938764; // position of bilbao
- slice_size=.3;
- // create slices from a figure
- module slice(rad=5, dist=1.5, size=1){
- for(i=[-rad:dist:rad]){
- intersection(){
- translate([0,i,0]){
- cube(size=[rad*2, size, rad*2], center=true);
- };
- children();
- };
- };
- };
- union(){
- // earth low-res surfice
- difference(){
- rotate(a=[0,0,270]){
- import("geody_earthmap.stl", convexity=5);
- };
- sphere(r=wwrad-.5, $fn=wres);
- };
- //// radial torus from bilbao
- rotate([(latx + 44),-(latx+3),360]){
- union(){
- slice(rad=wwrad, dist=1.5, size=slice_size)difference(){
- sphere(r=wwrad, $fn=wres);
- translate([0,0,.5]){
- sphere(r=wwrad-1, $fn=wres);
- };
- };
- rotate(a=[0, 180, 180])intersection(){
- cube(size=[wwrad*2, slice_size, wwrad*2], center=true);
- difference(){
- sphere(r=wwrad, $fn=wres);
- sphere(r=wwrad-1, $fn=wres);
- };
- };
- };
- };
- // make stronger globe
- rotate(a=[lonx, latx,0]){
- intersection(){
- cube(size=[wwrad*2, slice_size, wwrad*2], center=true);
- difference(){
- sphere(r=wwrad, $fn=wres);
- sphere(r=wwrad-1, $fn=wres);
- };
- };
- };
- // bilbao dot in the surface
- translate(
- [(-wradp)*cos(latx)*cos(lonx), // rotation over the globe
- (-wradp)*cos(latx)*sin(lonx),
- wradp*sin(latx)]
- ){
- sphere(r=wrad, $fn=wres, center=true);
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement