home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ray Tracing Box
/
RAY_CD.mdf
/
raytrace
/
_pov_dat
/
morein
/
magglass.inc
< prev
next >
Wrap
Text File
|
1993-02-01
|
2KB
|
114 lines
/*This is the data file for a magnifying glass with a shiny metal frame and a black handle*/
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
/*camera { //un-comment the camera and light source to make adjustments
location <0 1 -5>
direction <0 2 0>
up <0 1 0>
right <1.33 0 0>
look_at <0 0 2>
}*/
/*object {
light_source {<4 3 -4> color White}
}*/
/*object { //this is an image_map background to give the glass something to magnify-substitute your own
sphere {<0 0 0> 100}
texture {//color Green
image_map {gif "weave.gif" map_type 1 interpolate 4}
scale <100 100 100>
}
}*/
#declare Glass= // This is the lens
intersection {
sphere {<0 .938 0> 1}
sphere {<0 -.938 0> 1}
}
#declare Hollow_Cylinder= //This is needed to make the frame
difference {
quadric {
Cylinder_Y
}
quadric {
Cylinder_Y
scale <.925 1 .925>
}
}
#declare Frame = //This is the frame for the lens
intersection {
Hollow_Cylinder
plane {<0 1 0> -1 translate <0 2 0>}
plane {<0 1 0> -1 inverse translate <0 1.7 0>}
}
//texture {color Red}
//rotate <-15 0 0>
//translate <0 -.75 0>
#declare Mag_Glass= //This is the complete form of the Magnifying glass
composite {
object {
intersection {
Glass
translate <0 .275 0>
rotate <-90 0 0>
scale <2 2 2>
}
texture {color red 1.0 blue 1.0 green 1.0 alpha 1.0
reflection .1
refraction 1.0
specular 1.0
roughness .001
ior 1.5
phong 1 phong_size 200
}
}
object {
intersection {
Frame
}
scale <.75 .75 .75>
rotate <-90 0 0>
translate <0 0 .15>
texture {
color LightGray
metallic
ambient 0.2
diffuse 0.7
brilliance 6.0
reflection 0.25
phong 0.8 phong_size 80
}
//rotate <90 0 0>
}
object {
intersection {
quadric {
Cylinder_Y
scale <.1 1 .1>
}
plane {<0 1 0> -1 translate <0 2 0>}
plane {<0 1 0> -1 inverse translate <0 .65 0>}
}
rotate <0 0 -90>
translate <1.05 -.07 -.5>
texture {
color Black
specular 1.0
reflection .04
phong 1 phong_size 60
}
}
rotate <90 0 0>
rotate <0 0 0>
//translate <-.5 .3 1>
}