Skip to content

Computation of the minimal convex invariant error set for the error-diffusion algorithm in 2D, given a set of points.

License

Notifications You must be signed in to change notification settings

niekbouman/convex_dynamics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

387037d · Nov 6, 2018

History

13 Commits
Nov 6, 2018
Aug 3, 2016
Aug 3, 2016
Nov 6, 2018
Nov 6, 2018
Aug 10, 2016
Aug 10, 2016
Nov 6, 2018
Nov 6, 2018
Nov 6, 2018
Nov 6, 2018

Repository files navigation

convex_dynamics

Computation of the minimal convex invariant error set for the error-diffusion algorithm in 2D, given a collection of sets of points.

Uses the CGAL C++ library.

Point set can be given in a JSON object with the collection of point sets with key "point_sets" as an array of arrays of pairs of coordinates. Coordinates can be integers, or fractions, denoted as strings, like "4/5". Example: below we have a collection of three point sets:

{"point_sets":[
  [[-1,1],[1,1],[1,"-3/8"],[-1,-1],[-2,-1]],
  [[-1,1],[1,"1/2"],[1,-1],[-1,-1],[-2,-1],[-2,5]],
  [[-2,2],[1,5],[1,-1]]
]}

Save this in a file, and run ./iter <filename>

Options

The following options can be specified in the JSON object:

  • "iteration" : specify which iteration to use:

    • "g" : the G-iteration (default)
    • "G" : the convexified G-iteration
    • "f" : the F-iteration
    • "F" : the convexified F-iteration

    For example,

    {
      "iteration":"G",
      "point_sets":[...] 
    }
    
  • "A" : the initial set to use

    For example,

    {
      "A":[[1,1],[-1,1],[-1,-1],[1,-1]],
      "point_sets":[...] 
    }
    

    If "A" is omitted, the singleton set [0,0] is used for the "g" and "G" iterations, while the convex hull of the first point set is used for the "f" and "F" iterations.

  • "digit_threshold" : threshold specifying how many digits the numerator or denominator of a vertex coordinate should have in order to enable coefficient rounding (defaults to 10)

  • "rounding_error" : round a coordinate when it is within rounding_error from a small fraction (defaults to 1e-8)

About

Computation of the minimal convex invariant error set for the error-diffusion algorithm in 2D, given a set of points.

Resources

License

Stars

Watchers

Forks

Packages

No packages published