<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>From Accessibility to Zope &#187; Artwork</title>
	<atom:link href="http://blog.mauveweb.co.uk/category/artwork/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mauveweb.co.uk</link>
	<description>experiments in contemporary web development</description>
	<lastBuildDate>Thu, 18 Aug 2011 23:26:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bubble Background Animation</title>
		<link>http://blog.mauveweb.co.uk/2008/10/11/bubble-background-animation/</link>
		<comments>http://blog.mauveweb.co.uk/2008/10/11/bubble-background-animation/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 14:44:31 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=182</guid>
		<description><![CDATA[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 judge for yourself whether this is successful or not (SVG-enabled [...]]]></description>
			<content:encoded><![CDATA[<p>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 <acronym title="Scalable Vector Graphics">SVG</acronym> animation into the background of a page. You might like to <a href="http://mauveweb.co.uk/bubbles/">judge for yourself</a> whether this is successful or not (<acronym title="Scalable Vector Graphics">SVG</acronym>-enabled browser required and a reasonably fast CPU recommended).</p>
<p>If you were around at the dawn of dynamic <acronym title="HyperText Markup Language">HTML</acronym> 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.</p>
<p>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 <a href="http://www.dynamicdrive.com/dynamicindex3/bubble.htm">this</a> (Warning: Not safe for work or indeed any other time you require functioning eyeballs).</p>
<p>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.</p>
<p><acronym title="Scalable Vector Graphics">SVG</acronym> is useful for this kind of effect because it has a feature (&lt;svg:use&gt;) for manipulating independent clones of a symbol. It is therefore simple to draw the original shape using an <acronym title="Scalable Vector Graphics">SVG</acronym> editor, and the Javascript merely needs to manage instances of the clones.</p>
<p>Using Inkscape, I drew up a bubble looks like this:</p>
<div style="background-color: #2771a1; padding: 5px; text-align: center;"><img src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/10/bubble.png" alt="Bubble" /></div>
<p>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.</p>
<p>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 <a href="http://en.wikipedia.org/wiki/Fresnel_equations">Fresnel's Equations</a>. 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 &#8211; 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.</p>
<p>As an aside, one day it may be possibly to depict fully reflective and refractive bubbles. Using <acronym title="Scalable Vector Graphics">SVG</acronym>'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.</p>
<p>The bubble system (really just <a href="http://mauveweb.co.uk/bubbles/bubbles.svg">the <acronym title="Scalable Vector Graphics">SVG</acronym> on its own</a>) 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.</p>
<p>I am quite pleased with the results. To really rid ourselves of the legacy of Javascript-animated <acronym title="Graphics Interchange Format">GIF</acronym> images, it would be important for this effect to tie in with the graphic design of the page, which I haven't shown.</p>
<p>I don't think this is realistically ready for production websites: Internet Explorer cannot display <acronym title="Scalable Vector Graphics">SVG</acronym>, for one thing, and the intensive CPU requirement is also a problem. But I do think that sharp <acronym title="Scalable Vector Graphics">SVG</acronym> 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.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/10/11/bubble-background-animation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SVG Goo</title>
		<link>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/</link>
		<comments>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 15:20:04 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=155</guid>
		<description><![CDATA[It's a well known computer graphics technique that blobby shapes can be drawn as the isosurface of a scalar field.
It's actually possible to create a similar effect using SVG filters:

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 [...]]]></description>
			<content:encoded><![CDATA[<p>It's a well known computer graphics technique that blobby shapes can be drawn as the isosurface of a scalar field.</p>
<p>It's actually possible to create a similar effect using <acronym title="Scalable Vector Graphics">SVG</acronym> filters:</p>
<p><img class="size-full wp-image-159" title="goo" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/08/goo.png" alt="Blobby, ketchuppy shapes" width="500" height="495" /></p>
<p>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.</p>
<p>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.</p>
<p>If you have a copy of Inkscape, it's fun to play with dragging the circles. Feel free to <a href="http://blog.mauveweb.co.uk/wp-content/uploads/2008/08/goo.svg">download the <acronym title="Scalable Vector Graphics">SVG</acronym></a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/08/31/svg-goo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVG filters with Inkscape 0.46</title>
		<link>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/</link>
		<comments>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 11:40:01 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/?p=138</guid>
		<description><![CDATA[One of the most stunningly powerful features of the recently release Inkscape 0.46 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.
What this entails is that it's possibly to take very simple [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most stunningly powerful features of the recently release <a href="http://www.inkscape.org/">Inkscape 0.46</a> is the ability to design <acronym title="Scalable Vector Graphics">SVG</acronym> filters. <acronym title="Scalable Vector Graphics">SVG</acronym> filters are a section of the <acronym title="Scalable Vector Graphics">SVG</acronym> language for connecting simple, well-defined raster operations and applying those to rasterised vector shapes in the document.</p>
<p>What this entails is that it's possibly to take very simple vector shapes, bung on a filter, and get some very pretty artwork <strong>which can still be edited as paths.</strong></p>
<p>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.</p>
<p>Unfortunately, you will need a fairly deep knowledge of 2D image processing to make use of <acronym title="Scalable Vector Graphics">SVG</acronym> filters. Fortunately I have one of these. Allow me to walk you through creating a filter in Inkscape 0.46.</p>
<p>I want to start with an example of a graphic I created way way back with Inkscape 0.38.</p>
<p><img class="alignnone size-full wp-image-136" title="original" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/original.png" alt="Original Mauveweb logo" width="450" height="113" /></p>
<p>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.</p>
<p>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.</p>
<p><img class="alignnone size-full wp-image-140" title="plain" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/plain.png" alt="" width="450" height="133" /></p>
<p>To add lighting, you need a height map. The simplest way to create a height map is by applying a <strong>gaussian blur</strong>. <acronym title="Scalable Vector Graphics">SVG</acronym> 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 &#8211; 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.</p>
<p><img class="alignnone size-full wp-image-142" title="blur" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/blur.png" alt="" width="450" height="158" /></p>
<p>You can only see a 3D shape appear when we wire up a lighting filter. <strong>Specular lighting</strong> 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.</p>
<p><img class="alignnone size-full wp-image-143" title="specular_on_black" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/specular_on_black.png" alt="" width="450" height="149" /></p>
<p>Specular lighting is very sensitive to some of the settings you're using.</p>
<ul>
<li><strong>Surface scale</strong> &#8211; 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.</li>
<li><strong>Constant</strong> &#8211; 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.</li>
<li><strong>Exponent</strong> &#8211; this is the glossiness of the surface. The higher the exponent, the tighter the highlights. Metals have quite low exponents &#8211; say 10. 30ish gives a soft plastic. Higher gives the effect of ceramics and polished surfaces.</li>
<li><strong>Light Source</strong> &#8211; 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.</li>
</ul>
<p>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 <strong>atop</strong> filter. The top input is the highlights, the bottom is the source graphic. <strong>Atop</strong> draws the highlights only over the source graphic. This is equivalent to (specular <strong>in</strong> source alpha) <strong>over</strong> source grahic.</p>
<p><img class="alignnone size-full wp-image-141" title="specular" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/specular.png" alt="" width="450" height="133" /></p>
<p>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 <strong>morphology</strong> filter.</p>
<p>We dilate the source alpha channel and <strong>composite</strong> the original over the top. Voila:</p>
<p><img class="alignnone size-full wp-image-145" title="morphology" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/morphology.png" alt="" width="450" height="137" /></p>
<p>And then there's a slight drop shadow. <strong>Gaussian blur</strong> the same <strong>morphology</strong> filter, add a couple of pixels of <strong>offset</strong>. Then <strong>composite</strong> the previous stage back on top of it.</p>
<p><img class="alignnone size-full wp-image-146" title="shadow" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/shadow.png" alt="" width="450" height="139" /></p>
<p>If the shadow &#8211; or indeed the highlights are too bright, you can make them slightly transparent with a <strong>colour matrix</strong> 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.</p>
<p>I've got one last trick up my sleeve, and it's the most complicated one.</p>
<p>I'm going to decrease the exponent on the specular filter a little to give me bigger highlights. Then I want to <em>increase the contrast on the alpha channel.</em> This can be done with a <strong>colour matrix</strong> filter. I set the last row to (0, 0, 0, 4.0, -1.5). This means that the alpha channel will be mapped a -&gt; 4a &#8211; 1.5. This will to some extent remove the partial shades in the specular highlight and give me a more cartoon effect:</p>
<p><img class="alignnone size-full wp-image-148" title="final" src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/04/final.png" alt="" width="450" height="139" /></p>
<p>This is how the final filter is wired:</p>
<p><a rel="attachment wp-att-149" href="http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/filter_wiring/"><img class="alignnone size-medium wp-image-149" title="filter_wiring" src="http://blog.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" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/04/19/svg-filters-with-inkscape-046/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inkscape 0.46 preview</title>
		<link>http://blog.mauveweb.co.uk/2008/01/13/inkscape-046-preview/</link>
		<comments>http://blog.mauveweb.co.uk/2008/01/13/inkscape-046-preview/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 17:02:23 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2008/01/13/inkscape-046-preview/</guid>
		<description><![CDATA[Inkscape 0.46 is drawing close. There's a whole wealth of new features, 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 [...]]]></description>
			<content:encoded><![CDATA[<p>Inkscape 0.46 is drawing close. There's a whole <a href="http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046">wealth of new features</a>, some of which are incredibly exciting. I've not been using the <acronym title="Subversion">SVN</acronym> 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.</p>
<p>To whet your appetite, here's a two-minute doodle demonstrating a turbulent displacement filter.</p>
<p><img src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/01/watery.png" alt="Watery Doodle" /></p>
<p><strong>Update</strong>: here's a more realistic style using a specular lighting filter.</p>
<p><img src="http://blog.mauveweb.co.uk/wp-content/uploads/2008/01/watery2.png" alt="Watery Doodle 2" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2008/01/13/inkscape-046-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Champagne</title>
		<link>http://blog.mauveweb.co.uk/2007/07/03/champagne/</link>
		<comments>http://blog.mauveweb.co.uk/2007/07/03/champagne/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 22:11:49 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2007/07/03/champagne/</guid>
		<description><![CDATA[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.
This is how I responded:
]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>This is how I responded:</p>
<p style="text-align: center"><img src="http://blog.mauveweb.co.uk/wp-content/uploads/2007/07/champagne.png" alt="Champagne Bottle" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2007/07/03/champagne/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Big World Travelog</title>
		<link>http://blog.mauveweb.co.uk/2007/01/03/big-world-travelog/</link>
		<comments>http://blog.mauveweb.co.uk/2007/01/03/big-world-travelog/#comments</comments>
		<pubDate>Wed, 03 Jan 2007 10:58:06 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2007/01/03/big-world-travelog/</guid>
		<description><![CDATA[I finished updated my brother's blog over New Year, and I'm now quite happy with it. I spent ages on a graphical title block in Inkscape. I'm not totally satisfied with the caricatures who are a little more cartoony than I would have liked. The new theme is based on K2, which I do think [...]]]></description>
			<content:encoded><![CDATA[<p>I finished updated <a href="http://worldtour.echit.co.uk/">my brother's blog</a> over New Year, and I'm now quite happy with it. I spent ages on a graphical title block in Inkscape. I'm not totally satisfied with the caricatures who are a little more cartoony than I would have liked. The new theme is based on K2, which I do think is pretty.</p>
<p>I had a strange bug with the Google Maps on the gallery which I found after a bit of searching was caused by Google Maps not supporting embedding within <acronym title="eXtensible HyperText Markup Language">XHTML</acronym>. But I'm pleased that the thumbnailing/unthumbnailing works so well. Previously the map enlarged and reduced; this is much less intrusive in either state.</p>
<p>I did have to disable all of K2's shiny Javascript features to make it work with my Javascript (for map markers) <img src='http://blog.mauveweb.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  But they were a <acronym title="User Interface">UI</acronym> disaster anyway. One of the advantages to <acronym title="JavaScript">JS</acronym> over Flash is that it allows us not to create horrific new <acronym title="User Interface">UI</acronym> paradigms. So going to great lengths to do so is missing the point.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2007/01/03/big-world-travelog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fruit and Veg</title>
		<link>http://blog.mauveweb.co.uk/2006/11/21/fruit-and-veg/</link>
		<comments>http://blog.mauveweb.co.uk/2006/11/21/fruit-and-veg/#comments</comments>
		<pubDate>Tue, 21 Nov 2006 15:39:21 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2006/11/21/fruit-and-veg/</guid>
		<description><![CDATA[Was playing around with Inkscape last night and ended up doodling some clip art of some fruit and veg.
Enjoy!
]]></description>
			<content:encoded><![CDATA[<p>Was playing around with Inkscape last night and ended up doodling some clip art of some fruit and veg.</p>
<p>Enjoy!</p>
<p><img alt="Fruit and Veg" id="image42" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/11/clipart.png" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2006/11/21/fruit-and-veg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Theme Ideas</title>
		<link>http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/</link>
		<comments>http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/#comments</comments>
		<pubDate>Mon, 13 Nov 2006 22:28:02 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/</guid>
		<description><![CDATA[The other day I doodled some ideas for themes for this blog. Not really based around web design. Just interesting concepts, hopefully.
  ]]></description>
			<content:encoded><![CDATA[<p>The other day I doodled some ideas for themes for this blog. Not really based around web design. Just interesting concepts, hopefully.</p>
<p><a id="p36" rel="attachment" class="imagelink" title="Chocolate" href="http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/chocolate/"><img width="150" height="104" id="image36" alt="Chocolate" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/11/chocolate.png" /></a> <a id="p37" rel="attachment" class="imagelink" title="Tentacles" href="http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/tentacles/"><img width="132" height="188" id="image37" alt="Tentacles" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/11/tentacles.png" /></a> <a id="p38" rel="attachment" class="imagelink" title="Chocohellic" href="http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/chocohellic/"><img width="132" height="188" id="image38" alt="Chocohellic" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/11/tentacle_chocolate.png" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2006/11/13/new-theme-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Construction in Inkscape</title>
		<link>http://blog.mauveweb.co.uk/2006/09/25/construction-in-inkscape/</link>
		<comments>http://blog.mauveweb.co.uk/2006/09/25/construction-in-inkscape/#comments</comments>
		<pubDate>Mon, 25 Sep 2006 22:51:25 +0000</pubDate>
		<dc:creator>mauve</dc:creator>
				<category><![CDATA[Artwork]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://blog.mauveweb.co.uk/2006/09/25/construction-in-inkscape/</guid>
		<description><![CDATA[Sometimes &#8211; increasingly perhaps &#8211; I find myself using Inkscape for constructing program assets.
Program assets are a different beast to standalone artworks because you start to have to recombine artistic elements in new ways programmatically.
Most of the time, when web programming, you don't really need to generate completely original artwork on the fly, but you [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes &#8211; increasingly perhaps &#8211; I find myself using Inkscape for constructing program assets.</p>
<p>Program assets are a different beast to standalone artworks because you start to have to recombine artistic elements in new ways programmatically.</p>
<p>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.</p>
<p><span id="more-17"></span><strong>Composition of minimal <acronym title="Portable Network Graphics">PNGs</acronym><br />
</strong></p>
<p>Export <acronym title="Portable Network Graphics">PNGs</acronym> 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 <a href="http://sourceforge.net/tracker/index.php?func=detail&#038;aid=1560175&#038;group_id=93438&#038;atid=604306">have the <em>y</em>-axis inverted</a>.</p>
<p>You also have to build the document in Inkscape so that the various elements can be exported with the alpha channel &#8211; 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.</p>
<p>If you're actually attempting to composite <acronym title="Portable Network Graphics">PNGs</acronym> client-side in <acronym title="Internet Explorer">IE</acronym>, you need to use the <acronym title="Portable Network Graphics">PNG</acronym> alpha hack, which isn't universally applicable.</p>
<p><strong>Composition of padded <acronym title="Portable Network Graphics">PNGs</acronym><br />
</strong></p>
<p>Export <acronym title="Portable Network Graphics">PNGs</acronym> 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.</p>
<p>This <a href="http://www.mauveweb.co.uk/clock/"><acronym title="Dynamic HyperText Markup Language">DHTML</acronym> clock</a> I wrote a while back mainly uses this method.</p>
<p><strong>Export <acronym title="Scalable Vector Graphics">SVG</acronym></strong></p>
<p>Export <acronym title="Scalable Vector Graphics">SVG</acronym> 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 <acronym title="Scalable Vector Graphics">SVG</acronym>.</p>
<p>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.</p>
<p>The <a href="http://blog.mauveweb.co.uk/2006/09/18/svg-cities-with-greasemonkey/"><acronym title="Scalable Vector Graphics">SVG</acronym> Cities interface</a> I mentioned recently uses this method.</p>
<p><strong>Draw out all the permutations</strong></p>
<p>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 <em>Tile Clones</em> tool.</p>
<p>This is the approach I'm about to take with this <acronym title="Dynamic HyperText Markup Language">DHTML</acronym> 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.<br />
<span class="imagelink"><img id="image19" alt="Web-based Dice (work in progress)" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/09/dice_under_development.png" /></span></p>
<p>Now I can align the 5 currently unused faces over the 5-side, then modify the links using Inkscape's <acronym title="eXtensible Markup Language">XML</acronym> editor:<br />
<span class="imagelink"><img id="image20" alt="One complete die" src="http://blog.mauveweb.co.uk/wp-content/uploads/2006/09/dice_under_development2.png" /></span></p>
<p>Some of the problems I've come across in Inkscape when used for this kind of work include:</p>
<ul>
<ol>
<li>As mentioned, the <em>y</em> coordinates are all wrong so any coordinates you read off the UI have to be mapped y -> (document height &#8211; y)</li>
<li>Inkscape doesn't offer any way to make symbols more invariant. Ungrouping and regrouping works, but is time-consuming.</li>
<li>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 <acronym title="eXtensible Markup Language">XML</acronym> editor.</li>
<li>Inkscape doesn't let you group 1 primitive, even though this is both valid and useful.</li>
<li>Inkscape doesn't let you create offscreen symbols for use with clones.</li>
<li>Inkscape doesn't make it easy to set IDs for things.</li>
<li>All IDs generated by Inkscape are meaningless alphanumeric strings. Clones, for example, don't inherit any part of their parent symbol's ID.</li>
<li>Inkscape has a "label" as well as IDs. Label overrides ID in all of Inkscape's <acronym title="User Interface">UI</acronym>, even though they are also meaningless alphanumeric strings, useless in the programming, and they must be set independently of the ID.</li>
</ol>
<ul /></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.mauveweb.co.uk/2006/09/25/construction-in-inkscape/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

