Florian Bouillon abfd6d8445
feat: Initial Commit
Signed-off-by: Avior <github@avior.me>
2022-12-07 12:58:31 +01:00

88 lines
4.3 KiB
OpenSCAD

// -- TO CHANGE START -- //
// do not chang it yourself
jan = [6433, 12574, 12013, 14896, 6242, 12306, 11732, 22842, 25780, 7375, 1030, 2676, 8857, 7948, 11429, 21389, 13025, 5335, 8942, 4457, 14171, 9951, 10766, 7780, 29865, 24567, 7702, 24382, 17697, 12100, 16698];
feb = [21093, 2887, 10773, 10345, 5897, 6255, 20849, 17071, 17168, 8504, 27323, 33772, 16624, 16915, 14535, 10766, 24339, 14177, 24986, 13760, 47418, 59739, 19918, 12892, 20671, 13143, 9618, 9389, 0, 0];
mar = [23643, 29897, 23874, 26867, 20092, 8363, 6073, 10425, 26663, 111087, 30647, 19681, 19344, 15507, 17636, 12541, 7369, 17568, 17077, 15472, 9506, 6338, 8851, 21544, 24243, 7023, 5401, 7157, 20584, 23584, 16505];
apr = [18005, 20973, 15606, 31164, 19681, 6483, 9336, 19675, 16235, 20264, 24966, 5373, 15940, 11196, 31502, 19592, 12128, 5567, 4127, 16426, 12003, 9349, 30876, 16646, 17918, 10468, 29463, 17615, 33916, 26946];
may = [7170, 23252, 9804, 31352, 15586, 14805, 11428, 1109, 17412, 10792, 15063, 26795, 21759, 16454, 6553, 4298, 18480, 12895, 9416, 15555, 11009, 8964, 12185, 14078, 13741, 12137, 16978, 9225, 5745, 11983, 16882];
jun = [18025, 9358, 14984, 9903, 8786, 9800, 4640, 10981, 243, 9525, 23704, 6319, 5829, 15594, 27113, 21561, 12550, 7705, 5961, 17777, 5608, 23655, 15029, 6724, 17000, 10188, 656, 2250, 15440, 14002];
jul = [28390, 11561, 7373, 6742, 17094, 29206, 11565, 8060, 14140, 30700, 24018, 20970, 12356, 23407, 15595, 18958, 27610, 22698, 14382, 18506, 11033, 26381, 15258, 7264, 16294, 20051, 7199, 3656, 9122, 12367, 7399];
aug = [37781, 16170, 5423, 7281, 625, 17514, 14275, 11376, 4164, 6922, 12616, 14079, 5546, 10987, 0, 2947, 16041, 9591, 8883, 8308, 10195, 12063, 13868, 8181, 11185, 19938, 9788, 6687, 12555, 22733, 5933];
sep = [8156, 14355, 7410, 7958, 5638, 1974, 7015, 3924, 559, 8996, 19943, 28816, 26180, 18516, 9069, 14086, 7128, 11096, 16909, 10968, 15450, 7919, 10128, 7433, 3533, 12644, 25574, 30150, 21302, 10383];
oct = [7109, 11067, 13580, 24341, 10774, 11742, 19973, 23626, 30664, 9417, 16783, 9260, 14108, 9489, 4830, 28002, 21885, 16954, 15868, 16902, 19634, 22134, 24960, 11625, 10090, 13084, 20795, 8160, 11223, 5578, 1741];
nov = [0, 13537, 30169, 11276, 6862, 13438, 10021, 14033, 11938, 10941, 3634, 23317, 33661, 22821, 30040, 13944, 13980, 10466, 8872, 9020, 10166, 37281, 31896, 15089, 15184, 14277, 8070, 13321, 11396, 9223];
dec = [8826, 11600, 5676, 8647, 8214, 26350, 12609, 9070, 21900, 17233, 11803, 17161, 12652, 2534, 5066, 26487, 27623, 21798, 17840, 11337, 3662, 9396, 16589, 242, 0, 0, 2674, 1892, 98, 10846, 9384];
max = 111087;
min = 0;
text = "Aviortheking";
// -- TO CHANGE END -- //
maxHeight = 100;
spacing = 0;
socleHeight = 20;
textHeight = 10;
minValue = 0;
module generateMonth(month, offset = 0) {
for (index = [0 : len(month) -1 ]) {
it = month[index];
translate([10 + (10 + spacing) * index,10 + (10 + spacing) * offset, socleHeight - 1]) {
cube([10,10,it < minValue ? 0 : it * maxHeight / max + 1]);
}
}
}
union() {
difference() {
cube([330, 140, socleHeight]);
translate([5,1.9,(socleHeight - textHeight) / 2]) {
rotate([90,0,0]) {
linear_extrude(2)
text(text, size=textHeight);
}
}
}
for (monthIndex = [ 0 : 11 ]) {
if (monthIndex == 0) {
generateMonth(jan, monthIndex);
}
if (monthIndex == 1) {
generateMonth(feb, monthIndex);
}
if (monthIndex == 2) {
generateMonth(mar, monthIndex);
}
if (monthIndex == 3) {
generateMonth(apr, monthIndex);
}
if (monthIndex == 4) {
generateMonth(may, monthIndex);
}
if (monthIndex == 5) {
generateMonth(jun, monthIndex);
}
if (monthIndex == 6) {
generateMonth(jul, monthIndex);
}
if (monthIndex == 7) {
generateMonth(aug, monthIndex);
}
if (monthIndex == 8) {
generateMonth(sep, monthIndex);
}
if (monthIndex == 9) {
generateMonth(oct, monthIndex);
}
if (monthIndex == 10) {
generateMonth(nov, monthIndex);
}
if (monthIndex == 11) {
generateMonth(dec, monthIndex);
}
}
}