<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Mauveweb (Artwork)</title><link>http://mauveweb.co.uk/</link><description></description><atom:link href="http://mauveweb.co.uk/categories/artwork.xml" type="application/rss+xml" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 08 Mar 2018 00:37:09 GMT</lastBuildDate><generator>https://getnikola.com/</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Bubble Background Animation</title><link>http://mauveweb.co.uk/posts/2008/10/bubble-background-animation.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I was pondering concepts for interesting web designs when the idea occurred to me that an animated bubble effect might lend a peaceful ambience to a webpage. I experimented with placing a Javascript-controlled SVG animation into the background of a page. You might like to &lt;a href="http://mauveweb.co.uk/bubbles/"&gt;judge for yourself&lt;/a&gt; whether this is successful or not (SVG-enabled browser required and a reasonably fast CPU recommended).&lt;/p&gt;
&lt;p&gt;If you were around at the dawn of dynamic HTML you will probably have stumbled across amateur websites who thought it was really rather stylish to add a Javascript snow or bubble effect over the top of the page content.&lt;/p&gt;
&lt;p&gt;Fortunately, those days are gone. By and large, it seems that amateur webmasters today know that just a nice colour scheme and a consistent, simple style trump a jumble of styles, javascript effects and stock animated GIFs that we all remember too well. Nice graphic design is done for you if you just install a blog and browse existing themes. Some may not even remember effects like &lt;a href="http://www.dynamicdrive.com/dynamicindex3/bubble.htm"&gt;this&lt;/a&gt; (Warning: Not safe for work or indeed any other time you require functioning eyeballs).&lt;/p&gt;
&lt;p&gt;It's well-known that animations draw the user's attention in webpages. That doesn't mean we always want to avoid them: sometimes we want to direct the user's attention in one direction or another, particularly when the page is being updated dynamically with Javascript. This is not one of those special cases. Since the goal of this experiment is to build a fully-animated webpage, we will have to ignore that inconvenient little fact. However, this suggests we need to keep the animation as unintrusive as possible. Keeping it nice and slow may help, and it should certainly be in the background and not the foreground.&lt;/p&gt;
&lt;p&gt;SVG is useful for this kind of effect because it has a feature (&amp;lt;svg:use&amp;gt;) for manipulating independent clones of a symbol. It is therefore simple to draw the original shape using an SVG editor, and the Javascript merely needs to manage instances of the clones.&lt;/p&gt;
&lt;p&gt;Using Inkscape, I drew up a bubble looks like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="background-color: #2771a1; padding: 5px; text-align: center;"&gt;&lt;img src="http://mauveweb.co.uk/wp-content/uploads/2008/10/bubble.png" alt="Bubble"&gt;&lt;/div&gt;
&lt;p&gt;There's a certain knack to drawing bubbles like this, of course. Air bubbles in water are colourless, but they are reflective due to total internal reflection. The amount of reflection increases as the angle of incidence increases, up to the critical angle, at which all light is reflected. At a water-air boundary the critical angle is 48.6° so actually the bubble should appear totally reflective from about 75% of the radius.&lt;/p&gt;
&lt;p&gt;If this sends you into a bit of a panic as you struggle to remember your school physics lessons, don't worry. I'm not recommending a mathematically accurate implementation of &lt;a href="http://en.wikipedia.org/wiki/Fresnel_equations"&gt;Fresnel's Equations&lt;/a&gt;. With a lot of art (not just on computers), an appreciation of the physics can go a long way towards adding realism. But a 100% accurate simulation is not necessary for an effect to seem convincing - trial and error is much easier. The gradient as I've drawn it is not accurate but looks alright. Similarly, bubbles have two specular highlights corresponding to the water-air boundary and the air-water boundary.&lt;/p&gt;
&lt;p&gt;As an aside, one day it may be possibly to depict fully reflective and refractive bubbles. Using SVG's incredible feDisplacementMap filter, you could distort the background using a pre-computed "lens" image. But that is unlikely to run at interactive speeds today, even if the filters required were fully and accurately supported, which they are not. The bubbles I've drawn are intended to be a compromise between rendering simplicity and attractiveness.&lt;/p&gt;
&lt;p&gt;The bubble system (really just &lt;a href="http://mauveweb.co.uk/bubbles/bubbles.svg"&gt;the SVG on its own&lt;/a&gt;) animates 20 clones of the bubble symbol. Again, this is based on some physical principles. The smaller bubbles are subject to less drag so have a higher terminal velocity, bubbles grow slightly as they rise and the pressure decreases and so on. One of the most effective things is that the bubbles drift with a random walk: they can randomly drift to one side or the other. They don't go straight up nor do they oscillate sinusoidally like the classic DynamicDrive script. For the most effective animation, bubbles would drift with the currents but this is simpler and reasonably effective.&lt;/p&gt;
&lt;p&gt;I am quite pleased with the results. To really rid ourselves of the legacy of Javascript-animated GIF images, it would be important for this effect to tie in with the graphic design of the page, which I haven't shown.&lt;/p&gt;
&lt;p&gt;I don't think this is realistically ready for production websites: Internet Explorer cannot display SVG, for one thing, and the intensive CPU requirement is also a problem. But I do think that sharp SVG graphics allow us to produce a wholly better standard of animation than what was possible before. With this, I think it's possible to make a bubble animation complement rather than detract from a web page.&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><category>SVG</category><category>Web Design</category><guid>http://mauveweb.co.uk/posts/2008/10/bubble-background-animation.html</guid><pubDate>Sat, 11 Oct 2008 14:44:31 GMT</pubDate></item><item><title>SVG Goo</title><link>http://mauveweb.co.uk/posts/2008/08/svg-goo.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;It's a well known computer graphics technique that blobby shapes can be drawn as the isosurface of a scalar field.&lt;/p&gt;
&lt;p&gt;It's actually possible to create a similar effect using SVG filters:&lt;/p&gt;
&lt;p&gt;&lt;img class="size-full wp-image-159" title="goo" src="http://mauveweb.co.uk/wp-content/uploads/2008/08/goo.png" alt="Blobby, ketchuppy shapes" width="500" height="495"&gt;&lt;/p&gt;
&lt;p&gt;The field is created using Gaussian-blurred circles. Where these soft edges overlap, the alpha channels are composited and this creates the necking effect which is key to blobby shapes like this.&lt;/p&gt;
&lt;p&gt;The thresholding is done using a high-contrast filter on the alpha channel. The specular highlight was added just to emphasise the gooey, ketchup-y effect.&lt;/p&gt;
&lt;p&gt;If you have a copy of Inkscape, it's fun to play with dragging the circles. Feel free to &lt;a href="http://mauveweb.co.uk/wp-content/uploads/2008/08/goo.svg"&gt;download the SVG&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><category>SVG</category><guid>http://mauveweb.co.uk/posts/2008/08/svg-goo.html</guid><pubDate>Sun, 31 Aug 2008 15:20:04 GMT</pubDate></item><item><title>SVG filters with Inkscape 0.46</title><link>http://mauveweb.co.uk/posts/2008/04/svg-filters-with-inkscape-046.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;One of the most stunningly powerful features of the recently release &lt;a href="http://www.inkscape.org/"&gt;Inkscape 0.46&lt;/a&gt; is the ability to design SVG filters. SVG filters are a section of the SVG language for connecting simple, well-defined raster operations and applying those to rasterised vector shapes in the document.&lt;/p&gt;
&lt;p&gt;What this entails is that it's possibly to take very simple vector shapes, bung on a filter, and get some very pretty artwork &lt;strong&gt;which can still be edited as paths.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Inkscape's 0.45 release saw the implementation of its first filter: Gaussian blur. On its own, Gaussian blur was an incredible useful filter, offering soft edges and powerful shading techniques. But with the collection of other filters provided, it also provides a building block for constructing some very complicated and useful graphical operations that could previously only be done with a raster tool like The Gimp.&lt;/p&gt;
&lt;p&gt;Unfortunately, you will need a fairly deep knowledge of 2D image processing to make use of SVG filters. Fortunately I have one of these. Allow me to walk you through creating a filter in Inkscape 0.46.&lt;/p&gt;
&lt;p&gt;I want to start with an example of a graphic I created way way back with Inkscape 0.38.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-136" title="original" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/original.png" alt="Original Mauveweb logo" width="450" height="113"&gt;&lt;/p&gt;
&lt;p&gt;I created this graphic by drawing a blob, adding some text (in a font called "Balcony Angels") and then painstakingly drawing out the highlights (specular lighting) as partially-transparent white paths. It's also got a drop shadow.&lt;/p&gt;
&lt;p&gt;Let's start again in Inkscape 0.46. I'm using the star tool with a bit of randomness to start me out with a blob. The wording is just normal text but I've tweaked the kerning a little this time. Also notice the gradient. Depending on how you wire up your filters you can preserve the colours and using a bit of gradient will always help to give a word-art logo like this a bit more richness.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-140" title="plain" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/plain.png" alt="" width="450" height="133"&gt;&lt;/p&gt;
&lt;p&gt;To add lighting, you need a height map. The simplest way to create a height map is by applying a &lt;strong&gt;gaussian blur&lt;/strong&gt;. SVG uses the alpha channel to represent the height map. Without a blur you can imagine that the height is 0% outside the shape and 100% inside - like a cliff or a plateau. With a blur you have a partially transparent edge, so it smoothly rises from the 0 to the 100%, like rolling hills. I usually apply the blur to the alpha channel as the colour channels aren't relevant.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-142" title="blur" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/blur.png" alt="" width="450" height="158"&gt;&lt;/p&gt;
&lt;p&gt;You can only see a 3D shape appear when we wire up a lighting filter. &lt;strong&gt;Specular lighting&lt;/strong&gt; is what we're shooting for. The output of specular lighting is just the highlights so make sure the document background is set to opaque black before you start experimenting.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-143" title="specular_on_black" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/specular_on_black.png" alt="" width="450" height="149"&gt;&lt;/p&gt;
&lt;p&gt;Specular lighting is very sensitive to some of the settings you're using.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
    &lt;li&gt;&lt;strong&gt;Surface scale&lt;/strong&gt; - here's where we say what the 100% height of the height map actually is. Generally you should stick to small positive numbers. Try 10. The gradient of the bumpy edges can be thought of as this number over the blur radius. If you've got 10px of blur, and a surface scale of 10, your bumpy edges should have a 1:1 gradient.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Constant&lt;/strong&gt; - this number combines two ideas: how bright the light source is, and how much light the object reflects. 0 means that the light is off, so that's not what you want. Numbers between 0 and 1 mean the object reflects a fraction of the light, or the light is dim. Numbers over 1 mean that the light is brighter. It's all relative, obviously.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Exponent&lt;/strong&gt; - this is the glossiness of the surface. The higher the exponent, the tighter the highlights. Metals have quite low exponents - say 10. 30ish gives a soft plastic. Higher gives the effect of ceramics and polished surfaces.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Light Source&lt;/strong&gt; - start with distant light, azimuth 225, elevation 25 and experiment from there. That will give you the kind of lighting from the top-left that mimics the user interface of most computers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The outer halo, if you're wondering, is where the light catches off the bottom of the slope. We can clip that away at the same time as we apply it to the shape. To do this, we use an &lt;strong&gt;atop&lt;/strong&gt; filter. The top input is the highlights, the bottom is the source graphic. &lt;strong&gt;Atop&lt;/strong&gt; draws the highlights only over the source graphic. This is equivalent to (specular &lt;strong&gt;in&lt;/strong&gt; source alpha) &lt;strong&gt;over&lt;/strong&gt; source grahic.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-141" title="specular" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/specular.png" alt="" width="450" height="133"&gt;&lt;/p&gt;
