|
|
JK wrote in message <35E6C2E7.9961E9D9@hotmail.com>...
>
>
>Zach Bagnall wrote:
>
>> Hi all,
>>
>> does anyone have any idea how to reproduce the reflective pattern
>> on the bottom of a compact disc?
>>
>> Zach.
>> -----------------------------------------------------------
>> Zach Bagnall | web design 09-817-3230
>> zbweb.base.org
>> effective websites for small business bag### [at] ihugconz
>> -----------------------------------------------------------
>
>Some suggestions:
>1. It's cheating, but you could use an image map.
>2. Have you tried iridiscence (the irid keyword). I've not used this
>feature very often, but it creates those rainbow-like textures, so
>perhaps if you get it just right, it'll look good. I don't know for
>sure, though...
>
>JK
>
I've originally tried iridescence, but it does not produce the nice, sharp
rainbow
radiating from the center of the disc. My solution was to union a very, very
thin
cylinder of the same diameter as the body of the disc, on top of the disc. I
gave the thin disc a radial pattern with a color map of the rainbow. The
radial pattern repeats 12 times (frequency 12) so that the color map cycles
once each 30 degrees. Then, I
take two radial slices out of the thin disc so that there is one rainbow
cycle in each slice. This fragment of POV source shows how the texture and
the thin cylinder are
set up:
First, the texture:
#declare T_Diffraction = texture
{
pigment
{ radial
frequency 12
ramp_wave
color_map
{
[0.000 color rgbt <1.000, 0.000, 0.500, 0.90> ]
[0.100 color rgbt <0.500, 0.000, 1.000, 0.90> ]
[0.200 color rgbt <0.000, 0.000, 1.000, 0.90> ]
[0.300 color rgbt <0.000, 0.500, 1.000, 0.90> ]
[0.400 color rgbt <0.000, 1.000, 1.000, 0.90> ]
[0.500 color rgbt <0.000, 1.000, 0.500, 0.90> ]
[0.600 color rgbt <0.000, 1.000, 0.000, 0.90> ]
[0.700 color rgbt <0.500, 1.000, 0.000, 0.90> ]
[0.800 color rgbt <1.000, 1.000, 0.000, 0.90> ]
[0.900 color rgbt <1.000, 0.500, 0.000, 0.90> ]
[1.000 color rgbt <1.000, 0.000, 0.000, 0.90> ]
}
rotate -15*y
}
finish
{
ambient 1
diffuse 0
phong 0
specular 0
}
}
Note that the colors use a very high transparency, so that anything that is
reflected in the CD can show through.
Next the thin disk, which will be unioned with the CD itself:
#declare DiffractionWedge = intersection
{
difference
{
cylinder { 0.02500*y, 0.02513*y, 2.265 }
cylinder { -1*y, 1*y, 0.8125 }
}
intersection
{
box { <0,-1,0> <-5,1,-5> rotate -15*y }
box { <0,-1,0> <-5,1,5> rotate -45*y }
}
}
#declare DiffractionRainbow =
union
{
object { DiffractionWedge }
object { DiffractionWedge rotate 180*y }
texture { T_Diffraction }
}
I've posted an image of the whole CD (CDisc.jpg) in povray.binaries.images,
which shows the results. I've also posted the source for the image
(compact.pov) in povray.binaries.scene-files, so you can experiment with it,
or use the whole CD model in your own scenes. (Caution -- the scene takes
over an hour to render on a 200Mhz Pentium Pro :-)
Happy Raytracing!
Gary
------------------------------------------------------------------------
Gary Ruben
Brighton, MA
replyto:gdr@csi com <remove nospam to reply by e-mail>
Post a reply to this message
|
|