This final post in the POV-ray series deals with an attempt to create a scene. I want to draw some pysanky eggs on a board with pegs in it for the eggs to stand on.
For the wood texture of the board I've used T_Wood10 from the POV-ray woods.inc library. This requires the inclusion of the woods.inc library in the Python code:
file = pov.File('test5.pov', 'colors.inc', 'woods.inc')
test5.pov is my output file; colors.inc and woods.inc are my include files.
Because the api deals exclusively with text, the wood texture will have to be put in as a string literal complete with POV-ray's curly brackets:
testblock = pov.Box((-15, -6.50, -18), (15, -2.00, -3),
texture = '{T_Wood10}')
As for the scene itself:
This is good for illustrating the scene's design, but it's not very realistic. The eggs look like they're wrapped in cellophane. I tried introducing some focal blur:
cam = pov.Camera(location = (0, 5, -35), look_at = (0, 0, 2),
focal_point = (0, 2, -10), aperture = 0.4, blur_samples = 20)
focal_point = (0, 2, -10), aperture = 0.4, blur_samples = 20)
This looks more realistic, but blurry. It would probably serve a remote corner of a scene better rather than the main object.
At this point it's really the nuances of POV-ray scene creation that will make a difference. The purpose of this post and the last three was to show that you can do some fun things with POV-ray from Python.
Lastly, and just for fun, some wooden eggs (textures textures.inc/Cork, woods.inc T_Wood10 and T_Wood14):