&lt;p&gt;We can also add the outline from the original. If we added it before the filtering, it would have also been shaded because the outline would be part of the alpha channel that we bumpmapped. We need a raster outline. We can do this using the &lt;strong&gt;morphology&lt;/strong&gt; filter.&lt;/p&gt;
&lt;p&gt;We dilate the source alpha channel and &lt;strong&gt;composite&lt;/strong&gt; the original over the top. Voila:&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-145" title="morphology" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/morphology.png" alt="" width="450" height="137"&gt;&lt;/p&gt;
&lt;p&gt;And then there's a slight drop shadow. &lt;strong&gt;Gaussian blur&lt;/strong&gt; the same &lt;strong&gt;morphology&lt;/strong&gt; filter, add a couple of pixels of &lt;strong&gt;offset&lt;/strong&gt;. Then &lt;strong&gt;composite&lt;/strong&gt; the previous stage back on top of it.&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-146" title="shadow" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/shadow.png" alt="" width="450" height="139"&gt;&lt;/p&gt;
&lt;p&gt;If the shadow - or indeed the highlights are too bright, you can make them slightly transparent with a &lt;strong&gt;colour matrix&lt;/strong&gt; filter. The fourth row of the colour matrix is the alpha channel, and the fourth column of that row is how much of the alpha channel to pass through. Change it to any number between 0 and 1 to make it partially transparent.&lt;/p&gt;
&lt;p&gt;I've got one last trick up my sleeve, and it's the most complicated one.&lt;/p&gt;
&lt;p&gt;I'm going to decrease the exponent on the specular filter a little to give me bigger highlights. Then I want to &lt;em&gt;increase the contrast on the alpha channel.&lt;/em&gt; This can be done with a &lt;strong&gt;colour matrix&lt;/strong&gt; filter. I set the last row to (0, 0, 0, 4.0, -1.5). This means that the alpha channel will be mapped a -&amp;gt; 4a - 1.5. This will to some extent remove the partial shades in the specular highlight and give me a more cartoon effect:&lt;/p&gt;
&lt;p&gt;&lt;img class="alignnone size-full wp-image-148" title="final" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/final.png" alt="" width="450" height="139"&gt;&lt;/p&gt;
&lt;p&gt;This is how the final filter is wired:&lt;/p&gt;
&lt;p&gt;&lt;a rel="attachment wp-att-149" href="http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/filter_wiring/"&gt;&lt;img class="alignnone size-medium wp-image-149" title="filter_wiring" src="http://mauveweb.co.uk/wp-content/uploads/2008/04/filter_wiring-300x288.jpg" alt="Screenshort of the wiring for the Mauveweb logo filter" width="300" height="288"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><category>SVG</category><guid>http://mauveweb.co.uk/posts/2008/04/svg-filters-with-inkscape-046.html</guid><pubDate>Sat, 19 Apr 2008 11:40:01 GMT</pubDate></item><item><title>Inkscape 0.46 preview</title><link>http://mauveweb.co.uk/posts/2008/01/inkscape-046-preview.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Inkscape 0.46 is drawing close. There's a whole &lt;a href="http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046"&gt;wealth of new features&lt;/a&gt;, some of which are incredibly exciting. I've not been using the SVN version since I replaced my desktop machine 5 months ago, so I'm only now discovering what these new features will let me achieve. It's a process of discovering not so much how each tool works, but identifing useful little ways of combining features.&lt;/p&gt;
&lt;p&gt;To whet your appetite, here's a two-minute doodle demonstrating a turbulent displacement filter.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://mauveweb.co.uk/wp-content/uploads/2008/01/watery.png" alt="Watery Doodle"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: here's a more realistic style using a specular lighting filter.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://mauveweb.co.uk/wp-content/uploads/2008/01/watery2.png" alt="Watery Doodle 2"&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><guid>http://mauveweb.co.uk/posts/2008/01/inkscape-046-preview.html</guid><pubDate>Sun, 13 Jan 2008 17:02:23 GMT</pubDate></item><item><title>Champagne</title><link>http://mauveweb.co.uk/posts/2007/07/champagne.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;My assistant Maxine took it upon herself to produce a poster advertising a promotion at her local pub. She was curious as to how I would draw a bottle of champagne in Inkscape.&lt;/p&gt;
&lt;p&gt;This is how I responded:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: center"&gt;&lt;img src="http://mauveweb.co.uk/wp-content/uploads/2007/07/champagne.png" alt="Champagne Bottle"&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><guid>http://mauveweb.co.uk/posts/2007/07/champagne.html</guid><pubDate>Tue, 03 Jul 2007 22:11:49 GMT</pubDate></item><item><title>Fruit and Veg</title><link>http://mauveweb.co.uk/posts/2006/11/fruit-and-veg.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Was playing around with Inkscape last night and ended up doodling some clip art of some fruit and veg.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Fruit and Veg" id="image42" src="http://mauveweb.co.uk/wp-content/uploads/2006/11/clipart.png"&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><category>SVG</category><guid>http://mauveweb.co.uk/posts/2006/11/fruit-and-veg.html</guid><pubDate>Tue, 21 Nov 2006 15:39:21 GMT</pubDate></item><item><title>New Theme Ideas</title><link>http://mauveweb.co.uk/posts/2006/11/new-theme-ideas.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The other day I doodled some ideas for themes for this blog. Not really based around web design. Just interesting concepts, hopefully.&lt;/p&gt;
&lt;p&gt;&lt;a id="p36" rel="attachment" class="imagelink" title="Chocolate" href="http://mauveweb.co.uk/wp-content/uploads/2006/11/chocolate.png"&gt;
&lt;img width="150" height="104" id="image36" alt="Chocolate" src="http://mauveweb.co.uk/wp-content/uploads/2006/11/chocolate.png"&gt;
&lt;/a&gt;
 &lt;a id="p37" rel="attachment" class="imagelink" title="Tentacles" href="http://mauveweb.co.uk/wp-content/uploads/2006/11/tentacles.png"&gt;
