Uh oh!
There was an error while loading. Please reload this page.
Update quiver trace API - #7945
Conversation
Uh oh!
There was an error while loading. Please reload this page.
camdecoster
left a comment
There was a problem hiding this comment.
I left you a few suggestions. I like the new attribute names.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // TODO: How to handle the case where there is just one point in a trace, | ||
| // or all points have the same x or y value? This will give a boxArea of 0. | ||
| // For now I'm going to just normalize to a vector of unit length (1) in that case, | ||
| // but that's not a great solution |
There was a problem hiding this comment.
Can this comment be addressed?
There was a problem hiding this comment.
Addressed by 1315d07. I updated the point distance calculation to be more accurate, and as a bonus now it covers the case where all the points are in a horizontal or vertical line.
There's nothing we can do about the case where all points have the same x or y value; I think it's reasonable to just default to 1 in that case.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
b46f29c to
1507db6Compare… case where all points are in a horizontal or vertical line
1507db6 to
1315d07Compare
camdecoster
left a comment
There was a problem hiding this comment.
arrowref is also a good choice.
Uh oh!
There was an error while loading. Please reload this page.
| * D = (dX + dY + sqrt((dX - dY)^2 + 4N * dX * dY)) / (2 * (N - 1)) | ||
| * which is the forumla we'll use below. | ||
| * | ||
| * Note: this formula was derived and documented by a human ;) |
emilykl
commented
Aug 24, 2026
Glad you're OK with it. It occurred to me that in the future we may want to add the option to specify vectors by angle and magnitude, rather than |
Closes#7944
Also:
arrowref(was'axis'which is not an accepted value; changed to'data')lengthmode: 'scaled'arrow length calculation