Created
May 9, 2011 17:25
-
-
Save keveman/962922 to your computer and use it in GitHub Desktop.
Discrete Voronoi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let_(_v = get_<0>(_1)) [ | |
let_(_i = get_<9>(_1)) [ | |
let_(_y = _i/m) [ | |
let_(_x = _i - _y*m) [ | |
if_(_x >= k) [ | |
_v = minVoro_(_x, _y, _v, get_<3>(_1), m, n), | |
if_(_y >= k) [ | |
_v = minVoro_(_x, _y, _v, get_<8>(_1), m, n) | |
], | |
if_(_y+k <= n) [ | |
_v = minVoro_(_x, _y, _v, get_<7>(_1), m, n) | |
] | |
], | |
if_(_x + k < m) [ | |
_v = minVoro_(_x, _y, _v, get_<1>(_1), m, n), | |
if_(_y >= k) [ | |
_v = minVoro_(_x, _y, _v, get_<6>(_1), m, n) | |
], | |
if_(_y+k < n) [ | |
_v = minVoro_(_x, _y, _v, get_<5>(_1), m, n) | |
] | |
], | |
if_(_y >= k) [ | |
_v = minVoro_(_x, _y, _v, get_<4>(_1), m, n) | |
], | |
if_(_y+k < n) [ | |
_v = minVoro_(_x, _y, _v, get_<2>(_1), m, n) | |
] | |
] | |
] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment