4,6 hyperbolic tiling
This commit is contained in:
38
main.py
38
main.py
@@ -67,9 +67,9 @@ def draw_line(line):
|
|||||||
def simulation(t):
|
def simulation(t):
|
||||||
lines.clear()
|
lines.clear()
|
||||||
points.clear()
|
points.clear()
|
||||||
lines.append(y_axis)
|
#lines.append(y_axis)
|
||||||
lines.append(x_axis)
|
#lines.append(x_axis)
|
||||||
points.append(origin)
|
#points.append(origin)
|
||||||
|
|
||||||
x_motor = tx_generator.exp()
|
x_motor = tx_generator.exp()
|
||||||
y_motor = ty_generator.exp()
|
y_motor = ty_generator.exp()
|
||||||
@@ -77,19 +77,38 @@ def simulation(t):
|
|||||||
#generator = math.sin(t)*tx_generator + math.sin(math.sqrt(2)*t)*ty_generator + math.sin(math.sqrt(3)*t)*origin
|
#generator = math.sin(t)*tx_generator + math.sin(math.sqrt(2)*t)*ty_generator + math.sin(math.sqrt(3)*t)*origin
|
||||||
y_tick = motor*y_axis*motor.reverse()
|
y_tick = motor*y_axis*motor.reverse()
|
||||||
x_tick = motor*x_axis*motor.reverse()
|
x_tick = motor*x_axis*motor.reverse()
|
||||||
lines.append(y_tick)
|
#lines.append(y_tick)
|
||||||
lines.append(x_tick)
|
#lines.append(x_tick)
|
||||||
points.append(y_tick^x_tick)
|
#points.append(y_tick^x_tick)
|
||||||
|
|
||||||
|
mirror_one = e1
|
||||||
|
mirror_two = e2
|
||||||
|
mirror_three = -math.sqrt(3)/2 * e1 - math.sqrt(2)/2 * e2 + 1/2 * e3
|
||||||
|
|
||||||
|
generated = [ e1 ]
|
||||||
|
gen_next = []
|
||||||
|
|
||||||
|
for loop in range(8):
|
||||||
|
for line in generated:
|
||||||
|
gen_next.append(mirror_one * line * mirror_one)
|
||||||
|
gen_next.append(mirror_two * line * mirror_two)
|
||||||
|
gen_next.append(mirror_three * line * mirror_three)
|
||||||
|
generated = gen_next
|
||||||
|
gen_next = []
|
||||||
|
|
||||||
|
for line in generated:
|
||||||
|
lines.append(motor*line*motor.reverse())
|
||||||
|
'''
|
||||||
for i in range(9):
|
for i in range(9):
|
||||||
for j in range(9):
|
for j in range(9):
|
||||||
motor_x = ((i-4)*tx_generator/10).exp()
|
motor_x = ((i-4)*tx_generator/10).exp()
|
||||||
motor_y = ((j-4)*ty_generator/10).exp()
|
motor_y = ((j-4)*ty_generator/10).exp()
|
||||||
y_tick = motor * motor_x * y_axis * motor_x.reverse() * motor.reverse()
|
y_tick = motor * motor_x * y_axis * motor_x.reverse() * motor.reverse()
|
||||||
x_tick = motor * motor_y * x_axis * motor_y.reverse() * motor.reverse()
|
x_tick = motor * motor_y * x_axis * motor_y.reverse() * motor.reverse()
|
||||||
lines.append(y_tick)
|
#lines.append(y_tick)
|
||||||
lines.append(x_tick)
|
#lines.append(x_tick)
|
||||||
points.append(y_tick^x_tick)
|
#points.append(y_tick^x_tick)
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
||||||
y_axis = e1 #x = 0 line
|
y_axis = e1 #x = 0 line
|
||||||
@@ -99,7 +118,6 @@ tx_generator = e13 #A translation in the x direction
|
|||||||
ty_generator = e23 #A translation in the y direction
|
ty_generator = e23 #A translation in the y direction
|
||||||
origin = e12 #The origin, and a rotation about the origin
|
origin = e12 #The origin, and a rotation about the origin
|
||||||
|
|
||||||
|
|
||||||
# Initialize Pygame
|
# Initialize Pygame
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user