JavaScriptでベクタ画像

アホがいるぞアホが(笑) (←賛辞

This JavaScript VectorGraphics library provides graphics capabilities for JavaScript: functions to draw circles, ellipses (ovals), oblique lines, polylines and polygons (for instance triangles, rectangles) dynamically into a webpage. ...

In HTML there are no such elements as oblique lines, circles, ellipses or other non-rectangularly bounded elements available. For a workaround, pixels might be painted by creating small background-colored layers (DIV elements), and arranging these to the desired pattern. ...

To minimize the amount of this overhead and to optimize performance to what's possible, this Draw Shapes JavaScript VectorGraphics Library, besides using fast algorithms (based on Bresenham algorithms) to compute the shapes, minimizes the number of required DIVs by combining as many pixels into each DIV as possible.

リンク先ではインタラクティブに試せるのでやってみると面白い*1.「描くのに何ミリ秒かかった」とか出るし.

*1:と言うか,全部 動的に描いてるので画像を引用できなかった.