Wednesday, April 21, 2010

Cover art design with PovRay 4

Here is a sample of what you can generate with a simple Pov-Ray script.


Click on the image to see a higher resolution picture.


This is basically the same image that I showed in my blog a few days ago. But I increased the number of reflecting spheres and assigned them random locations in the scene-space. Basically, I just kept tweaking a stock script for a sphere on a checkered plane, until I got what I wanted.

Here's the entire script that produced the image rendered by Pov-Ray.

global_settings { assumed_gamma 1.0 }

camera {
location <5.0, -12.0, 2.0>
up z sky z
look_at <0.0, 0.0, 0.5>
angle 40
}

sky_sphere {
pigment {
gradient z
color_map {

[0.2 rgb 0.2]
[0.2 rgb 0.2]

}
}
}

light_source {
<3, 1, 2>*1000
color rgb <2.2, 1.8, 1.5>
}

plane {
z, 0
texture {
pigment {
checker
color rgb 1, color rgb 0
}
}
}

#macro Sphere(Pos, Radius)
sphere {
<Pos.x, Pos.y, -1 + Radius*3.3>, Radius
texture {
pigment { color rgb 1 }
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection 0.8
}
}
}
#end

#local Cnt=0;
#local Seed=seed(0);

#while (Cnt<10000)
Sphere(
-100+<rand(Seed), rand(Seed)>*200,
0.3+pow(rand(Seed),2)*0.8
)
#local Cnt=Cnt+1;
#end

If you try to run this .pov script in Pov-Ray, you'll find that the image looks a little different with each run. That's what happens when you use a random function.

- © 2010 Jules Berman

tags: graphic design, 3-D rendering, pov-ray, povray, cover art, machiavelli's laboratory
In June, 2014, my book, entitled Rare Diseases and Orphan Drugs: Keys to Understanding and Treating the Common Diseases was published by Elsevier. The book builds the argument that our best chance of curing the common diseases will come from studying and curing the rare diseases.



I urge you to read more about my book. There's a generous preview of the book at the Google Books site. If you like the book, please request your librarian to purchase a copy of this book for your library or reading room.