CurveUtils.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">
  13. A class containing utility functions for curves.<br />
  14. Note that these are all linear functions so it is neccessary to calculate seperately for
  15. x, y (and z, w if present) components of a curve.
  16. </div>
  17. <h2>Methods</h2>
  18. <h3>[method:Number interpolate]( p0, p1, p2, p3, t )</h3>
  19. <div>
  20. t -- interpolation weight. <br />
  21. p0, p1, p2, p4 -- the points defining the spline curve.<br /><br />
  22. Used internally by [page:SplineCurve SplineCurve] and [page:SplineCurve3 SplineCurve3].
  23. </div>
  24. <h3>[method:Number tangentQuadraticBezier]( t, p0, p1, p2 )</h3>
  25. <div>
  26. t -- the point at which to calculate the tangent. <br />
  27. p0, p1, p2 -- the three points defining the quadratic Bézier curve.<br /><br />
  28. Calculate the tangent at the point t on a quadratic Bézier curve given by the three points.<br /><br />
  29. Used internally by [page:QuadraticBezierCurve QuadraticBezierCurve].
  30. </div>
  31. <h3>[method:Number tangentCubicBezier]( t, p0, p1, p2, p3 )</h3>
  32. <div>
  33. t -- the point at which to calculate the tangent. <br />
  34. p0, p1, p2, p3 -- the points defining the cubic Bézier curve.<br /><br />
  35. Calculate the tangent at the point t on a cubic Bézier curve given by the four points.<br /><br />
  36. Used internally by [page:CubicBezierCurve CubicBezierCurve].
  37. </div>
  38. <h3>[method:Number tangentSpline]( t, p0, p1, p2, p3 )</h3>
  39. <div>
  40. t -- the point at which to calculate the tangent. <br />
  41. p0, p1, p2, p3 -- the points defining the spline curve.<br /><br />
  42. Calculate the tangent at the point t on a spline curve given by the four points.
  43. </div>
  44. <h2>Source</h2>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  46. </body>
  47. </html>