<?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>PeHaa Blog &#187; tutorial</title>
	<atom:link href="http://pehaa.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://pehaa.com</link>
	<description>mad about art and digital</description>
	<lastBuildDate>Wed, 18 Apr 2012 11:58:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Create your portfolio gallery using html5 canvas &#8211; tutorial</title>
		<link>http://pehaa.com/2012/02/create-your-portfolio-gallery-using-html5-canvas-tutorial/</link>
		<comments>http://pehaa.com/2012/02/create-your-portfolio-gallery-using-html5-canvas-tutorial/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 20:04:22 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=2604</guid>
		<description><![CDATA[In this tutorial we will build a photo gallery and enhance it with html5 canvas and css3 transitions. See the demo and try the hover effect. The grayscale "copies" of our images are created with canvas and we use pure css3 for the smooth change. 
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><a class="twitter-share-button" href="http://twitter.com/share" data-count="horizontal" data-via="PeHaa">Tweet</a></p>
<p><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></p>
<p>In this tutorial we will build a photo gallery and enhance it with html5 canvas and css3 transitions. See <a href="http://pehaa.com/wp-content/uploads/2012/02/tut_pinkonhead/index.html">the demo</a> and try the hover effect. The grayscale &#8220;copies&#8221; of the images are created with canvas and we use pure css3 for the smooth changes. </p>
<p><a href="http://pehaa.com/wp-content/uploads/2012/02/tut_pinkonhead/index.html" target="_blank"><img src="http://pehaa.com/wp-content/uploads/2012/02/preview1.jpg" alt="Photo gallery with html5 canvas" /></a></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2012/02/tut_gallery.zip">Download  the source files</a></h3>
<p>Portfolio gallery with canvas<br />
<small>.zip 0.25MB</small></p>
</div>
<h2>Step 1 : Html markup</h2>
<p>Let&#8217;s start with a simple markup, each portfolio entry being an element of an unordered list.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta charset=&quot;UTF-8&quot; /&gt;
	&lt;title&gt;Gallery :: Tutorial by PeHaa &lt;/title&gt;
	&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;wrap&quot;&gt;
		&lt;h1&gt;Gallery&lt;/h1&gt;
		&lt;ul id=&quot;gallery&quot;&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/flo1.jpg&quot;&gt;&lt;div&gt;Spring flowers 1&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/lights2.jpg&quot;&gt;&lt;div&gt;City lights 1&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/flo3.jpg&quot;&gt;&lt;div&gt;Spring flowers 2&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/lights1.jpg&quot;&gt;&lt;div&gt;City lights 2&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/flo2.jpg&quot;&gt;&lt;div&gt;Spring flowers 3&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;img src=&quot;images/lights3.jpg&quot;&gt;&lt;div&gt;City lights 3&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;p&gt;Photos by &lt;a href=&quot;http://pinkonhead.com&quot;&gt;Pinkonhead&lt;/a&gt;&lt;/p&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2>Step 2: Basic styles</h2>
<p>We start our stylesheet with a basic reset.</p>
<pre class="brush: css; title: ; notranslate">
html, body, div, span, h1, h2,  p, a,  ul, li, img
{margin: 0; padding: 0;
border: 0; outline: 0;
font-size: 100%;background: transparent;}
ul {list-style: none;}
:focus {outline: 0;}
a {text-decoration:none;}
</pre>
<p>We will use 300px x 300px images. The main containing element <code>#wrap</code> is centered up (margin: 0 auto) and given the  width of  1020px (=340 x 3).<br />
The list items are given float : left and are positioned relatively. The image title is wrapped in a div element that slides up on hover. To achieve a smooth effect we apply a css3 transition.<br />
(Note that for the simplicity of this tutorial I don&#8217;t use any vendor prefixes. Therefore, you&#8217;ll find them in the source file to download).</p>
<pre class="brush: css; title: ; notranslate">
#wrap {
  width: 1020px;
  margin: 0 auto;
}
li {
  float:left;
  position:relative;
  display:inline-block;
  width:300px;
  height:300px;
  margin:10px;
  padding:10px;
  background:#fff;
  box-shadow:0 0 5px rgba(0,0,0,.35);
}
li div {
  position:absolute;
  height:0;
  width:280px;
  background:rgba(0,0,0,.45);
  overflow:hidden;
  bottom:10px;
  left:10px;
  padding: 0 10px;
  line-height:50px;
  color:#fff;
  transition:height 1s;
}
li:hover div {
  height:50px;
}
</pre>
<p>Click on the image to below to see the result at the current stage.</p>
<p><a href="http://pehaa.com/wp-content/uploads/2012/02/tut_pinkonhead/index0.html" target="_blank"><img src="http://pehaa.com/wp-content/uploads/2012/02/preview2.jpg" alt="Photo gallery with canvas" /></a></p>
<h2>Step 3: Canvas</a></h2>
<p>Now, we will make use of the html5 <a href="https://developer.mozilla.org/en/Canvas_tutorial" target="_blank">canvas</a> element to draw the grayscale versions of our images. Below you&#8217;ll find a <code>createCanvas</code> custom function that creates a canvas element, takes a copy of an image, performs the conversion and draws it to the canvas and finally inserts the canvas to the DOM where desired.  With <code>.each()</code> method the <code>createCanvas</code> function is iterated across all images within the <code>#gallery</code> list.</p>
<pre class="brush: jscript; title: ; notranslate">
$(window).load(function() {

	  $('#gallery img').each(function() {

	    createCanvas(this);
	  });

	  function createCanvas(image) {

	    var canvas = document.createElement('canvas');
	    if (canvas.getContext) {
	      var ctx = canvas.getContext(&quot;2d&quot;);

// specify canvas size
	      canvas.width = image.width;
	      canvas.height = image.height;

// Once we have a reference to the source image object we can use
// the drawImage(reference, x, y) method to render it to the canvas.
//x, y are the coordinates on the target canvas where the image should be placed.
	      ctx.drawImage(image, 0, 0);

// Taking the image data and storing it in the imageData array.
//You can read the pixel data on a canvas using the getImageData() method.
// Image data includes the colour of the pixel (decimal, rgb values) and alpha value.
// Each color component is represented by an integer between 0 and 255.
//imageData.data contains height x width x 4 bytes of data, with index values ranging from 0 to (height x width x 4)-1.
	      var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height),
	          pixelData = imageData.data;

// Loop through all the pixels in the imageData array, and modify
// the red, green, and blue color values.
	      for (var y = 0; y &lt; canvas.height; y++) {
	        for (var x = 0; x &lt; canvas.width; x++) {

// You can access the color values of the (x,y) pixel as follows :
	          var i = (y * 4 * canvas.width) + (x * 4);

// Get the RGB values.
	          var red = pixelData[i];
	          var green = pixelData[i + 1];
	          var blue = pixelData[i + 2];

// Convert to grayscale. One of the formulas of conversion (e.g. you could try a simple average (red+green+blue)/3)
	          var grayScale = (red * 0.3) + (green * 0.59) + (blue * .11);

	          pixelData[i] = grayScale;
	          pixelData[i + 1] = grayScale;
	          pixelData[i + 2] = grayScale;
	        }
	      }

// Putting the modified imageData back on the canvas.
	      ctx.putImageData(imageData, 0, 0, 0, 0, imageData.width, imageData.height);

// Inserting the canvas in the DOM, before the image:
	      image.parentNode.insertBefore(canvas, image);
	    }
	  }
	});
</pre>
<h2>Step 4: Styling the canvas </a></h2>
<p>If you look into the generated code source you&#8217;ll find </p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;gallery&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;canvas width=&quot;300&quot; height=&quot;300&quot;&gt;&lt;/canvas&gt;&lt;img src=&quot;images/flo1.jpg&quot;&gt;&lt;div&gt;Spring flowers 1&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;canvas width=&quot;300&quot; height=&quot;300&quot;&gt;&lt;/canvas&gt;&lt;img src=&quot;images/lights2.jpg&quot;&gt;&lt;div&gt;City lights 1&lt;/div&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
	...
&lt;/ul&gt;
</pre>
<p>Let&#8217;s add some styling to define the <code>canvas</code> behavior in normal and hover state:</p>
<pre class="brush: css; title: ; notranslate">
canvas {
  opacity:1;
  position:absolute;
  top:10px;
  left:10px;
  transition:opacity 1s .2s;
}
li:hover canvas {
  opacity:0;
}
</pre>
<p>And that&#8217;s it ! This example will not work in Internet Explorer versions below 9. You could provide an alternative solution using grayscale filter and adding some jQuery to recreate the transition effect on hover &#8211; but this part is not covered in this tutorial. </p>
<p>The beautiful photos featured here were taken by <a href="http://pinkonhead.com">Pinkonhead</a>, and are shared as <a href="http://pinkonhead.com/category/freebies/photos/" target="_blank">freebies on her blog</a>. Enjoy.</p>
<div class="shr-publisher-2604"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2012%2F02%2Fcreate-your-portfolio-gallery-using-html5-canvas-tutorial%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2012%2F02%2Fcreate-your-portfolio-gallery-using-html5-canvas-tutorial%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2012/02/create-your-portfolio-gallery-using-html5-canvas-tutorial/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a fancy responsive image-on-hover effect</title>
		<link>http://pehaa.com/2012/02/create-a-fancy-responsive-image-on-hover-effect/</link>
		<comments>http://pehaa.com/2012/02/create-a-fancy-responsive-image-on-hover-effect/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 20:37:26 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[responsive]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=2511</guid>
		<description><![CDATA[In this tutorial we will create a fancy image on hover effect. We'll use pure css3 and provide a jQuery solution for the browsers that do not support opacity and transitions. We will also take care that it works responsively. ]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><a class="twitter-share-button" href="http://twitter.com/share" data-count="horizontal" data-via="PeHaa">Tweet</a></p>
<p><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></p>
<p>In this tutorial we will create a fancy image-on-hover effect. We&#8217;ll use pure css3 and provide a jQuery solution for the browsers that do not support opacity and transitions. We will also take care that it works responsively.</p>
<p><a href="http://pehaa.com/wp-content/uploads/2012/02/tutorial/image3.html" target="_blank"><img src="http://pehaa.com/wp-content/uploads/2012/02/preview.jpg" alt="Two version of an image" /></a></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2012/02/image.zip">Download  the source files</a></h3>
<p>Fancy responsive image-on-hover effect<br />
<small>.zip 0.2MB</small></p>
</div>
<h2>Step 1 : Photoshop</h2>
<p>We have to prepare two versions of the image : the image we want to see on hover and its desaturated copy. Mine are 845px x 515px.</p>
<p><img src="http://pehaa.com/wp-content/uploads/2012/02/tut_images.jpg" alt="Two version of an image" /></p>
<h2>Step 2 : Let&#8217;s start with the html markup</h2>
<pre class="brush: xml; title: ; notranslate">
..
&lt;div id=&quot;wrap&quot;&gt;
&lt;ul&gt;
   &lt;li&gt;
      &lt;div&gt;
          &lt;img src=&quot;img/tut1_desaturated.jpg&quot;/&gt;
          &lt;span class=&quot;shadow&quot;&gt;&lt;/span&gt;
          &lt;img class=&quot;onhover&quot; src=&quot;img/tut1_color.jpg&quot;/&gt;
      &lt;/div&gt;
   &lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<h2>Step 3: Basic styles</h2>
<p>We start our stylesheet with a basic reset.</p>
<pre class="brush: css; title: ; notranslate">
html, body, div, span, h1, h2,  p, a,  ul, li, img
{margin: 0; padding: 0;
border: 0; outline: 0;
font-size: 100%;background: transparent;}
ul {list-style: none;}
</pre>
<p>The main containing element <code>#wrap</code> is centered up and given the specific width 865 px = 845px (image size) + 2x10px (borders size).<br />
The div that contains the images is given position:relative (to properly position the two versions of the image) and overflow hidden (we will size up and rotate our images and we want to hide the exceeding parts).</p>
<pre class="brush: css; title: ; notranslate">
#wrap { width: 865px; margin: 0 auto;}
ul {margin-top:50px; }
li div {width:845px; height:515px; overflow:hidden; position:relative;
border:10px solid white; box-shadow: 0 2px 5px  rgba(0,0,0,.4);}
</pre>
<h2>Step 4: Grayscale to color transition <a href="http://pehaa.com/wp-content/uploads/2012/02/tutorial/image1.html" target="_blank">(see demo)</a></h2>
<p>The img element is positioned relatively, the colored version (<code>.onhover</code>) is given 0 opacity and absolute position. When the containing div is being hovered over the opacity of <code>.onhover</code> element changes to 1. To make the transition smooth we apply the transition property to <code>img</code>. (For simplicity I decided to omit all vendor prefixes).</p>
<pre class="brush: css; title: ; notranslate">
img {position:relative; top:0;left:0;
transition:all 1.5s .5s; }
img.onhover {opacity:0;position:absolute;}
li div:hover img.onhover {opacity:1;}
</pre>
<p>To deepen the effect of transition between the normal and hover state we will add a fading out inner shadow (<code>span.shadow</code>):</p>
<pre class="brush: css; title: ; notranslate">
.shadow {position:absolute; top:0; left:0; opacity:1; background:transparent;
width:100%; height:100%;
box-shadow: inset 0 0 60px 20px rgba(37,27,23,.5);
transition:opacity 1.5s .5s;}
li div:hover .shadow {opacity:0;}
</pre>
<h2>Step 5: Let&#8217;s add scaling and rotation <a href="http://pehaa.com/wp-content/uploads/2012/02/tutorial/image2.html" target="_blank">(see demo)</a></h2>
<p>We just have to add the transform property, specify the transform origin as well as the transform parameters in hover state.</p>
<pre class="brush: css; title: ; notranslate">
img {position:relative; top:0;left:0;
transition:all 1.5s .5s;
transform: rotate(-4deg) scale(1.2);
transform-origin:50% 50%;}

li div:hover img {transform: scale(1) rotate(0);}
</pre>
<h2>Step 6: And what if we want it responsive ? <a href="http://pehaa.com/wp-content/uploads/2012/02/tutorial/image3.html" target="_blank">(see demo)</a></h2>
<p>First let&#8217;s modify a little bit the style of <code>#wrap</code> and the <code>li div</code> to keep them flexible. In the latter case we just no longer specify the height and width of the element.</p>
<pre class="brush: css; title: ; notranslate">
#wrap { max-width: 865px; margin: 0 auto; width:95%;}
li div { overflow:hidden; position:relative;
border:10px solid white; box-shadow: 0 2px 5px rgba(0,0,0,.4);}
</pre>
<p>We have also to modify the styling of the img element &#8211; we add three new properties to the img element. </p>
<pre class="brush: css; title: ; notranslate">
img {max-width:auto; vertical-align:bottom; width:100%;}
</pre>
<h2>Step 7: jQuery solution</h2>
<p>We will add a jQuery solutions for IE. </p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!--[if lt IE 9]&gt;&lt;script&gt;
&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
	$(document).ready(function() {
           $('.onhover').hide();
$('li div').hover(function(){
$(this).find('.onhover').fadeIn(1000);
},function(){
$(this).find('.onhover').fadeOut(1000);
})
})
&lt;/script&gt;&lt;![endif]--&gt;
</pre>
<p>You can also go further and recreate the full transition with jQuery animate function.</p>
<p>And that&#8217;s it. I hope you got inspired by this example &#8211; it&#8217;s your turn to play with css transitions. Enjoy !</p>
<div class="shr-publisher-2511"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2012%2F02%2Fcreate-a-fancy-responsive-image-on-hover-effect%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2012%2F02%2Fcreate-a-fancy-responsive-image-on-hover-effect%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2012/02/create-a-fancy-responsive-image-on-hover-effect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Intriguing animate-on-scroll effect &#8211; jQuery tutorial</title>
		<link>http://pehaa.com/2011/08/intriguing-animate-on-scroll-effect-jquery-tutorial/</link>
		<comments>http://pehaa.com/2011/08/intriguing-animate-on-scroll-effect-jquery-tutorial/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 19:29:42 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Photoshop tip trick]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=2429</guid>
		<description><![CDATA[I suppose that I was not the only one to become speechless in front of the <a href="http://nizoapp.com">Nizo for iPhone</a> website.
In this tutorial we try to recreate the intriguing scrolling effect.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><a class="twitter-share-button" href="http://twitter.com/share" data-count="horizontal" data-via="PeHaa">Tweet</a></p>
<p><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></p>
<p>I suppose that I was not the only one to become speechless in front of the <a href="http://nizoapp.com" target="_blank">Nizo for iPhone</a> website.<br />
In this tutorial we try to recreate the intriguing scrolling effect. We&#8217;ll go for simplicity : 5 objects to animate and linear movement, no easing. The basis that opens the door for further elaboration. </p>
<p>Click here to see <a href="http://pehaa.com/wp-content/uploads/2011/08/myherbgarden/index.html" target="_blank">the demo</a>.<br />
<a href="http://pehaa.com/wp-content/uploads/2011/08/myherbgarden/index.html" target="_blank"><img alt="My herb garden preview"  src="http://pehaa.com/wp-content/uploads/2011/08/previewhg.jpg" title="My herb garden" class="aligncenter" width="600" height="auto" /></a></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2011/08/myherbgarden.zip">Download  the source files</a></h3>
<p>My herb garden<br />
<small>.zip 0.4MB</small></p>
</div>
<p>We&#8217;ll start with the html structure :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;UTF-8&quot; /&gt;
&lt;title&gt;My herb garden&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrap_out&quot;&gt;
  &lt;div id='wrap'&gt;
    &lt;header&gt;
      &lt;h1&gt;My &lt;em&gt;herb&lt;/em&gt; garden&lt;/h1&gt;
      &lt;p&gt;Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum id ligula porta felis euismod semper.&lt;/p&gt;
    &lt;/header&gt;
    &lt;div id=&quot;separation&quot;&gt;
      &lt;div&gt;Scroll &lt;em&gt;down&lt;/em&gt;&lt;/div&gt;
      &lt;img src=&quot;images/herbes.jpg&quot; width=&quot;592&quot; height=&quot;350&quot; alt=&quot;Herbes&quot;&gt; &lt;/div&gt;
    &lt;section&gt;
      &lt;div  id=&quot;coriander&quot; class=&quot;element&quot;&gt;
        &lt;div&gt;coriander&lt;/div&gt;
        &lt;img src=&quot;images/coriander1.jpg&quot; width=&quot;286&quot; height=&quot;232&quot; alt=&quot;Coriander&quot;&gt;
        &lt;p&gt;Cras mattis consectetur purus sit amet fermentum. Cras mattis consectetur purus sit amet fermentum. Cras mattis consectetur purus sit amet fermentum.&lt;/p&gt;
      &lt;/div&gt;
      &lt;div  id=&quot;rosemary&quot; class=&quot;element&quot;&gt;...&lt;/div&gt;
      &lt;div  id=&quot;lemonbalm&quot; class=&quot;element&quot;&gt;...&lt;/div&gt;
      &lt;div  id=&quot;chives&quot; class=&quot;element&quot;&gt;...&lt;/div&gt;
      &lt;div  id=&quot;basil&quot; class=&quot;element&quot;&gt;...&lt;/div&gt;
    &lt;/section&gt;
    &lt;footer&gt; &lt;a href=&quot;http://pehaa.com&quot;&gt; by &lt;em&gt;PeHaa&lt;/em&gt; 2011&lt;/a&gt; &lt;/footer&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The document is composed of 4 elements <code>header</code>, <code>#separation</code>, <code>section</code> and <code>footer</code>, contained within two divs : <code>#wrap_out</code> and <code>#wrap</code>.<br />
The stylesheet begins with a simple css reset and the @font-face declaration</p>
<pre class="brush: css; title: ; notranslate">
body, div, h1, h2, form, fieldset, input, textarea, footer, p, img {
	margin: 0; padding: 0; border: 0; outline: none;
}
a { text-decoration:none; color: #fff;}

 @font-face {
 font-family: 'DeibiRegular';
 src: url('deibi-webfont.eot');
 src: url('deibi-webfont.eot?#iefix') format('embedded-opentype'),  url('deibi-webfont.woff') format('woff'),  url('deibi-webfont.ttf') format('truetype'),  url('deibi-webfont.svg#DeibiRegular') format('svg');
 font-weight: normal;
 font-style: normal;
}
</pre>
<p>Right now, the important point is to set <code>width : 100%</code> and <code>overflow-x: hidden</code> for the <code>#wrap_out</code>. The <code>#wrap</code> element centers the content of the page.<br />
<code>section</code>  is positioned relatively and the animated herbs (<code>class="element"</code>) are positioned absolutely.<br />
Let&#8217;s continue with our stylesheet : </p>
<pre class="brush: css; title: ; notranslate">
body {
	font-family:'DeibiRegular', Helvetica, Arial, sans-serif;
	background:#f2f2f2 url('images/bg.jpg');
	color: #fff; width:100%;
}
#wrap_out {width:100%; overflow-x:hidden;}
#wrap {width: 960px; margin: 0 auto; z-index:1;position:relative;}

header {display:block;z-index:2 position:relative;}
header p {display:block; font-size:30px; padding: 70px 60px 0px;}
h1 {text-align:center;font-size:130px; margin-top: 30px; text-shadow: 0 0 60px #889473;}
h1 em {color: #f5f187;font-style: normal;}

#separation {margin: 0 auto;width: 592px;z-index:-1;position:relative;}

section {position:relative; margin-top: 120px;display:block}

.element { position:absolute; display:block;}
.element#coriander {top:0px; left:30px; width: 286px; height: 272px;}
.element#rosemary {top:40px; left: 335px; width: 370px; height: 183px;}
.element#chives {top : 0px; right:30px; width: 197px; height: 514px;}
.element#lemonbalm {left: 30px; top:280px; width:265px; height: 233px;}
.element#basil {right: 255px; top:250px; width:368px; height: 263px;}

footer {margin-bottom: 10px;text-align:center;font-size: 30px; display:block}
</pre>
<p>The idea is to encourage the visitor to scroll down by positioning the <code>#separation</code> element at the bottom of the page. We want the <code>#separation</code> to stay there when the window is resized but to move up when we start to scroll down. A possible way to do that is to make the height of the  <code>header</code> element dependent on the height of the window browser :</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function () {
    var myHeight;

    function init() {
        myHeight = $(window).height();
        $('header').css('height', myHeight - 300);
    }
    init();
    $(window).resize(function () {
        init();

    });
})
</pre>
<p>To animate the <code>.element</code> we&#8217;ll go simple and use a linear function to move it from its initial position to its target position. We assign four parameters (its initial and final coordinates) to each element :</p>
<pre class="brush: jscript; title: ; notranslate">
$('.element').each(function(i) {
			var myElement =$(this);

				switch (i)
				{ case 0 :
					myElement.data('params', {top0 : -1300, x0 : -2600, top1: $(this).css('top'), x1: $(this).css('left')});
					break;
				case 1 :
					myElement.data('params', {top0 : 0, x0 : -930, top1: $(this).css('top'), x1: $(this).css('left')});
					break;
				case 2 :
					myElement.data('params', {top0 : 280, x0 : -1030, top1: $(this).css('top'), x1: $(this).css('left')});
					break;
				 case 3 :
					myElement.data('params', {top0 : -1200, x0 : -2330, top1: $(this).css('top'), x1: $(this).css('right')});
					break;
				case 4 :
					myElement.data('params', {top0 : 250, x0 : -530, top1: $(this).css('top'), x1: $(this).css('right')});
					break;
				}
			});
</pre>
<p>What happens when we scroll ? The top property of each element and the left (for coriander, rosemary and lemon bald) or right (for chives and basil) changes as a function of the scroll position :</p>
<pre class="brush: jscript; title: ; notranslate">
$(window).scroll(function () {
var s_max = myHeight / 2 + 500;
    function move(p0, p1, s) {
        return Math.min((-p0 + p1) / s_max * s + p0, p1);
    }

    var scrollTop = parseInt($(window).scrollTop());
    $('.element').each(function (i) {

        var myX = move($(this).data('params').x0, parseInt($(this).data('params').x1), scrollTop),
            myY = move($(this).data('params').top0, parseInt($(this).data('params').top1), scrollTop);

if (i &lt; 3) {
            $(this).stop().css({
                left: myX + 'px',
                top: myY + 'px'
            })
        } else {
            $(this).stop().css({
                right: myX + 'px',
                top: myY + 'px'
            })
        }
    })
})
</pre>
<p><code>move</code>  is a function of the scroll value and has two parameters : initial (p0) and final (p1) position of an element.<br />
Before we start scrolling, s = 0, move is equeal to p0. When scroll reaches s_max, the value of move is p1. The min operator prevents further movement.<br />
As I said this is one of the simplest possible solutions.<br />
What is s_max ? I wanted the animation to finish once the elements are verticaly centered in the middle of the window (I&#8217;m not pixel perfect here).<br />
Where is that point ? Imagine that we don&#8217;t animate our elements and that they are in their final positions. Notice that we have to scroll down 500px (see the scheme below), to see the top of the second row of our herbs. If we scroll down a half height of a window more we will see them in the middle.<br />
<img alt="My herb garden preview"  src="http://pehaa.com/wp-content/uploads/2011/08/scheme.jpg" title="My herb garden scheme " class="aligncenter" width="552" height="837" /><br />
We want to be sure that the page is high enough so that the elements could reach their final positions. To assure that we will make the property height of <code>section</code> dependent on the height of the browser window, in this case we need to scroll <code>$(window).height/2 + 500</code>. We have 240px above the section (120px + 120px). The minimum height of <code>section</code> is then <code>$(window).height/2 + 260</code>. We add a line to the <code>init</code> function </p>
<pre class="brush: jscript; title: ; notranslate">
function init() {
    myHeight = $(window).height();
    $('header').css('height', myHeight - 300);
    $('section').css('min-height', Math.max(myHeight / 2 + 260, 600));
}
</pre>
<p>It was tested in Safari, Firefox, Chrome, Opera, IE7 and IE8. It works in the last two if you don&#8217;t forget to add</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if IE]&gt;
	&lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>I hope you find it useful. Please bookmark and share.<br />
Let me know what you think &#8211; I&#8217;m looking forward to your comments. Thanks.</p>
<div class="shr-publisher-2429"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2011%2F08%2Fintriguing-animate-on-scroll-effect-jquery-tutorial%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2011%2F08%2Fintriguing-animate-on-scroll-effect-jquery-tutorial%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2011/08/intriguing-animate-on-scroll-effect-jquery-tutorial/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>postcard from Paris &#8211; css3 keyframes animations in use</title>
		<link>http://pehaa.com/2011/08/postcard-from-paris-css3-keyframes-animations-in-use/</link>
		<comments>http://pehaa.com/2011/08/postcard-from-paris-css3-keyframes-animations-in-use/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 14:27:47 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=2372</guid>
		<description><![CDATA[I decided to explore the area of css3 keyframes animations. We are going to create a sort of virtual postcard. Greetings from Paris !]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><a class="twitter-share-button" href="http://twitter.com/share" data-count="horizontal" data-via="PeHaa">Tweet</a></p>
<p><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></p>
<p>I decided to explore the area of css3 keyframes animations. The idea was simple &#8211;  to create a sort of virtual postcard. I live in Paris so obviously I send you my greetings from Paris :). <strong><a href="http://pehaa.com/wp-content/uploads/2011/08/demo/cartedeParis1.html" target="_blank">Click here or on the image to view the animation demo.</a></strong><br />
<a href="http://pehaa.com/wp-content/uploads/2011/08/demo/cartedeParis1.html" target="_blank"><img alt="Postcard from Paris css3 reframes animation preview " style="border: 15px solid #fff; -webkit-box-shadow: 0 0 20px #bababa; -moz-box-shadow: 0 0 20px #bababa; box-shadow: 0 0 20px #bababa; -webkit-border-radius:10px; -moz-border-radius:10px; border-radius: 10px; "src="http://pehaa.com/wp-content/uploads/2011/08/preview.jpg" title="Postcard from Paris preview " class="aligncenter" width="570" height="855" /></a></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2011/08/PostcardFromParis.zip">Download  the source files</a></h3>
<p>(.psd file included)<br />Postcard from Paris<br />
<small>.zip 1.9MB</small></p>
</div>
<p>The css3 animations are supported by : Chrome 2+, Safari 4+, Firefox 5+, iOS Safari 3.2+ and<br />
Android 2.1+ (source <a href="http://coding.smashingmagazine.com/2011/05/17/an-introduction-to-css3-keyframe-animations/" target="_blank">Smashing Magazine</a>).<br />
We are going to animate 3 elements : the clouds (there are three layers of clouds), the rotating phare light and the Eiffel Tower sparkling. </p>
<p>The html structure is very simple :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset=&quot;utf-8&quot; /&gt;
&lt;title&gt;Greetings from Paris&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
   &lt;div id=&quot;wrap&quot;&gt;
      &lt;h1&gt;Bonne Nuit &lt;em&gt;PARIS !&lt;/em&gt;&lt;/h1&gt;
      &lt;div id=&quot;phare&quot;&gt;&lt;/div&gt;
      &lt;div id=&quot;eiffel&quot;&gt;&lt;/div&gt;
      &lt;div id=&quot;eiffel_wrap&quot;&gt;
         &lt;div id=&quot;sparkling1&quot;&gt;&lt;/div&gt;
         &lt;div id=&quot;sparkling2&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id=&quot;roofs&quot;&gt;&lt;/div&gt;
      &lt;footer&gt;by PeHaa, Paris 2011&lt;/footer&gt;
   &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>We will use the following images (I will discuss the sparkling effect a little bit later)<br />
<img alt="used images" src="http://pehaa.com/wp-content/uploads/2011/08/images.png" title="Used images" class="aligncenter" width="555" height="784" /><br />
Let&#8217;s start to complete the css stylesheet :<br />
<img alt="ccs part 1" src="http://pehaa.com/wp-content/uploads/2011/08/css1.png" title="ccs part 1" class="aligncenter" width="600" height="888" /></p>
<h2>Animating clouds</h2>
<p>To animate the three layers of clouds independently we use the following keyframes. (Notice that each time I use the <code>-webkit-</code> and <code>-moz-</code> prefixes).</p>
<pre class="brush: css; title: ; notranslate">
/* will be applied to #wrap that has 3 backgrounds layers */

	@-webkit-keyframes wind  {
	         0% {background-position: 0px 200px,0px 350px, left top;}
			50% {background-position:  500px 40px,600px 450px, left top;}
			100% {background-position: 1000px 200px,1200px 350px, left top}
	}

	@-moz-keyframes wind  {
	         0% {background-position: 0px 200px,0px 350px, left top;}
			50% {background-position:  500px 40px,600px 450px, left top;}
			100% {background-position: 1000px 200px,1200px 350px, left top}
	}

/* will be applied to #roofs that has 2 backgrounds layers */

	@-webkit-keyframes wind1 {
	         0% {background-position: 100px 250px, left bottom;}
			50% {background-position:  650px 150px, left bottom;}
			100% {background-position: 1300px 250px, left bottom}
	}

	@-moz-keyframes wind1 {
	         0% {background-position: 100px 250px, left bottom;}
			50% {background-position:  650px 150px, left bottom;}
			100% {background-position: 1300px 250px, left bottom}
	}
</pre>
<p>This way we have defined the property of <code>background-position</code> for the beginning, middle and end of our animation. Next we add :</p>
<pre class="brush: css; title: ; notranslate">
#wrap {-webkit-animation: wind 80s linear infinite;
       -moz-animation: wind 80s linear infinite;}
#roofs {-webkit-animation: wind 80s linear infinite;
       -moz-animation: wind 80s linear infinite; }
</pre>
<p>to associate the animations with the proper elements and to define the duration, timing-function and iteration count, respectively (I use the <a href="http://www.w3.org/TR/css3-animations/#the-animation-shorthand-property-" target="_blank">shorthand notation</a>). </p>
<h2>Animating phare light</h2>
<p>This time we are going to simultaneously animate the <code>opacity</code> and rotate the phare light with the rotation origin in its top center point  (as in the image above). </p>
<pre class="brush: css; title: ; notranslate">
	@-webkit-keyframes phare {
	         0% { -webkit-transform:rotate(0deg); opacity:0}
		50% { -webkit-transform:rotate(180deg); opacity:1}
	        100% { -webkit-transform:rotate(360deg); opacity:0;}
	}
        #phare {-webkit-transform-origin: center top;
	        -webkit-animation: phare 15s linear infinite;}
</pre>
<p>(here and further, repeat the same with <code>-moz-</code> prefixes).</p>
<h2>Adding sparkles</h2>
<p>We will use two different images with sparkling effect<br />
<img alt="Sparkling" src="http://pehaa.com/wp-content/uploads/2011/08/sparkling.png" title="Sparkling" class="aligncenter" width="601" height="516" /><br />
Below is the styling :</p>
<pre class="brush: css; title: ; notranslate">
#eiffel_wrap { position:absolute; width:240px;
              height:462px; right:10px; top: 180px; opacity:0;}
#sparkling1 { position:absolute; background: url('images/sparkling1.png') no-repeat;
              width:240px; height:462px; opacity:0;}
#sparkling2 { position:absolute; background: url('images/sparkling2.png') no-repeat;
              width:240px; height:462px;  opacity:0;}
</pre>
<p>We will animate the <code>#eiffel_wrap</code>, <code>#sparkling1</code> and <code>#sparkling2</code>.</p>
<pre class="brush: css; title: ; notranslate">
@-webkit-keyframes sparkling {
		0% {opacity:0;}
		50%{opacity:1;}
		100% {opacity:0;}
	}
</pre>
<p>The idea is to use the sparkling animation to turn out and in the <code>#sparkling1</code> and <code>#sparkling2</code> elements within the 0.4s cycle, with the first in/out when the second is out/in. To achieve that we will delay the sparkling animation of 0.2s on  <code>#sparkling1</code>.</p>
<pre class="brush: css; title: ; notranslate">&gt;
#sparkling1 {-webkit-animation: sparkling .4s .2s  infinite;}
#sparkling2 {-webkit-animation: sparkling .4s  infinite;}
</pre>
<p>In Paris this beautiful evening spectacle may be seen for several minutes every full hour. We will use the <code>#eiffel_wrap</code> element and <code>eiffel_wrap</code> animation to recreate this effect (not literarily though &#8211; I will not make you wait an hour long).</p>
<pre class="brush: css; title: ; notranslate">
#eiffel_wrap { -webkit-animation: eiffel_wrap 30s 1s  infinite;}
@-webkit-keyframes eiffel_wrap {
		    0% {opacity:1;-webkit-animation-timing-function: steps(1);}
			40%{opacity:0;}
			100% {opacity:0;}
			}
</pre>
<p>With <code>-webkit-animation-timing-function: steps(1);</code> the transition is instantaneous with no fading out effect.</p>
<p>And here we are.<br />
I hope you found this tutorial useful and got inspired. Please share and bookmark if you like it.<br />
As always I&#8217;m looking forward to your comments and&hellip; see you in Paris !</p>
<div class="shr-publisher-2372"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2011%2F08%2Fpostcard-from-paris-css3-keyframes-animations-in-use%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2011%2F08%2Fpostcard-from-paris-css3-keyframes-animations-in-use%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2011/08/postcard-from-paris-css3-keyframes-animations-in-use/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>illustrator tutorial: create a 6-egg box (not necessarily for Easter)</title>
		<link>http://pehaa.com/2010/03/illustrator-tutorial-create-a-6-egg-box-not-necessarily-for-easter/</link>
		<comments>http://pehaa.com/2010/03/illustrator-tutorial-create-a-6-egg-box-not-necessarily-for-easter/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:32:57 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[easter]]></category>
		<category><![CDATA[egg]]></category>
		<category><![CDATA[illustration]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=1633</guid>
		<description><![CDATA[In this tutorial you will learn how to create a 6-egg box (full of eggs). We will use 3D Rotate and Revolve Effects. We will also play a lot with masks. You may download the source file (created in Illustrator CS4, back-saved to CS2+).]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p><img src="http://pehaa.com/wp-content/uploads/2010/03/Preview1.png" alt="" title="Preview1" width="600" height="482" class="aligncenter size-full wp-image-1780" /><br />
In this tutorial you will learn how to create a 6-egg box (full of eggs). We will use 3D Rotate and Revolve Effects. We will also play a lot with masks. You may download the source file (created in Illustrator CS4, back-saved to CS2+).</p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2010/04/sixeggbox.ai_.zip">Free source file: Ai CS4  (ai.zip 1,5 MB) </a></h3>
<p><small><br />
</small>
</div>
<h2>Part I &#8211; Preliminaries</h2>
<h3>Step 1</h3>
<p>Open a new 800 px x 600 px RGB document in Illustrator.<br />
Go to Illustrator > Preferences > General and make sure that the Keyboard Increment is set to 1px.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/preferences.jpg" alt="" title="preferences" width="600" height="395" class="aligncenter size-full wp-image-1661" /></p>
<h3>Step 2</h3>
<p>With the Rectangle Tool (M) create two rectangles. The sizes of mine are: the bottom 444 px x 198 px and the top 403 px x 162 px. Center them vertically and horizontally.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box1.jpg" alt="" title="box1" width="600" height="239" class="aligncenter size-full wp-image-1670" /><br />
Select (V) the smaller (top) rectangle and tap twice the Up Arrow key to shift it 2 pixels up.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box2.jpg" alt="" title="box2" width="602" height="240" class="aligncenter size-full wp-image-1678" /><br />
Select the bottom rectangle. Go to Effect > Stylize > Round Corners&#8230; and set the Radius to 77px.<br />
Repeat that for the top one, this time setting the Radius to 65px.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box41.jpg" alt="" title="box4" width="600" height="263" class="aligncenter size-full wp-image-1672" /><br />
Select both rectangles. Go to Effect > 3D > Rotate and choose the settings as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box4.jpg" alt="" title="box4" width="533" height="362" class="aligncenter size-full wp-image-1666" /><img src="http://pehaa.com/wp-content/uploads/2010/03/box5.jpg" alt="" title="box5" width="600" height="264" class="aligncenter size-full wp-image-1673" /><br />
Keep the two rectangles selected and go to Object > Expand Appearance.<br />
Don&#8217;t deselect and release the clipping masks that were just created by Illustrator. To do that go to Object > Clipping Mask > Release or use the keyboard shortcut Option/Alt+Cmd/Ctrl+7.<br />
Next go to Object > Path > Clean Up.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/cleanup.jpg" alt="" title="cleanup" width="391" height="226" class="aligncenter size-full wp-image-1664" /><br />
Finally, select both shapes and ungroup twice Shift+Cmd/Ctrl+G (or Object > Ungroup).<br />
Now, the two shapes appear in the Layer Panel as Paths.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box6.jpg" alt="" title="box6" width="600" height="240" class="aligncenter size-full wp-image-1680" /><br />
Copy Cmd/Ctrl+C the bottom shape and paste it to front Cmd/Ctrl+F. Keep it selected and holding down the Shift key select also the top smaller part. Choose Divide from the Pathfinder Panel. Ungroup Shift+Cmd/Ctrl+G.<br />
Bring the frame (compound path) forward Cmd/Ctrl+] (or go to Object > Arrange > Bring Forward).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/box6b.jpg" alt="" title="box6b" width="600" height="339" class="aligncenter size-full wp-image-1718" /></p>
<h2>Part II &#8211; Create the box lid</h2>
<h3>Step 3</h3>
<p>Copy the three shapes created in Part 1 and turn them upside down (to be sure it&#8217;s exactly 180 degrees hold the Shift key down)<br />
Bring the frame part to front Shift+Cmd/Ctrl+] (or go to Object > Arrange > Bring to Front).<br />
Apply a gradient fill as in the image below, the numbers represent the RGB values.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid21.jpg" alt="" title="lid2" width="600" height="291" class="aligncenter size-full wp-image-1696" /><br />
Copy the lid frame Cmd/Ctrl+C and paste it to back Cmd/Ctrl+B. Tap 4 times the Up Arrow key to shift it 4 pixels up.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid3.jpg" alt="" title="lid3" width="600" height="241" class="aligncenter size-full wp-image-1687" /><br />
Apply the gradient to the lid frame bottom copy as in the image (For your convenience you can make all the other objects invisible Cmd/Ctrl+3)<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid4.jpg" alt="" title="lid4" width="600" height="256" class="aligncenter size-full wp-image-1700" /><br />
Here is what we get<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid5.jpg" alt="" title="lid5" width="600" height="222" class="aligncenter size-full wp-image-1699" /></p>
<h3>Step 4</h3>
<p>Select the inner part of the lid and apply a radial gradient as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid6.jpg" alt="" title="lid6" width="600" height="325" class="aligncenter size-full wp-image-1705" /></p>
<h3>Step 5</h3>
<p>Get back to the lid frame. Select it and go to Effect > Stylize > Drop Shadow&#8230; Set the parameters as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lidshadow.jpg" alt="" title="lidshadow" width="553" height="366" class="aligncenter size-full wp-image-1685" /><br />
(1) Since I do not want to have the lid frame shadow outside the lid we will create a clipping mask.<br />
(2) In the Layer Panel select the lid shape. Bring it to front Shift+Cmd/Ctrl+]. Holding down the Shift key select bot the lid shape and the lid frame. To create a clipping mask either go to Object > Clipping Mask > Make or use the shortcut Cmd/Ctrl+7.<br />
(3) Here is what we get. Select all element and group the lid Cmd/Ctrl+G.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/lid7.jpg" alt="" title="lid7" width="600" height="507" class="aligncenter size-full wp-image-1704" /><br />
For your convenience create a new layer Cmd/Ctrl+L. Select the lid and drag it for a while to the new layer. </p>
<h2>Part III &#8211; Create an egg</h2>
<h3>Step 6</h3>
<p>You may use the image below as a template to draw the shape of your egg. Lock this image Cmd/Ctrl+3. Next draw an elipse (L) starting in the center of the template egg – hold the Option/Alt key. Then reshape your ellipse using the Direct Selection Tool (A).<br />
<img src="http://pehaa.com/wp-content/uploads/2009/04/egg_template.jpg" alt="" title="egg_template" width="600" height="667" class="size-full wp-image-421" /><br />
With the Direct Selection Tool (A) select the right half or your egg and delete it.<br />
<img src="http://pehaa.com/wp-content/uploads/2009/04/create2revolve_shape.jpg" alt="" title="create2revolve_shape" width="600" height="453" class="size-full wp-image-417" /><br />
Set its stroke color to white, no fill and go to Effect > 3D > Revolve. Click More Options to view the complete list of options. In the image below you will find all the settings I used.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg_revolve.jpg" alt="" title="egg_revolve" width="533" height="687" class="aligncenter size-full wp-image-1640" /><br />
With the Shift-key hold down rescale your egg so that it was about 106 px x 144 px.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg1.jpg" alt="" title="egg1" width="283" height="366" class="aligncenter size-full wp-image-1654" /></p>
<h3>Step 7</h3>
<p>Copy Cmd/Ctrl+C and paste to back Cmd/Ctrl+B the egg. Open the Appearance Panel and change the settings to No Shading.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg_copy.jpg" alt="" title="egg_copy" width="533" height="492" class="aligncenter size-full wp-image-1649" /><br />
(1) You should get a white egg shape.<br />
(2) Keeping it selected go to Object > Expand Appearance.<br />
(3) Don&#8217;t deselect and choose Unite from the Pathfinder Panel.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg_expand.png" alt="" title="egg_expand" width="600" height="263" class="aligncenter size-full wp-image-1650" /></p>
<h3>Step 8</h3>
<p>Keep the just created white egg copy selected and go to Effect > Stylize > Drop Shadow and choose the settings as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg_shadow.jpg" alt="" title="egg_shadow" width="553" height="366" class="aligncenter size-full wp-image-1655" /><br />
Select both the top and the bottom eggs and group them Cmd/Ctrl+G (or go to Object > Group).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/egg2.jpg" alt="" title="egg2" width="600" height="366" class="aligncenter size-full wp-image-1658" /></p>
<h3>Step 9</h3>
<p>In order to obtain the colorful egg use orange R = 247 G = 147 B = 30 as the stroke color instead of white and choose R = 86 G = 45 B = 34 as the Custom Shading color in the 3D > Revolve Panel.<br />
If you want to add some decor to your egg(s) (fill your box with Easter eggs maybe(?)) visit my <a href="http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/">tutorial: Create and color an eco easter egg in Adobe Illustrator.</a></p>
<h2>Part IV &#8211; Create the bottom part of the box</h2>
<h3>Step 10</h3>
<p>First we will apply gradients to all three parts created in Part I.<br />
First add a gradient fill as in the image to the frame part:<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main1.jpg" alt="" title="main1" width="486" height="331" class="aligncenter size-full wp-image-1731" /><br />
Next to the inner part:<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main2.jpg" alt="" title="main2" width="490" height="308" class="aligncenter size-full wp-image-1730" /><br />
Next copy Cmd/Ctrl+C the very bottom part and paste it to front Cmd/Ctrl+F, tap three times to shift it 3 pixels down<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main3.jpg" alt="" title="main3" width="600" height="231" class="aligncenter size-full wp-image-1729" /><br />
Fill it with the same gradient you used for the frame part, then reverse the gradient.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main4.jpg" alt="" title="main4" width="490" height="248" class="aligncenter size-full wp-image-1728" /></p>
<h3>Step 11</h3>
<p>Now we will put the eggs in.<br />
Make sure you have 5 white eggs and a colorful one. Bring them all to front Shift+Cmd/Ctrl+]. Scale down the three eggs from the second row. I used the Object > Transform > Scale (see the image below). Arrange the eggs &#8216;<em>on</em>&#8216; the box.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main5.jpg" alt="" title="main5" width="600" height="398" class="aligncenter size-full wp-image-1736" /></p>
<h3>Step 12</h3>
<p>To make sure that your eggs do not break before the frying pan is ready to receive an omelette create a tiny rectangle (M). Scale it so that it works well with the size of an egg. With the Direct Selection Tool (A) select the two bottom points and click the little Convert Point icon in the top panel. Apply the gradient fill as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main6.jpg" alt="" title="main6" width="600" height="301" class="aligncenter size-full wp-image-1735" /><br />
Go to Effect > Stylize > Drop Shadow and set<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main7.jpg" alt="" title="main7" width="553" height="366" class="aligncenter size-full wp-image-1734" /><br />
Place the separators between the first and the second row of eggs.<br />
Group Cmd/Ctrl+G the first row of eggs and the two separators.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main8a.jpg" alt="" title="main8a" width="600" height="227" class="aligncenter size-full wp-image-1744" /><br />
Select the inner part of the box, copy it Cmd/Ctrl+C, paste to front Cmd/Ctrl+F, then bring to front Shift+Cmd/Ctrl+].<br />
Holding down the Shift key select it together with the group of eggs and separators.<br />
Make a clipping mask Cmd/Ctrl+7.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main9.jpg" alt="" title="main9" width="600" height="450" class="aligncenter size-full wp-image-1743" /></p>
<h3>Step 13</h3>
<p>Create a simple shape resembling the wider part of an egg (the easiest way is to start with an Ellipse (L))<br />
Copy it three times and apply the gradient fill as in the image. Send them to back Shift+Cmd+Ctrl+[ (or go to Object > Arrange > Send to Back) and place so that they constitute the base part of the box.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main10.jpg" alt="" title="main10" width="600" height="407" class="aligncenter size-full wp-image-1748" /><br />
You may use Illustrator to distribute them evenly (select all of them and choose Horizontal Distribute Center in the Align Panel) as well as to center it with the rest of the box. To do the latter, select all three shapes, group them Cmd/Ctrl+G. Keep them selected. Holding down the Shift key select the frame of the box. Click again on the frame to make it the key object (this time you don’t need to hold down Shift as you click). This time choose  Horizontal Align Center.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main11.jpg" alt="" title="main11" width="600" height="407" class="aligncenter size-full wp-image-1749" /></p>
<h3>Step 14</h3>
<p>Now, a little bit tricky part where we will add a shadow inside the box. Note that the eggs are over the frame so if we add Drop Shadow effect to the frame, the shadow will not be visible on the eggs. And we want to have it on the eggs in the front row.<br />
Here is how we will deal with that.<br />
(1) Copy Cmd/Ctrl+C the frame, paste it to front Cmd/Ctrl+F then bring to front Shift+Cmd/Ctrl+].  Go to Effect > Stylize > Drop Shadow&#8230; and use the settings as in the image.<br />
(2) With the Rectangle Tool (M) create a rectangle that divides the frame vertically into two parts. Send it backward Cmd/Ctrl+[ (or go to Object > Arrange > Send Backward).<br />
Holding the Shift key select both the frame and the rectangle and choose Divide from the Pathfinder Panel. Ungroup the objects. Delete the rests of the rectangle. Also go to Path > Clean Up.<br />
(3) Here is what we get.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main_shadA.jpg" alt="" title="main_shadA" width="600" height="600" class="aligncenter size-full wp-image-1755" /><br />
(4) Copy Cmd/Ctrl+C the inner shape of the box, paste it to front Cmd/Ctrl+F then bring to front Shift+Cmd/Ctrl+].<br />
Holding the Shift key select it both with the bottom half of the frame. Make clipping mask Cmd/Ctrl+7.<br />
(5) Again copy Cmd/Ctrl+C the inner shape of the box, paste it to front Cmd/Ctrl+F then bring to front Shift+Cmd/Ctrl+] and holding the Shift key select it both with the top half of the frame.<br />
(6) In (4) and (5) Illustrator created groups that contain the clipping mask and the masked object. In the Layer Panel select the group created in (5) and bring it back so that it was placed directly under the eggs from the second row. It&#8217;s done.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main_shadB.jpg" alt="" title="main_shadB" width="600" height="590" class="aligncenter size-full wp-image-1756" /></p>
<h3>Step 15</h3>
<p>Copy Cmd/Ctrl+C the bottom parts of the box that you created in Step 13 and paste them to front Cmd/Ctrl+F. It might be more convenient if you ungroup them for a while Shift+Cmd/Ctrl+G. Select each one separately and apply the gradient fill as in the image. Next select all and in the Appearance Panel change the Blending Mode to Multiply and decrease the Opacity to 42%.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main121.jpg" alt="" title="main12" width="600" height="412" class="aligncenter size-full wp-image-1765" /></p>
<h3>Step 16</h3>
<p>Select the shape that makes the tiny border of the box frame. (In the Layer Panel you should find it just above the elements we worked on in the previous step).<br />
Copy it Cmd/Ctrl+C, paste to back Cmd/Ctrl+B then send to back Shift_Cmd/Ctrl+[.<br />
Go to Effect > Stylize > Drop Shadow&#8230; and enter the settings as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main13.jpg" alt="" title="main13" width="600" height="415" class="aligncenter size-full wp-image-1766" /></p>
<h3>Step 17</h3>
<p>With the Ellipse Tool (L) create an ellipse. Send it to Back Shift+Cmd/Ctrl+[. Place it as in the image and fill with the black to white gradient as you can see below.<br />
<em>Note</em>: If you are using Illustrator CS4, select the white gradient stop and set its Opacity to 0. Decrease the Opacity of your ellipse to 70% and skip to Step 18.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main14.jpg" alt="" title="main14" width="600" height="387" class="aligncenter size-full wp-image-1772" /><br />
Copy the ellipse Cmd/Ctrl+C and paste it to front Cmd/Ctrl+F. Select both of them and go to Transparency Panel. Choose Make Opacity Mask.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main15.jpg" alt="" title="main15" width="600" height="387" class="aligncenter size-full wp-image-1771" /><br />
To edit the masking object select its thumbnail in the Transparency Panel. It&#8217;s the one on the right (left thumbnail represents the opacity mask, right thumbnail represents masking objects). Then inverse the gradient and check &#8216;Clip&#8217; in the Transparency Panel.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main16.jpg" alt="" title="main16" width="600" height="367" class="aligncenter size-full wp-image-1770" /><br />
Click the masked artwork’s thumbnail (left thumbnail) in the Transparency panel to exit mask-editing mode.<br />
Select the masked ellipse and in the Appearance Panel change the Blending Mode to Multiply and  decrease its Opacity to 70%. Holding down Shift and Option/Alt key drag the ellipse under two other parts of the box.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main17.jpg" alt="" title="main17" width="528" height="314" class="aligncenter size-full wp-image-1769" /></p>
<h3>Step 18</h3>
<p>Put the lid group back to the layer we work on and send it to back Shift+Cmd/Ctrl+[.<br />
Create two rectangles, mine are filled with R = 153 G = 134 b = 117. Try to position them as in the image. Group them Cmd/Ctrl+G and and send to back Shift+Cmd/Ctrl+[.<br />
Select all and chose Horizontal Align Center from the Align Panel.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/main18.jpg" alt="" title="main18" width="492" height="422" class="aligncenter size-full wp-image-1778" /><br />
Holding the Shift key drag the rectangles and the lid down so that to position the three groups properly. The 6-egg box is ready, it&#8217;s time to prepare a pan for an omelette.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/03/final.png" alt="" title="final" width="600" height="450" class="aligncenter size-full wp-image-1779" /></p>
<p>Thank you for reading. I&#8217;m looking forward to your comments.<br />
And&#8230; if you like this post please share: Tweet, Stumble, &#8230;. </p>
<div class="shr-publisher-1633"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F03%2Fillustrator-tutorial-create-a-6-egg-box-not-necessarily-for-easter%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F03%2Fillustrator-tutorial-create-a-6-egg-box-not-necessarily-for-easter%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2010/03/illustrator-tutorial-create-a-6-egg-box-not-necessarily-for-easter/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>illustrator tutorial: create a seamless folk pattern</title>
		<link>http://pehaa.com/2010/02/illustrator-tutorial-create-a-seamless-folk-pattern/</link>
		<comments>http://pehaa.com/2010/02/illustrator-tutorial-create-a-seamless-folk-pattern/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:15:06 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Decoration]]></category>
		<category><![CDATA[folk]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[swatches]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=1427</guid>
		<description><![CDATA[In this tutorial you will learn how to create a seamless pattern composed of simple folk-flavored flowers. In the first part we will create an individual flower. In the second we will focus on constructing a pattern and define a seamless Illustrator pattern swatch. 
]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>In this tutorial you will learn how to create a seamless pattern composed of simple folk-flavored flowers. In <a href="http://pehaa.com/2010/02/illustrator-tutorial-create-a-seamless-folk-pattern/#part1">the first part</a> we will create an individual flower. In <a href="http://pehaa.com/2010/02/illustrator-tutorial-create-a-seamless-folk-pattern/#part2">the second</a> we will focus on constructing a pattern and define a seamless Illustrator pattern swatch.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/folk_pattern.png" alt="" title="folk_pattern" width="600" height="600" class="aligncenter size-full wp-image-1513" /><br />
You can download the source file. This tutorial was prepared with Adobe Illustrator CS4 but the source file is back-saved to CS2.</p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2010/02/folk_pattern_tutorial.ai_.zip">Free source file: Ai CS2+  (ai.zip 0,9 MB) </a></h3>
<p><small><br />
</small></div>
<h3>Step 0</h3>
<p>We will use five colors for our flowers: white, black, blue, beige and red as well as some brown background color. In the image below you can see the RGB values of the colors I used.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/swatches.png" alt="" title="swatches" width="263" height="325" class="aligncenter size-full wp-image-1510" /></p>
<h2><a name="part1">Part I &#8211; Create an individual item of the pattern</a></h2>
<p><img src="http://pehaa.com/wp-content/uploads/2010/02/pattern_item.png" alt="" title="pattern_item" width="436" height="456" class="aligncenter size-full wp-image-1472" /></p>
<h3>Step 1</h3>
<p>Choose the Polygon Tool (you will find it under the Rectangle Tool in the Tool Panel). Option/Alt-click and in the dialog box set the Radius to 25px and the number of sides to 22.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat11.jpg" alt="" title="pat1" width="387" height="289" class="aligncenter size-full wp-image-1429" /><br />
Keep your polygon selected and go to  Effect > Distort &#038; Transform > Pucker &#038; Bloat&#8230; Set the slider value to 70%.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat21.jpg" alt="" title="pat2" width="405" height="335" class="aligncenter size-full wp-image-1430" /><br />
(1) Copy Cmd/Ctrl+C the bloated polygon and paste it to front Cmd/Ctrl+F. Go to the Appearance Panel and uncheck (or delete) the Pucker &#038; Bloat Effect.<br />
(2) Hold down the Shift-key and Option/Alt-key  and enlarge a little bit the polygon.<br />
(3) Select the bloated shape (the one beneath) and go to Object > Expand Appearance.<br />
(4) Select both shapes and choose Intersect in the Pathfinder Panel.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat32.jpg" alt="" title="pat3" width="600" height="597" class="aligncenter size-full wp-image-1435" /></p>
<h3>Step 2</h3>
<p>Choose the Polygon Tool and set the Radius to 33px and the number of sides to 11. Fill the shape with red, no stroke.<br />
Again go to  Effect > Distort &#038; Transform > Pucker &#038; Bloat&#8230; This time don&#8217;t bloat your shape that much, set the value to 21%.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat41.jpg" alt="" title="pat4" width="363" height="516" class="aligncenter size-full wp-image-1439" /><br />
Go to Object > Expand Appearance. Don&#8217;t deselect and go to Effect > Distort &#038; Transform > Transform&#8230; Create a rotated copy of your flower shape (Note that if you rotate your flower by 360/11 degrees the shapes will overlap, that&#8217;s why we choose 1/2 x 360/11. Note also that Adobe Illustrator makes the calculations for you!)<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat52.jpg" alt="" title="pat5" width="564" height="392" class="aligncenter size-full wp-image-1443" /><br />
(1) Select the two copies, go to Object > Expand Appearance.<br />
(2) Choose Unite in the Pathfinder Panel.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat6.jpg" alt="" title="pat6" width="600" height="326" class="aligncenter size-full wp-image-1441" /></p>
<h3>Step 3</h3>
<p>(1) In the Layer Panel put the red shape below the beige one. Align them centering horizontally and vertically.<br />
(2) Copy Cmd/Ctrl+C the beige shape and paste it to back Cmd/Ctrl+B then immediately send it to Back Shift+Cmd/Ctrl+[ (or go to Object > Arrange > Send to Back). Don&#8217;t deselect, with the Shift-key and Alt/Option-key hold down enlarge it a bit, my shape is 95px x  95px. Change the fill color to blue.<br />
(3) Keep the blue shape selected, go to Object > Path > Offset Path and set the offset to -1px.<br />
(4) Select the outer shape and delete it. Now the arms of the star-like shape are a little bit thinner.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat71.jpg" alt="" title="pat7" width="600" height="754" class="aligncenter size-full wp-image-1454" /></p>
<h3>Step 4</h3>
<p>(1) Option/Alt-click with the Polygon Tool and set the Radius = 66px and Sides=12. Fill the polygon with black, no stroke.<br />
(2) Bloat it (Effect > Distort &#038; Transform > Pucker &#038; Bloat&#8230;) of 17%.<br />
(3) Go to Object > Expand Appearance.<br />
(4) Go to Object > Offset Path&#8230; and set the Offset to -0.5px. Delete the outer shape.<br />
(5) Send it to back Shift+Cmd/Ctrl+[. Select all shapes and center them horizontally and vertically.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat8.jpg" alt="" title="pat8" width="599" height="546" class="aligncenter size-full wp-image-1459" /></p>
<h3>Step 5</h3>
<p>Select the beige star-like shape so that you could easily determine it&#8217;s center point. Go to View > Show Artboard Rulers (or use the keyboard shortcut Cmd/Ctrl+R). Drag the Guides so that they intersect in the center of the beige object.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat9.jpg" alt="" title="pat9" width="393" height="378" class="aligncenter size-full wp-image-1464" /><br />
With the Ellipse Tool (L) and the Shift and Option/Alt hold down create a tiny circle starting from the point on the vertical guide as in the image below (the diameter of mine is 5,2px). Fill it with white, no stroke.<br />
Choose the Rotate Tool (R) and Option/Alt-click in the center point of the flower (the point where the guides intersect). In the dialog box set the Angle to 360/22 and choose Copy.<br />
Repeat Cmd/Ctrl+D (or go to Object > Transform > Transform Again) until you have all 11 white dots.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat10.png" alt="" title="pat10" width="540" height="703" class="aligncenter size-full wp-image-1468" /></p>
<h3>Step 6</h3>
<p>Select all the white dots. The fastest way to do that is to select one then to go to Select > Same > Fill Color.<br />
Group them Cmd/Ctrl+G (or go to Object > Group).<br />
Copy Cmd/Ctrl+C and Paste to Front Cmd/Ctrl+F. With the Shift-key and Option/Alt-key hold down rescale it down a bit as in the image.<br />
Repeat the same enlarging the circle of dots and changing the fill color to red.<br />
Select all Cmd/Ctrl+A and group Cmd/Ctrl+G.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat11.png" alt="" title="pat11" width="600" height="303" class="aligncenter size-full wp-image-1471" /></p>
<h2><a name="part2">Part II &#8211; create a seamless pattern</a></h2>
<h3>Step 7</h3>
<p>Alt-click with the Rectangle Tool (M) and set the size to 900px x 900 px. Make sure the square is on the very bottom of the layer (send it back with Shift+Cmd/Ctrl+[) and has no fill and no stroke. Copy it Cmd/Ctrl+C and paste to front Cmd/Ctrl+F, set the fill of the copy to the background brown color.<br />
Lock the two rectangles.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat12.png" alt="" title="pat12" width="423" height="327" class="aligncenter size-full wp-image-1482" /><br />
Place the flower in the upper left corner of the rectangle, you do not have to be very exact. With the flower selected go to Effect > Distort &#038; Transform > Transform&#8230; and create five copies as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat13.jpg" alt="" title="pat13" width="573" height="439" class="aligncenter size-full wp-image-1483" /><br />
Go to Object > Expand Appearance and then ungroup immediately Shift+Cmd/Ctrl+G (or Object > Ungroup).<br />
We will recolor the four inner flowers.<br />
Select the second flower and go to Edit > Edit Colors > Recolor Artwork&#8230;<br />
By default, this method preserves white and black so we have to update the settings. Click the symbol as in the image, access the Recolor Options and uncheck White and Black.<img src="http://pehaa.com/wp-content/uploads/2010/02/pat14.jpg" alt="" title="pat14" width="600" height="538" class="aligncenter size-full wp-image-1484" /><br />
To recolor the object click the button marked in the image. This way you will randomly change the color order (note that with five colors that we use we might have 120 different flowers). Each time you click, the color order is randomly changed. Choose OK once you are satisfied with the outcome.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat15.jpg" alt="" title="pat15" width="600" height="533" class="aligncenter size-full wp-image-1485" /><br />
Repeat the same individually for three more flowers. Than select the whole row and group it Cmd/Ctrl+G.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat16.png" alt="" title="pat16" width="561" height="266" class="aligncenter size-full wp-image-1486" /></p>
<h2>Step 8</h2>
<p>Don&#8217;t deselect and go to Effect > Distort &#038; Transform > Transform&#8230; and create a copy of the row as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat17.png" alt="" title="pat17" width="589" height="512" class="aligncenter size-full wp-image-1494" /><br />
As you did previously, go to Object > Expand Appearance and ungroup Shift+Cmd/Ctrl+G.<br />
Select the second row (it will be grouped but it will not be grouped with the first row).<br />
Go to Edit > Edit Colors > Recolor Artwork&#8230; and change the color order of the whole row.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat18.jpg" alt="" title="pat18" width="600" height="557" class="aligncenter size-full wp-image-1496" /><br />
Now, select both rows and group them Cmd/Ctrl+G.</p>
<h2>Step 9</h2>
<p>With the two rows  selected go to Effect > Distort &#038; Transform > Transform&#8230; and create three copies as in the image.<img src="http://pehaa.com/wp-content/uploads/2010/02/pat19.jpg" alt="" title="pat19" width="600" height="613" class="aligncenter size-full wp-image-1497" /><br />
Once again go to Object > Expand Appearance, then ungroup Shift+Cmd/Ctrl+G.<br />
Now, all &#8216;double rows&#8217; are grouped together. With Edit > Edit Colors > Recolor Artwork&#8230; change the color order for the second and the third group.<br />
Note that you do not change the colors of the last group. In order to create a seamless patterns the objects located on the opposite edges of the no-fill, no-stroke rectangle have to be identical.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat20.jpg" alt="" title="pat20" width="600" height="613" class="aligncenter size-full wp-image-1498" /><img src="http://pehaa.com/wp-content/uploads/2010/02/pat211.jpg" alt="" title="pat21" width="600" height="613" class="aligncenter size-full wp-image-1499" /></p>
<h2>Step 10</h2>
<p>Your pattern is ready. Unlock the rectangles created in Step 7. Select all flowers and the rectangles and drag them to the Swatches Panel (or go to Edit > Define Pattern&#8230;)<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/pat22.jpg" alt="" title="pat22" width="600" height="522" class="aligncenter size-full wp-image-1505" /></p>
<div class="shr-publisher-1427"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F02%2Fillustrator-tutorial-create-a-seamless-folk-pattern%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F02%2Fillustrator-tutorial-create-a-seamless-folk-pattern%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2010/02/illustrator-tutorial-create-a-seamless-folk-pattern/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>illustrator tutorial: create a yummy vector cupcake</title>
		<link>http://pehaa.com/2010/02/illustrator-tutorial-create-a-yummy-vector-cupcake/</link>
		<comments>http://pehaa.com/2010/02/illustrator-tutorial-create-a-yummy-vector-cupcake/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 17:13:28 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[illustration]]></category>
		<category><![CDATA[mesh]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=1271</guid>
		<description><![CDATA[Some time ago I posted<a href="http://pehaa.com/2009/09/free-cupcakes-in-vector/"> two similar cupcakes as vector freebies</a>. Now it is the time to share my recipe (with a special dedication to Janna Hiromasa ;):)).  The CS2+ source file is included.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Some time ago I posted<a href="http://pehaa.com/2009/09/free-cupcakes-in-vector/"> two similar cupcakes as vector freebies</a>. Now it is the time to share my recipe (with a special dedication to Janna Hiromasa ;):)).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake_tut.png" alt="" title="cake_tut" width="600" height="590" class="aligncenter size-full wp-image-1382" /><br />
You may download the source file. I use the CS4 version but the file is back-saved to CS2.</p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2010/02/cupcake_tutorial.ai_1.zip">Free source file: Ai CS2+  (ai.zip 0,3 MB) </a></h3>
<p><small><br />
</small></p>
</div>
<h3>Step 1</h3>
<p>Create an irregular shape as in the image below. You can either use the Pen Tool (P) or start with an ellipse (L) and then move the anchor points and adjust the handles with the Direct Selection Tool (A) and the Convert Anchor Point Tool (Shift+C).<br />
Fill the shape with a solid color, R = 255 G = 174 B = 209 and set the stroke to none.<br />
Copy Cmd/Ctrl+C and paste in back Cmd/Ctrl+B then drag it a little bit down and to the right as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake1_2.jpg" alt="" title="cake1_2" width="367" height="562" class="aligncenter size-full wp-image-1292" /><br />
Fill the bottom shape with the pink gradient as in the image. The numbers in the image represent the RGB values of the the gradient colors.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake3.jpg" alt="" title="cake3" width="600" height="412" class="aligncenter size-full wp-image-1277" /></p>
<h3>Step 2</h3>
<p>With the Pen Tool (P) create a simple irregular shape as in the image<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake4.jpg" alt="" title="cake4" width="341" height="262" class="aligncenter size-full wp-image-1283" /><br />
Fill it with the gradient as in the image, no stroke.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake5.jpg" alt="" title="cake5" width="600" height="455" class="aligncenter size-full wp-image-1295" /><br />
Copy Cmd/Ctrl+C and paste the yellow shape in the back Cmd/Ctrl+B.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake6.jpg" alt="" title="cake6" width="367" height="254" class="aligncenter size-full wp-image-1299" /><br />
Keep it selected, enlarge just a little bit and shift a bit down. Adjust the gradient so that the beneath copy was a bit darker.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake7.jpg" alt="" title="cake7" width="600" height="455" class="aligncenter size-full wp-image-1300" /></p>
<h3>Step 3</h3>
<p>It is the time for our chocolate coating. First with the Pen Tool (P) create an irregular shape as in the image. Fill it with the dark chocolate color, mine is R = 48 G = 35 B = 19.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake8.jpg" alt="" title="cake8" width="367" height="270" class="aligncenter size-full wp-image-1304" /><br />
Deselect, set the fill color to  R = 98 G = 69 B = 35 and choose the Gradient Mesh Tool (U).<br />
Add (just by clicking) a mesh point as shown in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake9.jpg" alt="" title="cake9" width="367" height="270" class="aligncenter size-full wp-image-1305" /><br />
Deselect, set the fill color to R = 73 G = 54 B = 31 and add another mesh point as shown below.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake10.jpg" alt="" title="cake10" width="367" height="270" class="aligncenter size-full wp-image-1306" /><br />
And once more with the milk chocolate brown R = 123 G = 84 B = 39.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake111.jpg" alt="" title="cake11" width="367" height="270" class="aligncenter size-full wp-image-1307" /></p>
<h3>Step 4</h3>
<p>Now we will put our cupcake into a brown paper liner.<br />
With the Rectangle Tool create a rectangle. Fill it with some light brown R = 143 G = 108 B = 86. With the Gradient Mesh Tool (U) add a mesh point in the middle of the bottom edge of the rectangle. Now with the Direct Selection Tool (A)  reshape the bottom part of the rectangle so that to obtain the shape of the liner (you will have to replace the mesh points and to add some curviness by dragging the handles).<br />
Send the liner shape to back the liner shape &#8211; select and go to Object > Arrange > Send to Back or use the shortcut Shift+Cmd/Ctrl+[.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake12.jpg" alt="" title="cake12" width="600" height="501" class="aligncenter size-full wp-image-1320" /><br />
(1) We will have 19 mesh points on the horizontal edges of the liner. The middle and the two extreme ones are already there.<br />
First add two more in the middles of each half. Then try to distribute uniformly four in each quarter.<br />
(2) Still with the Gradient Mesh Tool (U) click somewhere in the bottom part of the liner (make sure you click on the mesh line) to get some more mesh points as in the image.<br />
(3) Select all the mesh points on the bottom edge and change their fill to some darker brown, mine is R = 58 G = 30 B = 18.<br />
(4) Starting from one of the extreme points select every second mesh point on the top edge and every second mesh point on the mesh line inside the liner and change its fill to the same color as used in (3).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake13.png" alt="" title="cake13" width="600" height="601" class="aligncenter size-full wp-image-1321" /></p>
<h3>Step 5</h3>
<p>We will add some shadow that comes from the cupcake.<br />
In Step 1 we created two pink shapes. Select the bottom one, copy Cmd/Ctrl+C and paste it to back Cmd/Ctrl+B, still selected enlarge it a little, drag and rotate just a little bit. Change the fill color to black.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake14.jpg" alt="" title="cake14" width="467" height="370" class="aligncenter size-full wp-image-1325" /><br />
Next select the liner. We aim to intersect the just created shadow shape with the liner shape. The problem is that the liner is not a path but a mesh object and the Pathfinder won't work in such case.<br />
Don't panic. Go to Object > Path > Offset path and set the Offset size to 0px. This way you've just created a path that has the exact shape of the outline of our mesh object.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake15.jpg" alt="" title="cake15" width="467" height="370" class="aligncenter size-full wp-image-1326" /><br />
Keep it selected. Press the Shift key and select the shadow shape.<br />
Go to Pathfinder Panel and choose Intersect.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake161.jpg" alt="" title="cake16" width="405" height="400" class="aligncenter size-full wp-image-1332" /><br />
Go to the Appearance Panel, change the blending mode to Multiply and decrease the Opacity to 18%.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake17.jpg" alt="" title="cake17" width="405" height="400" class="aligncenter size-full wp-image-1328" /></p>
<h3>Step 5</h3>
<p>For your convenience block the cupcake (to do that select it and hit Cmd/Ctrl+2).<br />
Choose the Star Tool (You will find it under the Rectangle Tool in the Tools Panel). Double click and in the dialog box set the values as: Radius 1: 200 px, Radius 2: 210 px (I increase the Radius 1 by 5%) and Points: 36.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake18.jpg" alt="" title="cake18" width="504" height="385" class="aligncenter size-full wp-image-1338" /><br />
This will give you the napkin with the right proportions. Send it to back, Shift+Cmd/Ctrl+[. Select (V) and rescale the napkin.<br />
Fill it with a light blue gray R = 236 G = 240 B = 242 , no stroke.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake19.jpg" alt="" title="cake19" width="440" height="371" class="aligncenter size-full wp-image-1341" /></p>
<h3>Step 6</h3>
<p>Create an ellipse (L) and place it symmetrically under the cupcake. Set its fill to black with no stroke, change the blending mode to Multiply and decrease the Opacity to 12%.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake20.jpg" alt="" title="cake20" width="540" height="471" class="aligncenter size-full wp-image-1345" /></p>
<h3>Step 7</h3>
<p>Create another ellipse (L) and put it between the napkin and the cupcake shadow that was created in the previous step. Make sure it is entirely within the napkin. Fill it with the black to white gradient as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake211.jpg" alt="" title="cake21" width="535" height="427" class="aligncenter size-full wp-image-1348" /><br />
Change the blending mode to Multiply and decrease the opacity a little (I set it to 80%).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake22.jpg" alt="" title="cake22" width="535" height="427" class="aligncenter size-full wp-image-1349" /></p>
<h3>Step 8</h3>
<p>It's the time for a cherry.<br />
Create a simple shape of a cherry and bring it to front Shift+Cmd/Ctrl+]. To do that either go to Object > Arrange > Bring to Front  or use the shortcut Shift + Cmd/Ctrl+].<br />
Fill it with the solid color, R = 139 G = 0 B = 55, no stroke.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake23.jpg" alt="" title="cake23" width="406" height="390" class="aligncenter size-full wp-image-1356" /><br />
Copy Cmd/Ctrl+C and paste the cherry to front Cmd/Ctrl+F. With the Gradient Mesh Tool (U) add two mesh points as in the image.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake24.jpg" alt="" title="cake24" width="406" height="390" class="aligncenter size-full wp-image-1357" /><br />
With the Direct Selection Tool A, change the fill colors of some of the mesh points as in the image (the numbers correspond to the RGB values)<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake25.jpg" alt="" title="cake25" width="342" height="329" class="aligncenter size-full wp-image-1358" /><br />
Decrease the opacity a bit (71%).<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake26.jpg" alt="" title="cake26" width="405" height="287" class="aligncenter size-full wp-image-1359" /><br />
Group the two cherry shapes, select both and press Cmd/Ctrl+G.<br />
Copy Cmd/Ctrl+C and paste Cmd/Ctrl+V the gradient shadow we used for the napkin. In the Layer panel place it above the cupcake group and below the cherry group. Position it and resize so that to obtain a nice shadow of the cherry on the chocolate cover.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake27.jpg" alt="" title="cake27" width="352" height="448" class="aligncenter size-full wp-image-1363" /></p>
<h3>Step 9</h3>
<p>Now we will create the cherry stem.<br />
(1) With the Pen Tool (P) create a simple two-points path. Set fill to none and stroke to R = 198 G = 221 B = 124. (2) Use the built-in Illustrator brushes from the Brushes panel (go to Window > Brushes). I chose the 3pt Round Calligraphic brush and set the stroke to 1,5 pt.<br />
(3) Go to Object > Path > Outline Stroke.<br />
(4) Copy the stem to front Cmd/Ctrl+C, Cmd/Ctrl+F, with the Option/Alt key on drag the stem copy a bit to the right. You should now have three copies of the stem, select the two of them that do not overlap.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake28.jpg" alt="" title="cake28" width="471" height="354" class="aligncenter size-full wp-image-1369" /><br />
(5) Go to the Pathfinder Panel and choose Intersect.<br />
(6) Apply the gradient fill as in image to the beyond (larger) part of the stem.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake29.jpg" alt="" title="cake29" width="571" height="349" class="aligncenter size-full wp-image-1373" /><br />
(7) Create a tiny ellipse as in the image. In the Layer Panel put it below the two parts of the stem.<br />
(8) With the Shift key on select the small ellipse shape and the larger part of the stem (the one with gradient fill). Co to the Pathfinder Panel and choose Unite.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake30.jpg" alt="" title="cake30" width="571" height="449" class="aligncenter size-full wp-image-1374" /><br />
(9) Create a small ellipse (L) and in the Layer Panel put it between the cherry and the twi parts of the stem. Set the fill to R = 73 G = 54 B = 31, no stroke.<br />
<img src="http://pehaa.com/wp-content/uploads/2010/02/cake31.jpg" alt="" title="cake31" width="312" height="289" class="aligncenter size-full wp-image-1381" /><br />
Your cupcake is ready!</p>
<div class="shr-publisher-1271"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F02%2Fillustrator-tutorial-create-a-yummy-vector-cupcake%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2010%2F02%2Fillustrator-tutorial-create-a-yummy-vector-cupcake%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2010/02/illustrator-tutorial-create-a-yummy-vector-cupcake/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>tutorial: Create a vector Christmas ball</title>
		<link>http://pehaa.com/2009/11/tutorial-create-a-vector-christmas-ball/</link>
		<comments>http://pehaa.com/2009/11/tutorial-create-a-vector-christmas-ball/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 21:40:52 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Christmas]]></category>
		<category><![CDATA[Decoration]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=1024</guid>
		<description><![CDATA[In this tutorial you will learn how to create a vector Christmas ball from scratch in Adobe Illustrator. In the first part of this tutorial I explain how to create a decor, in the second one how to create a 3D Christmas ball. You may download the source file. I use the CS4 version but [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>In this tutorial you will learn how to create a vector Christmas ball from scratch in Adobe Illustrator. In the <a href="http://pehaa.com/2009/11/tutorial-create-a-vector-christmas-ball/#part1">first part</a> of this tutorial I explain how to create a decor, in the <a href="http://pehaa.com/2009/11/tutorial-create-a-vector-christmas-ball/#part2">second one</a> how to create a 3D Christmas ball.<br />
<img class="alignright size-full wp-image-1084" title="xmas_ball_preview" src="http://pehaa.com/wp-content/uploads/2009/11/xmas_ball_preview2.jpg" alt="xmas_ball_preview" width="600" height="629" /><br />
You may download the source file. I use the CS4 version but the file is back-saved to CS2.</p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2009/11/xmas_ball_tutorial.ai.zip">Free source file: Ai CS2+  (ai.zip 5,3 MB) </a></h3>
<p><small><br />
</small></div>
<h2><a name="part1">Part 1 DECOR</a></h2>
<h3>Step 1</h3>
<p>Choose the rectangle tool (M). Alt-click and set the width as 18px and height as 100 px. Fill the rectangle with R = 206 G = 21 B = 82 and set the stroke to none.<br />
Copy Cmd/Ctrl+C your rectangle and paste it in front Cmd/Ctrl+F. Next holding the Shift key drag the copy 10 px down (don&#8217;t worry if you do a bit more).<br />
Having your copy still selected to to Object &gt; Stylize &gt; Round Corners and set the radius to 10 px. Next expand it (Object &gt; Expand Appearance).<br />
Select both rectangles and choose Unite from the Pathfinder Panel.</p>
<p><img class="alignright size-full wp-image-1027" title="symbol1" src="http://pehaa.com/wp-content/uploads/2009/11/symbol1.jpg" alt="symbol1" width="600" height="634" /></p>
<h3>Step 2</h3>
<p>Go to Effect &gt; Distort &amp; Transform &gt; Transform&#8230; and create 10 copies of the stylized rectangle with the settings as in the image below.</p>
<p>With your shapes still selected go tho Object &gt; Expand Appearance. Next immediately ungroup your objects Shift+Cmd/Ctrl+G (or go to Object &gt; Ungroup).</p>
<p>Select every second shape, go to the Appearance panel and set the Blending mode to Multiply and Opacity to 60%.</p>
<p><img class="alignright size-full wp-image-1028" title="symbol2" src="http://pehaa.com/wp-content/uploads/2009/11/symbol2.jpg" alt="symbol2" width="600" height="769" /></p>
<h3>Step 3</h3>
<p>Select all your shapes, again go to Effect &gt; Distort&amp; Transform &gt;  Transform&#8230; and create an inverted copy with the settings as in the image.<br />
Make sure to expand your selection (Object &gt; Expand Appearance).</p>
<p><img class="alignright size-full wp-image-1029" title="symbol3" src="http://pehaa.com/wp-content/uploads/2009/11/symbol3.jpg" alt="symbol3" width="600" height="614" /></p>
<h3>Step 4</h3>
<p>Select and drag your rectangles to the Symbols Panel.</p>
<p><img class="alignright size-full wp-image-1030" title="symbol4" src="http://pehaa.com/wp-content/uploads/2009/11/symbol4.jpg" alt="symbol4" width="600" height="471" /></p>
<h2><a name="part2">Part 2 BALL</a></h2>
<h3>Step 5</h3>
<p>To create the ball you may use the top right shape from the image as a template. Then it is most convenient to place it in its own layer, double-click the layer in the Layers panel, select Template, and click OK. Create a new layer Cmd/Ctrl+L and &#8230; just retrace it.</p>
<p>Alternatively you may create the half-ball shape starting from the simple shapes. First draw a circle using the ellipse tool (L) and holding down the Shift key. Next with the Rectangle tool (M) create a rectangle and place it as in the image. With the direct selection tool (A) drag the bottom right corner a bit to the right and upward so that it meets the circle. To obtain the smooth transition make sure that the handles are  parallel (or almost parallel) to the tangent line to the circle in the intersection point.<br />
Select both shapes, go to Pathfinder Panel, choose Unite, select the unwanted parts with the Direct Selection Tool (A) and remove them.<br />
<img class="alignright size-full wp-image-1039" title="ball_outline" src="http://pehaa.com/wp-content/uploads/2009/11/ball_outline.jpg" alt="ball_outline" width="600" height="780" /></p>
<h3>Step 6</h3>
<p>Set the fill to white, stroke to none and go to Effect &gt; 3D &gt; Revolve. Set the parameters as in the image. To set the shading click &#8216;More Options&#8217;. Use &#8216;Custom&#8217; as the Shading Color and set the color to R = 226 G = 68 B = 147.</p>
<p><img class="alignright size-full wp-image-1045" title="revolve1" src="http://pehaa.com/wp-content/uploads/2009/11/revolve1.jpg" alt="revolve1" width="600" height="648" /></p>
<p>Here is what you should obtain:</p>
<p><img class="alignright size-full wp-image-1037" title="ball1" src="http://pehaa.com/wp-content/uploads/2009/11/ball1.jpg" alt="ball1" width="600" height="475" /></p>
<h3>Step 7</h3>
<p>In your 3D Revolve Options panel click Map Art&#8230; Go to the third surface and choose xmas_ball in the Symbol field (the left upper corner). Resize and reshape our symbol as in the image.</p>
<p><img class="alignright size-full wp-image-1044" title="mapping" src="http://pehaa.com/wp-content/uploads/2009/11/mapping.jpg" alt="mapping" width="600" height="414" /></p>
<p>Here is what we get.</p>
<p><img class="alignright size-full wp-image-1038" title="ball2" src="http://pehaa.com/wp-content/uploads/2009/11/ball2.jpg" alt="ball2" width="600" height="504" /></p>
<h3>Step 8</h3>
<p>Now we will add some shading to our ball. Choose the outline shape, copy it Cmd/Ctrl+C and paste in front Cmd/Ctrl+F. Go to the Appearance Panel. Now, we will change the 3D Revolve settings.<br />
First go to the Map Art&#8230; and chose Clear All.</p>
<p><img class="alignright size-full wp-image-1047" title="shading_map" src="http://pehaa.com/wp-content/uploads/2009/11/shading_map.jpg" alt="shading_map" width="600" height="463" /></p>
<p>Next change the settings as below:</p>
<p><img class="alignright size-full wp-image-1040" title="shading1" src="http://pehaa.com/wp-content/uploads/2009/11/shading1.jpg" alt="shading1" width="600" height="643" /></p>
<p>Here is the result.</p>
<p><img class="alignright size-full wp-image-1041" title="shading2" src="http://pehaa.com/wp-content/uploads/2009/11/shading2.jpg" alt="shading2" width="600" height="480" /></p>
<h3>Step 9</h3>
<p>Change the blending mode to Multiply and decrease the Opacity to 52%</p>
<p><img class="alignright size-full wp-image-1042" title="shading3" src="http://pehaa.com/wp-content/uploads/2009/11/shading3.jpg" alt="shading3" width="600" height="474" /></p>
<h2><a name="part3">Part 3 HANGING</a></h2>
<h3>Step 10</h3>
<p>Now, we will create the cap of the ball. In a new layer (Cmd/Ctrl+L) create a rectangle with the Rectangle Tool (M). Fill it with light beige R = 229 G = 227 B = 214, no stroke. Choose the Direct Selection Tool (A) and  convert the upper right corner. Next remove the bottom part and the left part.</p>
<p><img class="alignright size-full wp-image-1051" title="cap1" src="http://pehaa.com/wp-content/uploads/2009/11/cap1.jpg" alt="cap1" width="600" height="349" /></p>
<h3>Step 11</h3>
<p>Go to Effect &gt; 3D &gt; Revolve.</p>
<p><img class="alignright size-full wp-image-1052" title="cap3D" src="http://pehaa.com/wp-content/uploads/2009/11/cap3D.jpg" alt="cap3D" width="600" height="634" /><br />
Here is what you should get.<br />
<img class="alignright size-full wp-image-1053" title="cap3Dp" src="http://pehaa.com/wp-content/uploads/2009/11/cap3Dp.jpg" alt="cap3Dp" width="600" height="255" /></p>
<h3>Step 12</h3>
<p>Now, exactly as we did for the ball, we will add some shading. Copy Cmd/Ctrl+C and paste the cup in front Cmd/Ctrl+F. Change the fill color to white. Go to the Appearance Panel and change the 3D Revolve settings.<br />
<img class="alignright size-full wp-image-1055" title="cap_shading" src="http://pehaa.com/wp-content/uploads/2009/11/cap_shading.jpg" alt="cap_shading" width="600" height="636" /><br />
Next change the blending mode to Multiply and decrease the opacity to 30%.<br />
<img class="alignright size-full wp-image-1056" title="cap_shadingp" src="http://pehaa.com/wp-content/uploads/2009/11/cap_shadingp.jpg" alt="cap_shadingp" width="600" height="472" /></p>
<h3>Step 13</h3>
<p>Replace and resize (if necessary) the cap shape so that it works well with the ball shape.</p>
<p><img class="alignright size-full wp-image-1054" title="cap_place" src="http://pehaa.com/wp-content/uploads/2009/11/cap_place.jpg" alt="cap_place" width="600" height="341" /></p>
<h3>Step 14</h3>
<p>Copy the cap shading Cmd/Ctrl+C and paste it in front Cmd/Ctrl+F. For your convenience set the cap and its shading invisible and lock them for a while.<br />
We will expand this object so to speed up the process go to the Appearance Panel and in 3D Revolve options (More Options&#8230;) choose No Shading. Change the fill color from white  to any more visible.<br />
Go to Object &gt; Expand Appearance. Next go to the Pathfinder Panel and choose Unit.<br />
<img class="alignright size-full wp-image-1057" title="clipping1" src="http://pehaa.com/wp-content/uploads/2009/11/clipping1.jpg" alt="clipping1" width="600" height="680" /></p>
<h3>Step 15</h3>
<p>With the Pen Tool (P) create the shape about as in the image. Make sure that its bottom boarders are all above the bottom boarders of the cap shape.</p>
<p><img class="alignright size-full wp-image-1058" title="clipping2" src="http://pehaa.com/wp-content/uploads/2009/11/clipping2.jpg" alt="clipping2" width="600" height="429" /></p>
<h3>Step 16</h3>
<p>Select the two shapes  and choose Divide from your Pathfinder Panel. Ungroup immediately Shift+Cmd/Ctrl+G and remove the unwanted parts.</p>
<p><img class="alignright size-full wp-image-1059" title="clipping3" src="http://pehaa.com/wp-content/uploads/2009/11/clipping3.jpg" alt="clipping3" width="600" height="644" /></p>
<h3>Step 17</h3>
<p>Unlock and set visible the two cap parts. Select the whole layer and  go to Object &gt; Clipping Mask &gt; Make or use the keyboard shortcut Cmd/Ctrl+7.</p>
<p><img class="alignright size-full wp-image-1060" title="clipping4" src="http://pehaa.com/wp-content/uploads/2009/11/clipping4.jpg" alt="clipping4" width="600" height="573" /></p>
<h3>Step 18</h3>
<p>Now we will create the shadow that the cap drops on the ball. In fact it is not very visible so you may omit this step.</p>
<p>Create a new layer Cmd/Ctrl+L, name it Shadow and put it between the ball and the cap layers.<br />
Alt-drag the the ball shading from the Ball layer. In the Appearance Panel change the 3D Revolve options to No Shading and choose some fill color. Go to Object &gt; Expand Appearance and next to Pathfinder Panel in order to choose Unite. (Yes, you have already done it once).<br />
Next alt-drag the Clipping mask shape from the Cap layer to the  Shadow layer. Choose some fill color.<br />
<img class="alignright size-full wp-image-1065" title="shadow1" src="http://pehaa.com/wp-content/uploads/2009/11/shadow1.jpg" alt="shadow1" width="600" height="401" /></p>
<h3>Step 19</h3>
<p>Select the the copy of the cap clipping mask, move it down and resize a bit. Once you are satisfied with its shape and position Shift-click the ball shape so that both shapes are selected. Go to the Pathfinder Panel and choose Intersect.</p>
<p><img class="alignright size-full wp-image-1066" title="shadow2" src="http://pehaa.com/wp-content/uploads/2009/11/shadow2.jpg" alt="shadow2" width="600" height="579" /></p>
<h3>Step 20</h3>
<p>Set the blending mode to Multiply and decrease the opacity (34%)</p>
<p><img class="alignright size-full wp-image-1067" title="shadow3" src="http://pehaa.com/wp-content/uploads/2009/11/shadow3.jpg" alt="shadow3" width="600" height="331" /></p>
<h2><a name="part3"></a></h2>
<h3>Step 21</h3>
<p>Now we will create the tiny hook. With the Ellipse tool (L) draw an Ellipse. Drag a little bit the handles of the upper point with the Direct Selection Tool (A).<br />
Next go to Object &gt; Path &gt; Offset Path&#8230; Make sure that the Preview is checked and attune the Offset value (keep it negative). The appropriate value will vary depending on your ball size.<br />
Select both paths and choose Minus Front in the Pathfinder Panel.<br />
Starting from the point a bit above the hook top point draw the Ellipse (L) holding down the Alt-key. Intersect it with the hook (Pathfinder).</p>
<p><img class="alignright size-full wp-image-1073" title="top0" src="http://pehaa.com/wp-content/uploads/2009/11/top0.jpg" alt="top0" width="600" height="672" /></p>
<h3>Step 22</h3>
<p>Play a little with the hook shape. Next apply the gradient fill with the settings as in the image.</p>
<p><img class="alignright size-full wp-image-1072" title="top" src="http://pehaa.com/wp-content/uploads/2009/11/top.jpg" alt="top" width="600" height="555" /></p>
<h3>Step 23</h3>
<p>To finish you only have to add a tiny string (I clicked twice holding down the Shift key with the Pen Tool (P)). Add some background that you like in the new layer. Move that layer to the very bottom. You may also want to add some shading. Create an ellipse (L) and fill it with the black to white radial gradient as in the image. Set the blending mode as Multiply decrease the Opacity to 30%&#8230;. and MERRY CHRISTMAS..</p>
<p><img class="alignright size-full wp-image-1078" title="finishing" src="http://pehaa.com/wp-content/uploads/2009/11/finishing.jpg" alt="finishing" width="600" height="369" /></p>
<div class="shr-publisher-1024"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F11%2Ftutorial-create-a-vector-christmas-ball%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F11%2Ftutorial-create-a-vector-christmas-ball%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2009/11/tutorial-create-a-vector-christmas-ball/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>ultra-easy pattern making &#8211; illustrator tutorial</title>
		<link>http://pehaa.com/2009/07/ultra-easy-pattern-making-illustrator-tutorial/</link>
		<comments>http://pehaa.com/2009/07/ultra-easy-pattern-making-illustrator-tutorial/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:31:13 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[swatches]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=705</guid>
		<description><![CDATA[In this post I will show you how to quickly create a seamless simple geometric pattern swatch in Adobe Illustrator. In the last (extra) step I will show you a very simple way to 'export' it as a pattern to Photoshop.
First, have a look at what we aim to obtain (this pattern is inspired by the fabric of my favorite tunic).]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>In this post I will show you how to quickly create a seamless simple geometric pattern swatch in Adobe Illustrator. In the last (extra) step I will show you a very simple way to &#8216;export&#8217; it as a pattern to Photoshop.</p>
<p>First, have a look at what we aim to obtain (this pattern is inspired by the fabric of my favorite tunic).<br />
<div id="attachment_759" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/pattern_preview.png" alt="Vector pattern swatch - preview" title="pattern_preview" width="600" height="300" class="size-full wp-image-759" /><p class="wp-caption-text">Vector pattern swatch - preview</p></div></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2009/07/pattern_tut.ai.zip">Free source file: Ai CS2+  (ai.zip 0,1 MB) </a></h3>
<p><small><br />
</small></div>
<p>1. With the Rectangle Tool (M) create a rectangle 20 px (width) x 60 px (height). Set stroke to none and fill to black.</p>
<p>2. With the black rectangle selected go to Effect &gt; Distort &amp; Transform &gt; Transform&#8230; and choose the settings as below. Next go to Object menu and Expand Appearance.<br />
Ungroup the bottom rectangles Cmd/Ctrl+Shift+G.<br />
<div id="attachment_711" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/four_rectangles.png" alt="Multiply your rectangle by four" title="four_rectangles" width="600" height="492" class="size-full wp-image-711" /><p class="wp-caption-text">Multiply your rectangle by four</p></div><br />
3. Once the rectangles are ungrouped you can change their fill colors. I used:<br />
<div id="attachment_716" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/colors.png" alt="Color swatches" title="colors" width="600" height="295" class="size-full wp-image-716" /><p class="wp-caption-text">Color swatches</p></div></p>
<p>4. With the Direct Selection Tool (A) select the the top parts of your rectangles (so that to include all top apices) and drag it a little to the right holding down the Shift key (drag as you like, don&#8217;t worry &#8211; you can change it any time). Alternatively you can group your rectangle, select the group and use Object > Transform > Shear&#8230;<br />
<div id="attachment_735" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/dragging.png" alt="Shearing the rectangles" title="dragging" width="600" height="232" class="size-full wp-image-735" /><p class="wp-caption-text">Shearing the rectangles</p></div></p>
<p>5. Group your rectangles Cmd/Ctrl+G and go to Effect  &gt; Distort &amp; Transform &gt; Transform&#8230; and choose the settings as below <div id="attachment_738" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/reflection.png" alt="Applying reflection" title="reflection" width="600" height="432" class="size-full wp-image-738" /><p class="wp-caption-text">Applying reflection</p></div></p>
<p>7. Again go to  Effect  &gt; Distort &amp; Transform &gt; Transform&#8230; Choose Apply New Effect and the settings as follows:<br />
<div id="attachment_746" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/copy2right.png" alt="A copy to the right" title="copy2right" width="600" height="462" class="size-full wp-image-746" /><p class="wp-caption-text">A copy to the right</p></div></p>
<p>8. And once again (yes to Apply New Effect) and:</p>
<div id="attachment_747" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/copy2left.png" alt="A copy to the left" title="copy2left" width="600" height="462" class="size-full wp-image-747" /><p class="wp-caption-text">A copy to the left</p></div>
<p>9. Creat a rectangle 80 px (width) x 120 px (height) (80 = number of colorful rectangles x width of a single rectangle; 120 = 2 x height of a single rectangle).  Set its fill and stroke to none and send it to the very bottom of the layer Cmd/Ctrl+Shift+[. Select all. In the Align Panel choose: (1) Horizontal Align Center and (2) Vertical Align Top.<br />
<div id="attachment_755" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/07/bottom_rectangle1.png" alt="Creating bottom rectangle" title="bottom_rectangle" width="600" height="529" class="size-full wp-image-755" /><p class="wp-caption-text">Creating bottom rectangle</p></div></p>
<p>10. Now, drag your selection (make sure the whole layer is selected) to the Swatches Panel or go to Edit > Define Pattern&#8230; It&#8217;s done!</p>
<p>11. If you want to use this pattern in Photoshop, here is how to do it ultra-quickly: with a Rectangle Tool (M) create a rectangle 80 px x 120 px and fill it with your pattern (no stroke). Select it, copy and paste in Photoshop into a file that has the same canvas size. Go to Edit > Define Pattern&#8230; </p>
<p>Below: the tunic inspiration. Thnx to <a href="http://pinkonhead.com">Pinkonhead</a> for taking the photo   and to <a href="http://vainsfaktory.wordpress.com/">Joe Vains</a> for suggesting this idea ;) :)</p>
<p>I hope you find this tutorial useful, all comments are highly appreciatied. Please share and bookmark!<br />
<img src="http://pehaa.com/wp-content/uploads/2009/07/tunic1.jpg" alt="tunic" title="tunic" width="600" height="900" class="alignleft size-full wp-image-767" /></p>
<div class="shr-publisher-705"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F07%2Fultra-easy-pattern-making-illustrator-tutorial%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F07%2Fultra-easy-pattern-making-illustrator-tutorial%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2009/07/ultra-easy-pattern-making-illustrator-tutorial/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>tutorial: Create and color an eco easter egg in Adobe Illustrator</title>
		<link>http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/</link>
		<comments>http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 05:41:54 +0000</pubDate>
		<dc:creator>PeHaa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[illustration]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://pehaa.com/?p=432</guid>
		<description><![CDATA[In this tutorial you will learn how to prepare an eco colored egg for easter. Eco for there are no artificial colorants used. I wanted to recreate the look of a traditional polish egg: cooked in onion rinds with wax decors to be scratched off afterwards. In the <a href="http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/#part1">first part</a> of this tutorial I explain how to create a decor, in the <a href="http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/#part2">second one</a> how to create a 3D naturaly looking egg. ]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>In this tutorial you will learn how to prepare an eco colored egg for easter. Eco for there are no artificial colorants used. I wanted to recreate the look of a traditional polish egg: cooked in onion rinds with wax decors to be scratched off afterwards. In the <a href="http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/#part1">first part</a> of this tutorial I explain how to create a decor, in the <a href="http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/#part2">second one</a> how to create a 3D naturaly looking egg.<br />
<div id="attachment_422" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/final_prev.png" alt="Preview: final result" title="final_prev" width="600" height="470" class="size-full wp-image-422" /><p class="wp-caption-text">Preview: final result</p></div></p>
<div class="download">
<h3><a href="http://pehaa.com/wp-content/uploads/2009/04/egg_tutorial.zip">Free source file: Ai CS2+  (ai.zip 0,83 MB) </a></h3>
<p><small><br />
</small></div>
<h2><a name="part1">Part 1: Decor</a></h2>
<h3>Step 1: Creating a custom brush</h3>
<p>Create a custom brush to be used for the decor. I call it a nail brush. Below you can find the template of mine (you can aslo create this shape combining two ellipses, then go to Pathfinder, choose Add to Shape Area and extract afterwards).</p>
<div id="attachment_424" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/nail_brush.png" alt="nail brush" title="nail_brush" width="600" height="174" class="size-full wp-image-424" /><p class="wp-caption-text">nail brush</p></div>
<p>Using the Selection Tool (V) drag your shape to the Brushes panel and choose the settings as below:</p>
<div id="attachment_418" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/create_brush.png" alt="Create a nail brush" title="create_brush" width="600" height="659" class="size-full wp-image-418" /><p class="wp-caption-text">Create a nail brush</p></div>
<h3>Step 2: Creating a wax decor</h3>
<p>Draw a straight line segment, apply the nail brush and go to Effect > Distort &#038; Transform > Transform&#8230;</p>
<div id="attachment_428" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/symbol1a.png" alt="Creating decor (1)" title="symbol1a" width="600" height="587" class="size-full wp-image-428" /><p class="wp-caption-text">Creating decor (1)</p></div>
<p>Again go to Effect > Distort &#038; Transform > Transform&#8230; and choose Apply New Effect when the dialog box pops up.</p>
<p><img src="http://pehaa.com/wp-content/uploads/2009/04/apply_n_e.png" alt="apply_n_e" title="apply_n_e" width="554" height="276" class="aligncenter size-full wp-image-416" /></p>
<p>Set the value of horizontal move so that to recreate what you can see below (that may vary depending on the initial size of your line segment).</p>
<div id="attachment_431" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/transforms2.png" alt="Creating decor (2)" title="transforms2" width="600" height="333" class="size-full wp-image-431" /><p class="wp-caption-text">Create decor (2)</p></div>
<p>Draw another vertical line segment of the same length above the left border of the first circle of nails, apply the nail brush, go to Effect > Distort &#038; Transform > Transform&#8230; and again set the value of horizontal move and number of copies so that to recreate what you can see below.</p>
<div id="attachment_429" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/transform2.jpg" alt="Creating decor (3)" title="transform2" width="600" height="442" class="size-full wp-image-429" /><p class="wp-caption-text">Creating decor (3)</p></div>
<p>Then drag it down holding alt/option key (to make a copy) and Shift (to drag it vertically) key</p>
<div id="attachment_430" class="wp-caption aligncenter" style="width: 513px"><img src="http://pehaa.com/wp-content/uploads/2009/04/transform3.jpg" alt="Creating decor (4)" title="transform3" width="503" height="210" class="size-full wp-image-430" /><p class="wp-caption-text">Creating decor (4)</p></div>
<p>You don&#8217;t have to be precise as far as the number of copies here (as you can see I was not) since the left and right edges will not be visible.  </p>
<h3>Step 3: Turning the decor into a symbol</h3>
<p>Select your three objects, go to Object menu and expand them. Set stroke color to none and fill color to white. Drag the selection to the Symbols panel and choose Graphic:</p>
<div id="attachment_419" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/create_symbol.png" alt="Creating symbol" title="create_symbol" width="600" height="486" class="size-full wp-image-419" /><p class="wp-caption-text">Creating symbol</p></div>
<p>Now, it&#8217;s time to create an egg.</p>
<h2><a name="part2">Part 2: Creating a 3D egg object</a></h2>
<h3>Step 4: Creating an egg shape to be revoled</h3>
<p>You may use the image below as a template to draw the shape of an egg. </p>
<div id="attachment_421" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/egg_template.jpg" alt="Egg shape template" title="egg_template" width="600" height="667" class="size-full wp-image-421" /><p class="wp-caption-text">Egg shape template</p></div>
<p>To trace it, make sure the image is in its own layer, double-click the layer in the Layers panel, select Template, and click OK:</p>
<p><img src="http://pehaa.com/wp-content/uploads/2009/04/set_template1.png" alt="set_template1" title="set_template1" width="546" height="274" class="aligncenter size-full wp-image-426" /></p>
<p> Easiest way is to draw an elipse starting in the center of the template egg &#8211; hold the alt/option key. Then reshape your ellipse using the direct selection tool (A).</p>
<p>With the selection tool (A) select the right half or your egg and delete it. We are about to create an eco egg which means we only use purely natural colorants &#8211; the onion rinds in this case. To obtain the onion rinds effect set the stroke color to R = 165 G = 78 B = 61. Make sure you set fill color to none.</p>
<div id="attachment_417" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/create2revolve_shape.jpg" alt="Shape to be revolved" title="create2revolve_shape" width="600" height="453" class="size-full wp-image-417" /><p class="wp-caption-text">Shape to be revolved</p></div>
<h3>Step 5: From 2D to 3D</h3>
<p>Go to Effect > 3D > Revolve. Click More Options to view the complete list of options. On the screenshot below you can see my choice of settings: </p>
<div id="attachment_425" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/rotated_egg1.png" alt="Rotated egg " title="rotated_egg1" width="600" height="650" class="size-full wp-image-425" /><p class="wp-caption-text">Rotated egg </p></div>
<h3>Step 6: Mapping Art</h3>
<p>Choose the Map Art button and go to Surface 2, choose the eco veggtor symbol and place it on the grey area. Check the preview to properly position the symbol. </p>
<div id="attachment_423" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/map_art.jpg" alt="Mapping art" title="map_art" width="600" height="510" class="size-full wp-image-423" /><p class="wp-caption-text">Mapping art</p></div>
<h3>Step 7: Adding shade on the egg surface</h3>
<p>Duplicate the revolved object (cmd/ctrl+C) and paste it to the front (cmd/ctrl+F). Change the stroke color to white (fill is still none), blending mode to Multiply and Opacity to 60%. Double click the Apperance panel, first go to Map Art and click the Clear All button &#8211; that removes art from all surfaces. Press OK than go to More Option, below are my settings:</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/shadow1.jpg" alt="Adding shadow to the egg surface" title="shadow1" width="600" height="687" class="size-full wp-image-427" /><p class="wp-caption-text">Adding shadow to the egg surface</p></div>
<h3>Step 9: Adding background and shadow underneath the egg</h3>
<p>Create an ellipse starting from the bottom peak of your egg. Set it to the back shift+cmd/ctrl+[. Fill the ellipse with a radial black to white gradient and adjust the gradient settings as below:</p>
<div id="attachment_420" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/down_shadow.jpg" alt="Adding shadow underneath the egg" title="down_shadow" width="600" height="513" class="size-full wp-image-420" /><p class="wp-caption-text">Adding shadow underneath the egg</p></div>
<p>Set blending mode to Multiply and decrease the Opacity a bit. If you use Illustrator  CS 4 you may use a black to transparent gradient instead, then you do not have to  change the blending mode.<br />
Now set the backround color, create a rectangle and set it to  back shift+cmd/ctrl+[. I set the fill color to R = 157 G = 178 B = 178. The font I used are Skia Regular and Santa Fe LET. </p>
<div id="attachment_422" class="wp-caption aligncenter" style="width: 610px"><img src="http://pehaa.com/wp-content/uploads/2009/04/final_prev.png" alt="Preview: final result" title="final_prev" width="600" height="470" class="size-full wp-image-422" /><p class="wp-caption-text">Preview: final result</p></div>
<p>I hope you found this tutorial useful &#8211; it&#8217;s my first one &#8211; some feedback much appreciated! So are tweets/diggs/stumbling&#8230; :)</p>
<div class="shr-publisher-432"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F04%2Ftutorial-create-and-color-an-ai-eco-easter-egg%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fpehaa.com%2F2009%2F04%2Ftutorial-create-and-color-an-ai-eco-easter-egg%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://pehaa.com/2009/04/tutorial-create-and-color-an-ai-eco-easter-egg/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
