Generating Flowers
All gardens have flowers of one sort or another. For this garden, we generated 7 different clusters of flowers that could be used in the garden. Generating flowers is rather easy. Each flower is generated to obtain an interesting color and shape.
For diversity, I used Ken Tyler's excellent "kolors.inc" file to obtain many shades of each color. If you examine the red flowers on the left, you will see that all the reds used are not the same. A simple "#switch" setup was used to apply the color for these parts. A random loop provided the variable for selection of the color for each petal. In the example below, the "#switch" section is high-lighted. Notice the variable CO is used to determine the color that will be selected. The "#switch" occurs within the scope of the cylinder definition and determines what "color" will be associated with that particular petal. |
Example: White/Pink Flower Bud | |
#declare Flower4=union{ // another mum-like flower sphere{<0,0,0> .01 scale <1,.35,1> translate<0,.002,0> texture{pigment{color Orange}}} sphere{<0,0,0> .009 scale <1,.36,1> translate<0,.0025,0> texture{pigment{color Orange1}}} sphere{<0,0,0> .01 scale <1,.5,1> translate<0,-.005,0> texture{pigment{color DarkGreen}}} cone{<0,0,0> .01 <0,-.018,0> .0035 texture{pigment{color DarkGreen}}} sphere{<0,-.018,0> .0035 texture{pigment{color DarkGreen}}} #declare Count=0; #while (Count<360) #declare Y1=rand(S1)*-.0045; #declare ZS=rand(S1)*1+2; #declare XS=rand(S1)*.25+.25; #declare ZR=rand(S1)*90-45; #declare XR=rand(S1)*-90+40; #declare CO=int(rand(S1)*6)+1; cylinder{<0,0,0><0,.0001,0> .005 translate<0,Y1,.005> rotate<0,0,ZR> scale <XS,1,ZS> rotate<XR,Count,0> #switch (CO) #case (1) texture{pigment{color MistyRose}} #break #case (2) texture{pigment{color MistyRose1}} #break #case (3) texture{pigment{color MistyRose2}} #break #case (4) texture{pigment{color MistyRose3}} #break #case (5) texture{pigment{color MistyRose4}} #break #case (6) texture{pigment{color MistyRose}} #break #end // switch (CO) } // cylinder #declare Count=Count+rand(S1)*2; #end // while } // Flower4 |
THE BLACK Background
You will notice that all the images are similar and generated on a black background. Notice what happens when you make the background transparent.
In the same way that this image shows the background colors through in this web page example, POV will do for us when we use the "image_map" macro and the transparent settings.
Once we have an image generated it can be converted to a GIF file and then used as an image map in our picture.
© 1999, Robert J Becraft, All Rights Reserved.