|
Mathematica Graphics: Color Blend in BezierCurve
A simple line strip should be sufficient for most purposes and there you can use VertexColors as usual:
- pts = {{0, 0}, {1, 1}, {2, 0}};
- Graphics[{Thick,
- Line[BezierFunction[pts] /@ #,
- VertexColors -> (Blend[{Red, Green}, #] & /@ #)] &[Range[0, 1, .01]],
- Line[{{0, 0}, {2, 0}}, VertexColors -> {Red, Green}]}
- ]
复制代码
|
|