Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RES=$preview ? 100 : 20;
- Logo(50, RES);
- module colDark(alpha = 1) color("#0057b8", alpha) children();
- module colLight(alpha = 1) color("#ffd700", alpha) children();
- module Logo(size=50, $fn=100) {
- hole = size/2;
- starHeight = size * 1.01;
- cylinderHeight = size * 1.25;
- difference() {
- union() {
- colDark() sphere(d=size);
- rotate([30,30,0]) colLight() star(starHeight, 12, [2,5]);
- rotate([45,-30,0]) colLight() star(starHeight, 14, [2,5]);
- rotate([90,0,45]) colLight() star(starHeight, 16, [1.6,4]);
- }
- colLight() cylinder(d=hole, h=cylinderHeight, center=true);
- rotate([0, 90, 0]) colLight() cylinder(d=hole, h=cylinderHeight, center=true);
- rotate([90, 0, 0]) colLight() cylinder(d=hole, h=cylinderHeight, center=true);
- }
- difference(){
- colLight(0.75) rotate([90, 0, 0]) cylinder(d=hole, h=54, center=true);
- colDark(0.75) colLight(0.85) translate ([6.5,0,0]) rotate([90, 0, 0]) cylinder(d=hole*0.8, h=cylinderHeight, center=true);
- }
- }
- module star(height, num, radii) {
- function r(a) = (floor(a / 10) % 2) ? 10 : 8;
- intersection() {
- sphere(d = height);
- 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) ]]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement