开发者

Creating circle that looks like an authorized seal with code

I want to draw an irregular circle entirely with php (or another programming option) but without photoshop. The circle I'm trying to draw should be slightly irregular and I think the line thickness should vary slightly to give the impression of an authorized seal. I don't mind suggestion开发者_开发技巧s for a graphics package, as long as it uses code (not image manipulation for artists). Any code has been written for this? How can I get to a similar effect?


I would highly recommend raphael.js

Right on their home page they show you how to draw a circle, but you can draw paths as well with vector lines, which would allow you to create an irregular circle. Plus,it works on IE6+, as well as Firefox, Safari, Chrome.

Try using cos(x) for the x value and sin(y) for the y value in JavaScript with short paths and a random number for irregularity.


If you just want to texture a circle, a simple Bump map/Displacement map may do the trick. You'll still need to use some source image for the map.

The next trick is to find a package that supports a displacement map. SVG has a displacement map filter, but I'm sure there're php libs with a nice set of filters if you're concerned about SVG's browser support.


maybe you could use SVG. Graphics can be describe as text and rendered at runtime.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