Advertisement
Guest User

logo nightly

a guest
Mar 10th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. RES=$preview ? 100 : 36;
  2. Logo(50, RES);
  3.  
  4. $vpr=[ 73.20, 0.00, 54.40 ];
  5.  
  6. module colDark(alpha = 1) color("#0057b8", alpha) children();
  7. module colLight(alpha = 1) color("#ffd700", alpha) children();
  8. module colCut(alpha = 1) color([168/255,177/255,202/255], alpha) children();
  9.  
  10. module Logo(size=50, $fn=100) {
  11. hole = size/2;
  12. starHeight = size * 1.01;
  13. cylinderHeight = size * 1.25;
  14. difference() {
  15. union() {
  16. colDark() sphere(d=size);
  17. rotate([30,30,0]) colLight() star(starHeight, 12, [2,5]);
  18. rotate([45,-30,0]) colLight() star(starHeight, 14, [2,5]);
  19. rotate([90,0,45]) colLight() star(starHeight, 16, [1.6,4]);
  20. }
  21. colCut() cylinder(d=hole, h=cylinderHeight, center=true);
  22. rotate([0, 90, 0]) colCut() cylinder(d=hole, h=cylinderHeight, center=true);
  23. //rotate([90, 0, 0]) colCut() cylinder(d=hole, h=cylinderHeight, center=true);
  24. rotate([90, 0, 0]) colLight() cylinder(d=hole, h=cylinderHeight, center=true);
  25. }
  26.  
  27. difference(){
  28. colLight(0.75) rotate([90, 0, 0]) cylinder(d=hole, h=54, center=true);
  29. colDark(0.75) colLight(0.85) translate ([6.5,+0,+0]) rotate([90, 0, 0]) cylinder(d=hole*0.95, h=cylinderHeight, center=true);
  30. }
  31. }
  32.  
  33. module star(height, num, radii) {
  34. //function r(a) = (floor(a / 10) % 2) ? 10 : 8;
  35. intersection() {
  36. sphere(d = height);
  37. linear_extrude(height, center=true, convexity=3) polygon([for (i=[0:num-1], a=i*360/num, r=radii[i%len(radii)]) [ r*cos(a), r*sin(a) ]]);
  38. }
  39. }
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement