使用Mathematica中的图形进行渐变填充

500*_*500 6 graphics wolfram-mathematica

如何使用Rectangle[]in 创建以下内容Graphics[]

在此输入图像描述

Sza*_*lcs 7

使用Polygon,你可以

Graphics[{EdgeForm[Black], 
  Polygon[{{0, 0}, {3, 0}, {3, 1}, {0, 1}}, 
   VertexColors -> {White, Red, Red, White}]}]
Run Code Online (Sandbox Code Playgroud)

  • 只是为了好玩(需要网络摄像头才能工作):pts = {{0,0},{1,0},{1,1},{0,1}}; Graphics [{Texture [CurrentImage []],Polygon [pts,VertexTextureCoordinates - > pts]}] (3认同)

Dr.*_*ius 5

也:

Graphics[Raster[{Range[100]/100}, ColorFunction -> (Blend[{White, Red}, #] &)], 
 AspectRatio -> .3, 
 Frame       -> True, 
 FrameTicks  -> None]
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述