Template:Lloyd Optimizer: Difference between revisions
No edit summary |
|||
Line 14: | Line 14: | ||
* ''Timeout'' – The maximum amount of time to optimize for. This should be a number followed by a letter indicating the scale, e.g. "10m" for 10 minutes. Supported scales are "d" (days), "h" (hours), "m" (minutes) and "s" (seconds). These can be combined by separating them with a space, e.g. "1d 6h 30m" for one day, six hours and thirty minutes. If left blank, there will be no time limit. | * ''Timeout'' – The maximum amount of time to optimize for. This should be a number followed by a letter indicating the scale, e.g. "10m" for 10 minutes. Supported scales are "d" (days), "h" (hours), "m" (minutes) and "s" (seconds). These can be combined by separating them with a space, e.g. "1d 6h 30m" for one day, six hours and thirty minutes. If left blank, there will be no time limit. | ||
* ''Move ratio'' – Fraction of the length of a vertex's shortest incident edge by which it must move during an iteration. If an iteration would move the vertex by less than this amount, then movement of the vertex will be skipped during this iteration. Other vertices may still move during the iteration, and the skipped vertex may be moved during a later iteration if the vertex gets a larger proposed move. This can be useful to prevent the optimizer from spending time moving vertices by tiny amounts. It should be a value between 0 and 1. A value of 0 will disable this condition. | * ''Move ratio'' – Fraction of the length of a vertex's shortest incident edge by which it must move during an iteration. If an iteration would move the vertex by less than this amount, then movement of the vertex will be skipped during this iteration. Other vertices may still move during the iteration, and the skipped vertex may be moved during a later iteration if the vertex gets a larger proposed move. This can be useful to prevent the optimizer from spending time moving vertices by tiny amounts. It should be a value between 0 and 1. A value of 0 will disable this condition. | ||
* ''Freeze ratio'' – Similar to '' | * ''Freeze ratio'' – Similar to ''Move ratio'', except that the optimization will stop rather than skip the move. | ||
====Additional Notes==== | ====Additional Notes==== |
Revision as of 21:25, 20 April 2022
Lloyd Optimizer
The Lloyd Optimizer tool optimizes the angles in a triangular grid to make them close to 60 degrees. It can run for a given time, number of iterations, or until a point no longer moves far. It can also require that all points move far enough.
From CGAL:
This optimization process alternates relocating vertices to the center of mass of their Voronoi cells, and updating the Delaunay connectivity of the triangulation. The center of mass is computed with respect to a sizing function that was designed to preserve the local density of points in the [grid]...
Input Parameters
- Input grid – A UGrid containing triangles to optimize.
- Iterations – The maximum number of iterations to perform before stopping. Can be set to 0 for no limit.
- Timeout – The maximum amount of time to optimize for. This should be a number followed by a letter indicating the scale, e.g. "10m" for 10 minutes. Supported scales are "d" (days), "h" (hours), "m" (minutes) and "s" (seconds). These can be combined by separating them with a space, e.g. "1d 6h 30m" for one day, six hours and thirty minutes. If left blank, there will be no time limit.
- Move ratio – Fraction of the length of a vertex's shortest incident edge by which it must move during an iteration. If an iteration would move the vertex by less than this amount, then movement of the vertex will be skipped during this iteration. Other vertices may still move during the iteration, and the skipped vertex may be moved during a later iteration if the vertex gets a larger proposed move. This can be useful to prevent the optimizer from spending time moving vertices by tiny amounts. It should be a value between 0 and 1. A value of 0 will disable this condition.
- Freeze ratio – Similar to Move ratio, except that the optimization will stop rather than skip the move.
Additional Notes
The optimizer will not move points on boundary polygons and the boundaries of holes.
During development, points were observed moving across boundaries in some cases. This issue can no longer be reproduced, which prevents understanding the underlying cause and verifying that it is truly resolved. To be on the safe side, the tool will delete any points that migrate across boundaries during optimization.
While this tool operates on any 2D UGrid, it requires that the grid be fully triangulated. To accomodate this, the tool will generate a triangulated grid based on the input grid and optimize the triangulated grid instead. This may result in swapped interior edges and non-triangular cells being broken down into triangular ones. Boundaries and holes will still be preserved.
Output Parameters
- Output grid – Name of the output grid.
Current Location in Toolbox
Unstructured Grids/Lloyd Optimize