Trinity-Automata-Research / dsmodels

The dsmodels domain-specific-language for visualizing dynamical systems in R.
http://www.cs.trinity.edu/~sfogarty/dsmodels/index.html
GNU General Public License v2.0
7 stars 0 forks source link

do 2d find period worklist algorithm #202

Open kmclaren-trinity opened 5 years ago

kmclaren-trinity commented 5 years ago

start with a fine discretization, do a pass of find period init iters=1000

look for points that are on the border, redo thoes areas with iters =1000000

look for new border, repeat until border stops moving

increase iters and repeat

kmclaren-trinity commented 5 years ago

ways to remember which points need to be redone:

make a list of all the points, add any points on the border to the list then either -do all the points in the list and rebuild the list -or; every time a point is done, add the new points on the border. this requires some way to avoid duplicates

This is also relevant for issue #205

sfogarty commented 5 years ago
density := 1000
compute density on line /*grid*/
while density < 1 billion
    density *= 100
    worklist := NULL
    revisit := NULL
    for each point p
        if line[p] is different from line[n] for any neightbor n
             worklist.add(p)
             revisit.add(p)
    while worklist is not empty
        p := worklist.pop()
        newVal := recompute p at density
        if line[p] <> newVal
              line[p] := newVal
              for each neighbor n of p
                     if line[n] <> newVal && n not in revisit
                         worklist.add(n)
                         revisit.add(n)
kmclaren-trinity commented 5 years ago

combining this with issue 205

comments from #205:

do an initial fine discretization pass with low init iters

look for points on the border, do another pass with higher init iters repeat until border stops moving

increase init iters and repeat. use results from issue #202 to know how many times to repeat