Fix: inflation layer cost did not monotonically decrease with small inflation radii #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The InflationLayers cost function did exhibit some strange behavior with smaller
inflation
andinscribed
radii.This is the original cost layer:
This is the
inflation
layer with the original cost fading function:As we can see the cost decreases first and then increases again at the end of the inflation radius.
I have plotted the original cost function with
inscribed
radius at 0.3m andinflation
radius at 0.5m, the X-Axis is the distance from the Vertex being inflated. The plot assumes that theinscribed_value
parameter is 1.0.We can see that at the 0.3m the cost is about 0.1 and then increases to 1.0 at 0.5m.
I have changed the calculation of the
alpha
value to be linearly decreasing between theinscribed
and theinflation
radius. This then leads to the following cost function, again theinscribed
radius is 0.3m, theinflation
radius is 0.5m and theinscribed_value
parameter is 1.0:Here the cost starts with 1.0 at the
inscribed
radius (0.3m) and then decreases until it reaches 0 at the end of theinflation
radius (0.5m).The cost layer with the new function looks like this: