Biro
#include "colors.inc"
#include "finish.inc"
#include "woods.inc"
// Texture declarations
#declare Pen_Gold = texture
{
pigment { BrightGold }
finish
{
ambient 0.1
diffuse 0.4
reflection 0.25
specular 1
metallic
}
}
#declare Pen_Grey = texture
{
pigment { color Gray }
normal { bumps 0.4 scale 0.2 }
finish { Dull }
}
#declare Pen_Black = texture
{
pigment { color Black }
finish { Shiny phong 1}
}
// Object declarations
#declare Pen_Tip = union
{
sphere { <0,0.8,0>,0.08 texture { Pen_Gold pigment {color Silver}} }
cone { <0,0.8,0>,0.1 <0,0.9,0>,0.15 texture { Pen_Gold } }
cone { <0,0.9,0>,0.15 <0,1.1,0>,0.2 texture { Pen_Gold } }
cone { <0,1.1,0>,0.215 <0,1.7,0>,0.3 texture { Pen_Black } }
cylinder { <0,1.7,0> <0,1.8,0>,0.3 texture { Pen_Black } }
}
#declare Pen_Nib = union
{
cone { <0,1.8,0>,0.36 <0,2.8,0>,0.41 }
cone { <0,2.1,0>,0.34 <0,3,0>,0.5 }
cylinder { <0,3,0> <0,3.1,0>,0.5 }
cylinder { <0,3.1,0> <0,13,0>,0.45 }
texture
{
pigment { Black }
finish { Dull }
}
}
#declare Pen_Cylinder = cylinder
{
<0,0,0>
<0,0.5,0>,0.5
texture { Pen_Grey }
}
#declare Pen_Body = cylinder
{
<0,5.82,0>
<0,17,0>,0.5
texture { Pen_Grey }
}
#declare Pen_End = cone
{
<0,17,0>,0.5
<0,17.2,0>,0.2
texture { Pen_Black }
}
#declare Pen = union
{
object { Pen_Tip }
object { Pen_Nib }
object { Pen_Cylinder translate y*2.92 }
object { Pen_Cylinder translate y*3.5 }
object { Pen_Cylinder translate y*4.08 }
object { Pen_Cylinder translate y*4.66 }
object { Pen_Cylinder translate y*5.24 }
object { Pen_Body }
object { Pen_End }
}
#declare Pencil = union
{
cone { <0,0,0>,0 <0,0.5,0>,0.15 pigment { color Gray95 } }
cone { <0,0.5,0>,0.15 <0,1.9,0>,0.4 texture { T_Wood10 rotate x*90 } }
cylinder { <0,1.9,0>, <0,11.9,0>,0.4 pigment { color Red } }
cylinder { <0,11.9,0>, <0,11.91,0>,0.4 texture { T_Wood10 rotate x*90 } }
cylinder { <0,11.91,0>, <0,11.915,0>,0.15 pigment { color Gray95 } }
}
#declare Hexagon = prism
{
linear_sweep
linear_spline
1.9,
10,
7,
<0,0.4>,<0.34,0.2>,<0.34,-0.2>,<0,-0.4>,<-0.34,-0.2>,<-0.34,0.2>,<0,0.4>
pigment { color Blue }
}
#declare Hex_Pencil = union
{
sphere { <0,0.2,0>,0.1 pigment { color Gray95 } }
cone { <0,0.2,0>,0.1 <0,0.5,0>,0.15 pigment { color Gray95 } }
cone { <0,0.5,0>,0.15 <0,1.6,0>,0.4 texture { T_Wood11 rotate x*90 } }
object { Hexagon scale 1.1 translate -y*0.5 rotate y*90 }
prism
{
linear_sweep
linear_spline
10, 10.2, 7,
<0,0.4>,<0.34,0.2>,<0.34,-0.2>,<0,-0.4>,
<-0.34,-0.2>,<-0.34,0.2>,<0,0.4>
pigment { color White }
scale 1.1
translate -y*0.5 rotate y*90
}
prism
{
linear_sweep
linear_spline
10.2, 11.25, 7,
<0,0.4>,<0.34,0.2>,<0.34,-0.2>, <0,-0.4>,
<-0.34,-0.2>,<-0.34,0.2>,<0,0.4>
pigment { color Black }
scale 1.1
translate -y*0.5 rotate y*90
}
}
// The scene description
camera
{
location <12,11,0> // 12,11,0
look_at <0,11,0> // 0,11,0
}
background { color SkyBlue }
light_source
{
<20,20,20> // 20,20,20
color White
}
object { Pen rotate x*180 scale 2 translate <0,17.5,-4> }
object { Pencil rotate x*180 scale 2.5 translate <0,16,0> }
object { Hex_Pencil rotate x*180 scale 2.5 translate <0,16,4> }