&lt;img width="132" height="188" id="image37" alt="Tentacles" src="http://mauveweb.co.uk/wp-content/uploads/2006/11/tentacles.png"&gt;
&lt;/a&gt;
 &lt;a id="p38" rel="attachment" class="imagelink" title="Chocohellic" href="http://mauveweb.co.uk/wp-content/uploads/2006/11/tentacle_chocolate.png"&gt;
&lt;img width="132" height="188" id="image38" alt="Chocohellic" src="http://mauveweb.co.uk/wp-content/uploads/2006/11/tentacle_chocolate.png"&gt;
&lt;/a&gt;
&lt;/p&gt;

&lt;/div&gt;</description><category>Artwork</category><category>Blogging</category><category>Web Design</category><guid>http://mauveweb.co.uk/posts/2006/11/new-theme-ideas.html</guid><pubDate>Mon, 13 Nov 2006 22:28:02 GMT</pubDate></item><item><title>Construction in Inkscape</title><link>http://mauveweb.co.uk/posts/2006/09/construction-in-inkscape.html</link><dc:creator>Daniel Pope</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Sometimes - increasingly perhaps - I find myself using Inkscape for constructing program assets.&lt;/p&gt;
&lt;p&gt;Program assets are a different beast to standalone artworks because you start to have to recombine artistic elements in new ways programmatically.&lt;/p&gt;
&lt;p&gt;Most of the time, when web programming, you don't really need to generate completely original artwork on the fly, but you often need to composite some selection of pre-drawn assets. There are a variety of ways to do this, but Inkscape doesn't seem to make any of them very easy for me.&lt;/p&gt;
&lt;!--more--&gt;

