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

Getting direction to nearest zero point #29

Open
Ali2500 opened this issue Jun 26, 2019 · 4 comments
Open

Getting direction to nearest zero point #29

Ali2500 opened this issue Jun 26, 2019 · 4 comments

Comments

@Ali2500
Copy link

Ali2500 commented Jun 26, 2019

The distance() method returns the signed distance to the nearest point on the contour given by phi, but is it also possible to somehow get an angle or vector indicating the direction of this nearest point? I'm assuming this is already computed internally when the fast marching algorithm is implemented, but can I somehow access this?

I guess it could also be done by taking the gradient of the signed distance, but it just seems like additional overhead.

@jkfurtney
Copy link
Member

jkfurtney commented Jun 27, 2019 via email

@Ali2500
Copy link
Author

Ali2500 commented Jun 27, 2019

I actually managed to implement this functionality in the code. Just added another array to the BaseMarcher class that keeps track of the nearest phi==0 point while the FMM is running. Do you think it would make sense to create a pull request for this? There's the memory overhead of another array, but otherwise this info comes for free. In any case it could be made optional.

@jkfurtney
Copy link
Member

jkfurtney commented Jun 29, 2019 via email

@wmoebius
Copy link
Contributor

wmoebius commented Jul 3, 2019

Ali and Jason, I'd be very interested in having the same functionality for the travel_time function.

I'm also thinking, but can't quite decide, whether we could store information to get the full path back without needing to follow a gradient as in experimental wmoebius/OptPath.

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

No branches or pull requests

3 participants