Bitmap/Bézier curves/Quadratic: Difference between revisions
Content deleted Content added
Added Kotlin |
|||
Line 598: | Line 598: | ||
<lang Mathematica>pts = {{0, 0}, {1, -1}, {2, 1}}; |
<lang Mathematica>pts = {{0, 0}, {1, -1}, {2, 1}}; |
||
Graphics[{BSplineCurve[pts], Green, Line[pts], Red, Point[pts]}]</lang> |
Graphics[{BSplineCurve[pts], Green, Line[pts], Red, Point[pts]}]</lang> |
||
Second solution using built-in function BezierCurve. |
|||
<lang Mathematica>pts = {{0, 0}, {1, -1}, {2, 1}}; |
|||
Graphics[{BezierCurve[pts], Green, Line[pts], Red, Point[pts]}]</lang> |
|||
[[File:MmaQuadraticBezier.png]] |
[[File:MmaQuadraticBezier.png]] |
||