Skip to content

Path density: Bresenham interpolation - #875

Merged
dwhswenson merged 9 commits into
openpathsampling:masterfrom
dwhswenson:bresenham_interpolation
Nov 19, 2019
Merged

dwhswenson merged 9 commits into
openpathsampling:masterfrom
dwhswenson:bresenham_interpolation

Conversation

@dwhswenson

@dwhswenson dwhswenson commented Nov 14, 2019 •

Copy link
Copy Markdown
Member

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 algorithm
  • BresenhamLikeInterpolation: inspired by Bresenham, but works in float space instead of int space. I thought this made a more correct-looking interpolation.
  • major refactor of path histogram interpolation testing to make it much easier to test new interpolations
  • BresenhamLikeInterpolation is now the default for PathDensity. 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 with SubdivideInterpolation will work with BresenhamLikeInterpolation, but will return a slightly different path density. Anyone who wants the old behavior back can pass interpolate=SubdivideInterpolation at instantiation.

@dwhswenson dwhswenson changed the title [WIP] Path density: Bresenham interpolation Path density: Bresenham interpolation Nov 15, 2019
@dwhswenson
dwhswenson requested a review from jhprinz November 15, 2019 22:46
@dwhswenson

Copy link
Copy Markdown
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).

@dwhswenson
dwhswenson merged commit 6866512 into openpathsampling:master Nov 19, 2019
@dwhswenson
dwhswenson deleted the bresenham_interpolation branch November 19, 2019 14:10
This was referenced Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants