基础图元各司其职
rect用位置、宽高和rx描述矩形,circle用圆心与半径描述圆,ellipse用两个半轴描述椭圆。polygon连接顶点并闭合;path通过M、Q、T等命令描述更1般的线与曲线。并不是所有参数对所有形状都有意义。
基础图元、变换、描边动画的交互Experiment。
Experiment workspace
Try the experience, then read the guide. Pausing keeps your state; resetting clears the current session and parameters.
Loading a preset restarts the experiment and applies its parameters. You can fine-tune them afterwards.
UNDERSTAND EVERY MOVE
用同1套变换观察矩形、圆、多边形、星形和曲线路径。这里的重点是图形由哪些参数构成,以及平移、旋转、描边如何改变外观。图形的基本数据与屏幕里的变换位置要分开理解。
rect用位置、宽高和rx描述矩形,circle用圆心与半径描述圆,ellipse用两个半轴描述椭圆。polygon连接顶点并闭合;path通过M、Q、T等命令描述更1般的线与曲线。并不是所有参数对所有形状都有意义。
图元先在自身坐标中定义,再通过平移放到画布、绕局部原点旋转。路径长度归1化后,可用dasharray和dashoffset控制已显露比例。旋转对圆的轮廓几乎没有影响,却会明显改变非圆形的方向。
Follow the steps, compare the expected results, and mark the challenge complete yourself. This records your practice without judging your results.
CHALLENGE 01
Expected result: 能说明顶点增加为何让轮廓更接近圆。
CHALLENGE 02
Expected result: 能够区分圆角、尺寸与旋转的作用。
CHALLENGE 03
Expected result: 下载的图可独立打开,轮廓与当前帧1致。
Say hello, discuss a commission, or send a little kindness. Here's where to find me.
© 2026 Ender · Cat Garden
左右滑动画布Explore完整图形与标注。
SVG 用「坐标 + 属性」描述图形,浏览器负责光栅化。所有图元都能被 transform、渐变、滤镜和动画改造。