&lt;p&gt;&lt;strong&gt;Composition of minimal PNGs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Export PNGs from Inkscape and composite them elsewhere, using external data or hard-coding to get them all to composite in the right place. This involves working out offsets, either by trial and error or trying to read them off the rulers in Inkscape. But, madly, the rulers and coordinates in Inkscape &lt;a href="http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1560175&amp;amp;group_id=93438&amp;amp;atid=604306"&gt;have the &lt;em&gt;y&lt;/em&gt;-axis inverted&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You also have to build the document in Inkscape so that the various elements can be exported with the alpha channel - independently of shapes above and below the one you're trying to export. This means everything has to either be cloned off the page, or drawn on a seperate layer so that it can be independently hidden.&lt;/p&gt;
&lt;p&gt;If you're actually attempting to composite PNGs client-side in IE, you need to use the PNG alpha hack, which isn't universally applicable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Composition of padded PNGs&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Export PNGs that are padded such that they can all be composited using one origin. This can be done in Inkscape, but it still isn't easy, because Inkscape only has the option to export the selection. The trick is to create completely transparent bounding rectangles and use these to store Inkscape's export settings. The resulting graphics are larger in filesize than they might otherwise be, and composition could also be slower.&lt;/p&gt;
&lt;p&gt;This &lt;a href="http://www.mauveweb.co.uk/clock/"&gt;DHTML clock&lt;/a&gt; I wrote a while back mainly uses this method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Export SVG&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Export SVG and write a program to import, modify/compose and potentially rasterise. Rasterisation is still tricky. It will be really useful when browsers get more widespread support for SVG.&lt;/p&gt;
&lt;p&gt;Still, this method requires painstaking care making sure that all the symbols are easy to recombine. It often means using a lot of svg:use elements (clones in Inkscape lingo), or, more easily, rewriting the xlink:href attribute to repoint the link to a different symbol. Doing it this way preserves the affine transform, but creating your own transforms (for a newly created clone, say) is still tricky.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://blog.mauveweb.co.uk/2006/09/18/svg-cities-with-greasemonkey/"&gt;SVG Cities interface&lt;/a&gt; I mentioned recently uses this method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Draw out all the permutations&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Generate lots and lots of permutations using Inkscape, perhaps using a script to accelerate exporting them. This only works if the number of permutations is small, if it's possible to use only a subset of them, or if they can be generated en masse using Inkscape's excellent &lt;em&gt;Tile Clones&lt;/em&gt; tool.&lt;/p&gt;
&lt;p&gt;This is the approach I'm about to take with this DHTML dice widget I'm working on. First I've drawn out my base dice, then I've cloned one face onto the sides of one die.&lt;/p&gt;
&lt;p&gt;&lt;span class="imagelink"&gt;&lt;img id="image19" alt="Web-based Dice (work in progress)" src="http://mauveweb.co.uk/wp-content/uploads/2006/09/dice_under_development.png"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now I can align the 5 currently unused faces over the 5-side, then modify the links using Inkscape's XML editor:&lt;/p&gt;
&lt;p&gt;&lt;span class="imagelink"&gt;&lt;img id="image20" alt="One complete die" src="http://mauveweb.co.uk/wp-content/uploads/2006/09/dice_under_development2.png"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Some of the problems I've come across in Inkscape when used for this kind of work include:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;ul&gt;
&lt;p&gt;&lt;/p&gt;&lt;/ul&gt;&lt;ol&gt;
    &lt;li&gt;As mentioned, the &lt;em&gt;y&lt;/em&gt; coordinates are all wrong so any coordinates you read off the UI have to be mapped y -&amp;gt; (document height - y)&lt;/li&gt;
    &lt;li&gt;Inkscape doesn't offer any way to make symbols more invariant. Ungrouping and regrouping works, but is time-consuming.&lt;/li&gt;
    &lt;li&gt;There isn't an easy way to manage which clones link where, or re-link clones on mass. In fact the only way to re-link clones is with the rather dire XML editor.&lt;/li&gt;
    &lt;li&gt;Inkscape doesn't let you group 1 primitive, even though this is both valid and useful.&lt;/li&gt;
    &lt;li&gt;Inkscape doesn't let you create offscreen symbols for use with clones.&lt;/li&gt;
    &lt;li&gt;Inkscape doesn't make it easy to set IDs for things.&lt;/li&gt;
    &lt;li&gt;All IDs generated by Inkscape are meaningless alphanumeric strings. Clones, for example, don't inherit any part of their parent symbol's ID.&lt;/li&gt;
    &lt;li&gt;Inkscape has a "label" as well as IDs. Label overrides ID in all of Inkscape's UI, even though they are also meaningless alphanumeric strings, useless in the programming, and they must be set independently of the ID.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><category>Artwork</category><category>SVG</category><category>Web Design</category><guid>http://mauveweb.co.uk/posts/2006/09/construction-in-inkscape.html</guid><pubDate>Mon, 25 Sep 2006 23:51:25 GMT</pubDate></item></channel></rss>