-
Notifications
You must be signed in to change notification settings - Fork 62
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
calculate arrow shaftScale using projection of ends onto shaft offset #125
Conversation
Ah, this is a much more sensible way to do it. |
calculate arrow shaftScale using projection of ends onto shaft offset
Now we just need to fix the warning, and we can also do away with |
Puzzling. If you look closely at http://bergey.s3.amazonaws.com/diagrams/Arrowtest-fixed.svg you will notice that the tip of the orange arrow head is not in the exact center of the origin. This occurs in both @bergey 's fix and my alternative, but did not happen when I calculated the shaft scale iteratively (i.e. using binomial search)? For comparison: https://github.com/jeffreyrosenbluth/diagrams-gallery/blob/master/arrowtest.svg |
Are you sure it's not just a rendering artifact? Can you make a bigger version which clearly shows the discrepancy? It is too small for me to really see. |
I'm not 100% sure but if you look at the diagram I made with old code you Take a look, I put a link in the comment to an svg that runs the same test On Thu, Oct 10, 2013 at 10:29 AM, Brent Yorgey notifications@github.comwrote:
|
I actually, just dropped my old shaftScale function (using fInverse) into On Thu, Oct 10, 2013 at 10:31 AM, Jeffrey Rosenbluth <
|
I still cannot see the difference. How about this: can you (1) open a new ticket for this issue, and (2) make two very large (like, a width of at least 1000) images which show the discrepancy, preferably using a cut-down version of the diagram that includes only the first two circles and the arrow with the orange head. |
Last night I spent some time in ghci comparing the outputs of various shaftScale functions. The project-and-divide version agrees with the fInverse version to 3 decimal places, with differences beyond that. I'm not sure why that is; I'm pretty sure that they're the same algebraicly. (Incidentally, @jeffreyrosenbluth I agree that the code you pasted above is equivalent to the code I commited. I just wrote the one that occurred to me first.) |
When I get a chance I will
Sent from my iPad
|
1 and 2 are done. On Thu, Oct 10, 2013 at 11:04 AM, Jeffrey.rosenbluth <
|
I think this fixes the bug described in 56b703f#commitcomment-4294528. The output looks like this