Advertisement
Guest User

Untitled

a guest
Feb 25th, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. // CN Tower model by Bing AI
  2. // Scale: 1:1000
  3. // Dimensions from http://torontoplace.com/attractions/CNtower.htm and https://en.wikipedia.org/wiki/CN_Tower
  4.  
  5. // Parameters
  6. $fn = 36; // number of sides for cylinders
  7. height = 553.3; // total height in meters
  8. base_radius = 33.2; // base radius in meters
  9. base_height = 15.5; // base height in meters
  10. shaft_radius = 6.71; // shaft radius in meters
  11. shaft_height = 335.33; // shaft height in meters
  12. sky_pod_radius = 13.7; // sky pod radius in meters
  13. sky_pod_height = 6.5; // sky pod height in meters
  14. main_pod_radius = 24.8; // main pod radius in meters
  15. main_pod_height = 18.29; // main pod height in meters
  16. glass_floor_radius = 11.5; // glass floor radius in meters
  17. glass_floor_height = 0.1; // glass floor height in meters
  18. antenna_base_radius = 2.44; // antenna base radius in meters
  19. antenna_base_height = 9.14; // antenna base height in meters
  20. antenna_tip_radius = 0.0762; // antenna tip radius in meters (3 inches)
  21. antenna_tip_height = 102.4 - antenna_base_height - antenna_tip_radius * $fn / pi();
  22. // antenna tip height calculated from total antenna length minus base and tip diameters
  23.  
  24. // Colors (RGB values from https://www.cntower.ca/en-ca/about-us/history/facts.html)
  25. base_color = [0/255,51/255,102/255];
  26. shaft_color = [204/255,204/255,204/255];
  27. sky_pod_color = [153/255,153/255,153/255];
  28. main_pod_color = [153/255,153/255,153/255];
  29. glass_floor_color = [0/255,204/255,204/255];
  30. antenna_color =[240/255,240/255,240/255];
  31.  
  32. // Model
  33.  
  34. translate([0,-height*0.-base-radius]) {
  35. union() {
  36. color(base_color) cylinder(r=base_radius,h=base_height);
  37. color(shaft_color) cylinder(r=shaft_radius,h=shaft_height);
  38. translate([0,height*0.-shaft-height-sky-pod-height*.05-sky-pod-radius*1e-3,-sky-pod-radius])
  39. color(sky-pod-color) cylinder(r=sky-pod-radius,h=sky-pod-height);
  40. translate([height*.05-shaft-height-sky-pod-height-main-pod-height*.05-main-pod-radius*1e-3,
  41. -main-pod-radius]) color(main-pod-color) cylinder(r=main-pod-radius,h=main-
  42. pod-height);
  43. translate([height*.05-shaft-height-sky-pod-height-main-
  44. pod-height-glass-floor-height*.05-glass-floor-radius*1e-3,-glass-floor-radius]) color(glass-floor-color) cylinder(r=glass-floor_
  45. radius,h=glass-floor-height);
  46. translate([height*.05-shaft-radius-antenna-base-height*.05,-an-
  47. tenna-base-radius]) color(antenna-color) cylinder(r=an-
  48. tenna-base-radius,h=an-
  49. tenna-base-height);
  50. translate([height*.05-shaft-height-antenna-base-height-antenna-tip-height*.05,-an-
  51. tenna-tip-radius]) color(antenna-color) cylinder(r=an-
  52. tenna-tip-radius,h=an-
  53. tenna-tip-height);
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement