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 visualization of arrows with zero shaft length. #107

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

tkoolen
Copy link
Collaborator

@tkoolen tkoolen commented Jun 12, 2019

Avoid the inverse, which was causing a SingularException when the shaft length was computed to be zero.

Basically, turn

vis -> shaft -> head

into

vis -> shaft
    -> head

where only the translation and rotation part of the old shaft transform is now applied to vis.

I've verified that the animation interpolation still looks fine.

Fixes #105.

@tkoolen tkoolen force-pushed the tk/fix-tiny-arrow branch from e06c396 to 6463a74 Compare June 14, 2019 15:44
@codecov-io
Copy link

codecov-io commented Jun 14, 2019

Codecov Report

Merging #107 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #107     +/-   ##
========================================
+ Coverage    75.2%   75.4%   +0.2%     
========================================
  Files          13      13             
  Lines         363     366      +3     
========================================
+ Hits          273     276      +3     
  Misses         90      90
Impacted Files Coverage Δ
src/arrow_visualizer.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f40c4aa...6463a74. Read the comment docs.

@tkoolen
Copy link
Collaborator Author

tkoolen commented Jun 14, 2019

I hadn't noticed #106, but I think this is a better solution anyway.

@rdeits
Copy link
Owner

rdeits commented Jun 17, 2019

Yup, agreed. Thanks!

@rdeits rdeits merged commit aa56209 into rdeits:master Jun 17, 2019
@tkoolen tkoolen deleted the tk/fix-tiny-arrow branch June 17, 2019 03:58
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.

ArrowVisualizer's settransform! fails for very short (but nonzero) arrows
3 participants