# 先從簡單的開始

step_angle = 10;
length = 5;
for(a = [0:step_angle:180]) {
rotate([0, 0, a]) translate([radius, 0, 0])
cube([length, length, length], center = true);
}

step_angle = 10;
length = 5;
for(a = [0:step_angle:180]) {
rotate([0, -45, a]) translate([radius, 0, 0])
cube([length, length, length], center = true);
}

step_angle = 10;
length = 5;
for(a = [0:step_angle:180]) {
rotate([0, -90 + a, a]) translate([radius, 0, 0])
cube([length, length, length], center = true);
}

step_angle = 0.25;
length = 5;
for(a = [0:step_angle:180]) {
rotate([0, -90 + a, a]) translate([radius, 0, 0])
cube([length, length, length], center = true);
}

# 讓文字繞著球

step_angle = 10;
font_size = 10;
thickness = 1;

for(a = [0:step_angle:180]) {
rotate([0, -90 + a, a]) translate([radius, 0, 0])
rotate([90, 0, 90])
linear_extrude(thickness)
text("A", size = font_size, valign = "center", halign = "center");
}

step_angle = 10;
font_size = 10;
thickness = 1;

total_semi_circles = 15;

for(a = [0:step_angle:180 * total_semi_circles]) {
rotate([0, -90 + a / total_semi_circles, a]) translate([radius, 0, 0])
rotate([90, 0, 90])
linear_extrude(thickness)
text("A", size = font_size, valign = "center", halign = "center");
}

step_angle = 10;
font_size = 10;
thickness = 1;

total_semi_circles = 15;
open_begin = 500;

for(a = [open_begin:step_angle:180 * total_semi_circles]) {
rotate([0, -90 + a / total_semi_circles, a]) translate([radius, 0, 0])
rotate([90, 0, 90])
linear_extrude(thickness)
text("A", size = font_size, valign = "center", halign = "center");
}

# 精確地控制數字

angle = 180 * open_begin_ratio;

font_size = 2 * PI * radius * sin(angle) / chars_per_circle;

step_angle = 360 / chars_per_circle;

begin_angle = angle * total_semi_circles;

total_semi_circles = 2 * PI * radius / font_size;

thickness = 1;
chars_per_circle = 20;
open_begin_ratio = 0.25;

angle = 180 * open_begin_ratio;
font_size = 2 * PI * radius * sin(angle) / chars_per_circle;
step_angle = 360 / chars_per_circle;
total_semi_circles = 2 * PI * radius / font_size;
begin_angle = angle * total_semi_circles;

for(a = [begin_angle:step_angle:180 * total_semi_circles]) {
rotate([0, -90 + a / total_semi_circles, a]) translate([radius, 0, 0])
rotate([90, 0, 90])
linear_extrude(thickness)
text("A", size = font_size, valign = "center", halign = "center");
}