Repository navigation
Path density: Bresenham interpolation - #875
Merged
dwhswenson merged 9 commits intoNov 19, 2019
Merged
Conversation
Member
Author
|
This is ready for review/merge. Note that it does change the default implementation of path density. And wow, it is a lot faster. Not quite as pretty -- I may still use the slow version for publications. But this renders quickly, with interpolation. If no comments, I will merge this on or after Mon 18 November (giving at least 48 hours). |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Alternate (and much faster) interpolation for path density plots, using a variant of the Bresenham algorithm. Not as exact as the current version, which catches all voxels the line passes through, but much faster.
Edit to summarize what is included:
BresenhamInterpolation: based on Bresenham line-drawing algorithmBresenhamLikeInterpolation: inspired by Bresenham, but works in float space instead of int space. I thought this made a more correct-looking interpolation.BresenhamLikeInterpolationis now the default forPathDensity. I argue that this does not count as breaking the API because we guarantee a path density with interpolation, but we don't guarantee that the interpolation has to bitwise the same. Any code that worked withSubdivideInterpolationwill work withBresenhamLikeInterpolation, but will return a slightly different path density. Anyone who wants the old behavior back can passinterpolate=SubdivideInterpolationat instantiation.