Skip to content

Commit

Permalink
added random element to d=n bdry plot
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGibbs committed Nov 10, 2023
1 parent c54b25f commit 56d02d4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,18 @@ function sketch_attractor_boundary(Γ::SelfSimilarFractal, levels::Int64; mem_co
Γ.spatial_dimension != 2 ? error("plotting only defined for fractals with two spatial dimensions") : nothing

unit_square = [[-1/2,-1/2],[-1/2,1/2],[1/2,1/2],[1/2,-1/2]]
stretched_square = (1.1)*Γ.diameter.*unit_square
K = [x + Γ.barycentre for x stretched_square]
# stretched_square = (1.0+0.1*rand())*Γ.diameter.*unit_square
rand_vals = rand(length.IFS))
# K = [x + Γ.barycentre for x∈ stretched_square]
K = [[x + Γ.barycentre for x ((1.0+0.1*rand_vals[m])*Γ.diameter.*unit_square)] for m=1:length.IFS)]

for ℓ_=1:levels
S□ = [Vector{Vector{Float64}}([sim_map(s,x) for xK ]) for sΓ.IFS]
# S□ = [Vector{Vector{Float64}}([sim_map(s,x) for x∈K ]) for s∈Γ.IFS]
if ℓ_==1
S□ = [Vector{Vector{Float64}}([sim_map.IFS[m],x) for xK[m] ]) for m=1:length.IFS)]
else
S□ = [Vector{Vector{Float64}}([sim_map(s,x) for xK ]) for sΓ.IFS]
end
# println(ℓ_)
count = 1
while length(S□) > 1
Expand Down

0 comments on commit 56d02d4

Please sign in to comment.