-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo_maze.jl
32 lines (24 loc) · 971 Bytes
/
go_maze.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Rayons
using Random
using CairoMakie
function go_maze()
# Create maze.json from maze.png
Rayons.maze_rectangles_from_png("maze.png")
fontsize_theme = Theme(fontsize = 30)
set_theme!(fontsize_theme)
Random.seed!(1234)
numerical_parameters = Rayons.NumericalParameters(
ds=2.e-3, # unused for rectangular based geometry
ϵ=1.e-15, # unused for rectangular based geometry
nmin=50, # cartesian grid size (for min time accumulation)
maxdepth=200, # max trajectory tree depth : probably unused (ray stop because of power decay or max time reached)
nα=20000, # number of initial angles for rays
tmax=4, # max time allowed for rays
power_threshold=1.e-3, #min power allowed for rays
history_size=1, # unused
model=Rayons.Fluid) # Fluid or Solid
fname = "maze.json"
fms,cmg=Rayons.rayons_fast(fname,numerical_parameters); #
end
fms,cmg=go_maze();
nothing