previous   Lettuce on ToastAn Artificial Neuron   next


Cheese and Lettuce on Toast

This example illustrates how to merge paths. It extends the previous example ||. The aim is to create the image shown in Figure 11.15.

  1. Load the image you created in the ||, using the File->Open... menu item, or clicking on the load image button.

  2. To create the slice of cheese, select the ||, and set the || to yellow. Make a rectangle, as illustrated in Figure 11.12.

    cheese1
    Figure 11.12: Cheese and Lettuce on Toast Example--A Filled Rectangle
    This slice of cheese is going to have holes in it, and we need to be able to see the lettuce and toast thru the holes. Since this is not a uniform color, we can't just, say, put green ellipses on top of the cheese as this won't look right. Instead, we are going to create some ellipses, and then merge them into the yellow rectangle. To do this, first select the ||, and create some ellipses on top of the yellow rectangle (Figure 11.13).

    cheese2
    Figure 11.13: Cheese and Lettuce on Toast Example--Adding Ellipses

  3. Now || all the ellipses you created in the previous step and the yellow rectangle (Figure 11.14(a)) and || them using the Transform->Merge Paths menu item (Figure 11.14(b)). If the ellipses remain filled, check to make sure you have the || set to even-odd. (Alternatively, you can use the Transform->Subtract Paths menu item, in which case you don't need to worry about the winding rule.)

    cheese3a
    (a)
    cheese3b
    (b)
    Figure 11.14: Cheese and Lettuce on Toast Example--merging paths: (a) paths selected; (b) paths merged into a single path.

cheesefinal
Figure 11.15: Cheese and Lettuce on Toast Example--Completed Image


previous   Lettuce on ToastAn Artificial Neuron   next