forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not clamp y values on internal knots of timing function bezier curves
Cubic bezier timing functions are based on two knots (x1, y1) and (x2, y2) (the other knots are assumed to be (0, 0) and (1, 1)). We require that x1, x2 lie within (0, 1) (so that the bezier does not 'fold back' on itself), but y1, and y2 should have no such constraint. They currently do. This CL reimplements bezier interpolation without this restriction. This interpolation has two steps: 1) Find the t corresponding to the desired x. 2) Interpolate y's at the t computed in step 1. Step 1 is an iterative minimization. Here I do bisection for simplicity, but I could take Newton steps if this turns out to be a bottleneck. R=ajuma@chromium.org BUG=178070 Review URL: https://chromiumcodereview.appspot.com/16112002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202755 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
vollick@chromium.org
committed
May 29, 2013
1 parent
c40df01
commit 6b1d558
Showing
3 changed files
with
83 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters