Regression in stability of curvature while nudging position #86
Labels
No labels
bug
design
duplicate
enhancement
maintenance
prospective
question
regression
stub
todo
ui
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: StudioInfinity/dyna3#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
At pull request #80 (commit
360ce12
), when you nudge the position of a sphere, its curvature stays pretty stable, like we want. At the next pull request, #82 (commita2478fe
), we lose this desired behavior: nudging the position of a small sphere makes its curvature drift rapidly.Reproduction
x
direction until the first component of its representation vector reaches 4.Regression: curvature of small spheres drifts rapidly while nudgingto Regression in stability of curvature during position nudgesRegression in stability of curvature during position nudgesto Regression in stability of curvature while nudging positionBug found! It's a simple problem that should have a simple fix, but I'll describe it thoroughly because I think it's worth recalling how nudging currently works.
The context
The nudging routine does these steps:
The normalization step helps preserve the curvature of a sphere while nudging its position.
The problem
Right now, only spheres need to be normalized, because moving along a tangent vector doesn't affect the normalization of points. Pull request #82 therefore encloses the normalization in a conditional that's supposed to test whether the element is a sphere:
However, the test always evaluates to
false
, so the normalization never runs!A solution
Checking the type of a trait object isn't very idiomatic, so I think we should give the
Element
trait a method likethat does nothing to
rep
in its implementation forPoint
and runs the desired normalization routine onrep
in its implementation forSphere
. The nudging routine could then use that method in the normalization step.Resolved by #87, closing.