Working with Paths
Hilbert curves are a type of space-filling curve that can be constructed with the SVG polyline element, using a basic design and then aggregating.
I started by polylining one basic design into four sections of a graph, making the necessary adjustments to connect them up. This then becomes my main building block.
By taking the main building block and translating, rotating and scaling, the next-larger curve can be constructed. To flip a section, a negative scale value is used. The four sections are joined by three short line segments.
Then, do it again to make it bigger. If you connect the two ends at the bottom, you will have a closed curved which could be copied as an image and color filled.
By changing the polyline to a SVG path element and connecting up the four lines, you can make a super path. Then add some SVG animated motion.
Here is another example of an animated path where I am animating two circles (one twice as fast as the other), one png image and one text string which only makes one circuit and then freezes.
Here is an example of an animated text path.
About this article
| Published in | Dev.Opera |
|---|---|
| Date | January 26, 2007 |
| Author | George Buffington |
| Tags | svg, animateMotion, polyline, path |
| Original | Internet Archive |