Skip to content

Commit 4067b8e

Browse files
committed
minor modifications
1 parent 3626984 commit 4067b8e

File tree

4 files changed

+34
-18
lines changed

4 files changed

+34
-18
lines changed

combined.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ fig = Figure()
66
ax1 = Axis(fig[1,1],aspect = 1)
77
ax2 = Axis(fig[1,2], aspect = 1)
88

9-
colors = colorax(ax1)
9+
colors = colorax(ax1,8)
1010
juliaframe!(ax2,-1.0+0.0im,colors)
1111
fig

interactive.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using GLMakie
22
using Colors
33

4-
function colorax(ax)
4+
function colorax(ax,n_colors)
55

66
activebox = Observable{Int}(1)
77
hidedecorations!(ax)
@@ -65,9 +65,8 @@ function colorax(ax)
6565
return colorobservables
6666
end
6767

68-
n_colors = 8
6968

7069
fig = Figure()
7170
ax = Axis(fig[1,1],aspect = 1)
72-
colorax(ax)
71+
colorax(ax,9)
7372
fig

sequences/Phonebook.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function drawwedges!(ax,AIA)
2424
N = AIA.addr[end]
2525
n = 20
2626
for ii in N+1:N+n
27-
k = denominator(AIA,ii)
27+
k = newdenominator(AIA,ii)
2828
angles = []
2929
wedges = []
3030
angletext = []
@@ -40,7 +40,7 @@ function drawwedges!(ax,AIA)
4040
for wedge in wedges
4141
wedge!(ax,wedge...)
4242
end
43-
text!(ax,centers,text = angletext, align = (:center,:center))
43+
#text!(ax,centers,text = angletext, align = (:center,:center))
4444
end
4545
end
4646

@@ -61,7 +61,7 @@ function phonebook!(gl,AIA)
6161
rad = sqrt(sum([x*x for x in event.data]))
6262
idx = -1*Int(floor(log2(rad)))
6363
if idx > 0
64-
k = denominator(AIA[],idx)
64+
k = newdenominator(AIA[],idx)
6565
num = Int(mod1(ceil(ang*(k-1)/(2*pi)),k-1))
6666
println("$idx and $num / $k")
6767
if gcd(num,k) == 1
@@ -89,4 +89,7 @@ AIA = Observable(AngledInternalAddress([1],[]))
8989

9090
phonebook!(ga,AIA)
9191

92-
fig
92+
di = DataInspector(fig)
93+
fig
94+
95+
#TODO custom tooltip https://docs.makie.org/stable/explanations/inspector

trees/OrientTrees.jl

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ struct OrientedHubbardTree <: AbstractHubbardTree
66
boundary::Vector{Sequence}
77
end
88

9+
function Base.show(io::IO,H::OrientedHubbardTree)
10+
println(io,"Oriented Hubbard tree with adjacency dictionary")
11+
return display(H.adj)
12+
end
13+
914
function forwardimages(htree::Dict)
1015
return Dict([Pair(key,[shift(key)]) for key in keys(htree)])
1116
end
@@ -100,23 +105,21 @@ function characteristicorbits(H)
100105
end
101106

102107
function OrientedHubbardTree(AIA::AngledInternalAddress)
108+
#Construct the unoriented Hubbard tree from the internal address ignoring the angles
103109
H = HubbardTree(AIA.addr)
104110

111+
#Find the boundary between the '0' region and the '1' region as the path between the beta fixed point and its preimage
105112
(H,boundary) = addboundary(H)
106113

107-
nums = Int[]
108-
for angle in AIA.angles
109-
if denominator(angle) > 2
110-
push!(nums,numerator(angle))
111-
end
112-
end
114+
#Filter the angles for those describing the characteristic points
115+
charangles = filter(x -> denominator(x) != 2, AIA.angles)
113116

117+
#create empty oriented tree.
114118
orientedH = Dict{Sequence{Char}, Vector{Sequence{Char}}}()
115119

116120
charorbits = characteristicorbits(H)
117-
118-
for (node, num) in zip(charorbits,nums)
119-
merge!(orientedH,orientpreimages(H.adj,node[2],orientcharacteristic(H, node[1],num)))
121+
for (node, ang) in zip(charorbits,charangles)
122+
merge!(orientedH,orientpreimages(H.adj,node[2],orientcharacteristic(H, node[1],ang)))
120123
end
121124

122125
#Deal with the critical orbit
@@ -169,13 +172,19 @@ function orientnode(H,source::Sequence{Char},target::Pair{Sequence{Char}, Vector
169172
end
170173

171174
#SKETCHY SKETCHY
172-
function orientcharacteristic(H,node,num)
175+
function orientcharacteristic(H,node,ang)
176+
num = numerator(ang)
177+
den = denominator(ang)
173178
glarms = globalarms(H.adj,node)
174179
zero = H.zero
175180
per = period(zero)
176181
c = shift(zero)
177182
q = length(glarms)
178183
n = period(node)
184+
185+
if den != q
186+
error("the denominator of the characteristic angle does not match the order of the branch point")
187+
end
179188

180189
#the characteristic point has arms towards 1-n,1,1+n,1+2n, where n is the period of the characteristic point
181190
#the numerator tells us the arm towards 1 is in position num
@@ -407,6 +416,11 @@ function allanglesof(theta::Rational)
407416
return allanglesof(OZ,OH)
408417
end
409418

419+
function allanglesof(H::OrientedHubbardTree)
420+
OZ = labelonezero(H)
421+
return allanglesof(OZ,H)
422+
end
423+
410424
function angle_echo(theta::Rational)
411425
aia = AngledInternalAddress(theta)
412426
return criticalanglesof(aia)

0 commit comments

Comments
 (0)