Created
September 21, 2024 05:31
-
-
Save lastforkbender/e893231639a1841d505cdce5ffa908b2 to your computer and use it in GitHub Desktop.
sectional template attained
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| class Sqtpp_MDial: | |
| def __init__(self): | |
| self.units={'X':(45,90,180,7677),'Y':(120,180,360,6757),'Z':(45,90,120,5744),'M':(180,360,720,5632)} | |
| self.cycles=[20, 40, 60, 80] | |
| self.laments={'X':[],'Y':[],'Z':[],'M':[]} | |
| self.constants={'X':('936'),'Y':('984'),'Z':('345'),'M':('617')} | |
| self.samekh_array={} | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def add_event(self, event, axis): | |
| self.laments[axis].append(event) | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def observed_axis(self, axis, expanse): | |
| for event in self.laments[axis]: | |
| if axis == 'X': self.laments['X'][0] = [x + expanse for x in self.laments['X'][0]] | |
| elif axis == 'Y': self.laments['Y'][1] = [y + expanse for y in self.laments['Y'][1]] | |
| elif axis == 'Z': self.laments['Z'][2] = [z + expanse for z in self.laments['Z'][2]] | |
| elif axis == 'M': self.laments['M'][3] = [m + expanse for m in self.laments['M'][3]] | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def retained_cycles(self): | |
| x = -1 | |
| for axis in self.units.items(): | |
| x+=1 | |
| self.cycles[x] = self.units['X'][0] | |
| for r in range(1, len(self.cycles)): | |
| if self.cycles[r] == self.cycles[r-1] or self.cycles[r] == self.cycles[r-1] or self.cycles[r] == self.cycles[r-1] or self.cycles[r] == self.cycles[r-1]: self.cycles[r+1]+=1 | |
| lmt = self.scroll_position(self.units['Y'][0], self.units['M'][0]) | |
| if lmt[1] > 1 and lmt[1] < 3: self.observe_cycle_length('Z', 3, [x * 3 for x in lmt]) | |
| elif lmt[0] > 2: self.observe_cycle_length('Y', 2, [(x + x) * x for x in lmt]) | |
| else: self.observe_cycle_length('X', 1, [(x * x) - x for x in lmt]) | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def observe_cycle_length(self, axis, udx, observed_distance): | |
| spn = 0 | |
| for x in range(len(observed_distance)): spn = spn + observed_distance[x] | |
| observer = list(self.constants[axis][udx][-int((spn/2)):]) | |
| min_pass = min(min(event) for event in observer) | |
| max_pass = max(max(event) for event in observer) | |
| constant = (int(min_pass) + int(max_pass))/2 | |
| samekh_nearest = self.find_samekh_nearest(constant) | |
| self.constants[axis] = {'X': constant, 'Y': samekh_nearest, 'Z': spn, 'M': spn*spn} | |
| nmb = self.get_samekh_array(self.constants) | |
| print(self.cycles) | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def find_samekh_nearest(self, num): | |
| def is_initial(n): | |
| return str(n) == str(n)[::-1] | |
| min_h = max_h = num | |
| while True: | |
| if is_initial(min_h): | |
| return min_h | |
| if is_initial(max_h): | |
| return max_h | |
| min_h-=1 | |
| max_h+=1 | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def get_samekh_array(self, constants): | |
| self.samekh_array = [[[0 for S in range(3)] for S in range(3)] for S in range(3)] | |
| keys = list(self.constants.keys()) | |
| q_cycles = [constants[pattern] for pattern in keys] | |
| m = 1 | |
| for t, initial in enumerate(q_cycles): | |
| x, y, z = self.scroll_position(t, m) | |
| self.samekh_array[x][y][z] = initial | |
| return self.samekh_array | |
| #__________________________________________________________________________________________________________________________________________________ | |
| def scroll_position(self, l, m): | |
| x = int(((l+m)*(math.pi+l)*l)/(l+1))%3 | |
| y = int(((l+m)*(math.pi+l+m))/(l+2))%3 | |
| z = int(((l+m)*(math.pi+l)-m)/(l+3))%3 | |
| if ((x+m)*(math.pi+l)/(l+2)) > 2*y: m+=1 | |
| else: m-=1 | |
| return x, y, z | |
| #__________________________________________________________________________________________________________________________________________________ | |
| #__________________________________________________________________________________________________________________________________________________ | |
| cls = Sqtpp_MDial() | |
| cls.add_event((947821,40032,53329,53928473764), 'X') | |
| cls.add_event((2,9), 'Z') | |
| cls.add_event((1,5,6,7,7,4,8,9), 'Y') | |
| cls.add_event((3,3,5,6,8,), 'Y') | |
| cls.observed_axis('X', 984662) | |
| cls.observed_axis('Y', 54535) | |
| cls.retained_cycles() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment