Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: inflation layer cost did not monotonically decrease with small inflation radii #64

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

Conversation

JustusBraun
Copy link
Contributor

The InflationLayers cost function did exhibit some strange behavior with smaller inflation and inscribed radii.

This is the original cost layer:
layer

This is the inflation layer with the original cost fading function:
old_fading
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 and inflation radius at 0.5m, the X-Axis is the distance from the Vertex being inflated. The plot assumes that the inscribed_value parameter is 1.0.
old_function
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 the inscribed and the inflation radius. This then leads to the following cost function, again the inscribed radius is 0.3m, the inflation radius is 0.5m and the inscribed_value parameter is 1.0:
new_function
Here the cost starts with 1.0 at the inscribed radius (0.3m) and then decreases until it reaches 0 at the end of the inflation radius (0.5m).

The cost layer with the new function looks like this:
new_fading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant