global_settings { assumed_gamma 2.2 } #include "shapes.inc" #include "colors.inc" #include "textures.inc" #include "finish.inc" #include "metals.inc" #include "woods.inc" #include "woodmaps.inc" #include "stones.inc" #include "skies.inc" //camera { //clip view // location <35, 25, -60> // look_at <45, 5, 0> //} //camera { //clip view top // location <45, 45, 0> // look_at <45, 5, 0> //} camera { //normal view location <75, 45, -150> look_at <75, 5, 0> } //camera { //camera focus on tip //location <150, 10, -20> // look_at <135, 5, 0> //} //camera { //camera focus on back 1 // location <-10, 10, -20> // look_at <0, 5, 0> //} //camera { //camera focus on back 2 // location <-1, 10, -25> // look_at <0, 5, 0> //} //camera { //camera zoomed out // location <25, 100, -250> // look_at <75, 5, 0> //} light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color // nLightsWide mLightsHigh area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light translate <40, 80, -40> // position of light } // create a regular point light source light_source { 0*x // light's position (translated below) color red 1.0 green 1.0 blue 1.0 // light's color translate <0, 50, -100> } // create a regular point light source light_source { 0*x // light's position (translated below) color red 1.0 green 1.0 blue 1.0 // light's color translate <-150, 5, 0> } plane { <0, 1, 0>, 0 texture{T_Grnt2 scale<20,20,20> } } sky_sphere{ S_Cloud4 } //A few textures and finishes, bozo not used in this image #declare pen2text = pigment{Gray25} #declare bozotext = texture { pigment { bozo color_map { [0.00 color Red] [0.33 color Blue] [0.66 color Yellow] [1.00 color Red] } turbulence 0.05 scale <0.2, 0.3, 1> } finish { phong 1 }} #declare pen2fin = finish{roughness 0.001 diffuse 0.5 crand 0.1} //The pencil #declare tab1 = box{<0,0,0>, <1.3125,.0625,.1875> translate<-.66,.43,-.09375> pigment{Black} } #declare tab2 = box{<-.3125,-.0625,-.1875>, <0,0,0> rotate 25*z translate<-.66,.49,.09375> pigment{Black} } #declare tab3 = prism{ linear_sweep linear_spline 0, // sweep the following shape from here ... 0.0625, // ... up through here 4, // the number of points making up the shape ... <0,0>, <.375,0>, <.25,.04>, <0,0> rotate 90*x translate<.289,.425,-.03> pigment { Black } } #declare tab4 = prism{ linear_sweep linear_spline 0, // sweep the following shape from here ... 0.0625, // ... up through here 5, // the number of points making up the shape ... <0,0>, <.375,0>, <.375,.1>, <.125,.1>,<0,0> rotate -90*x translate<-.82,.35,-.03> pigment { Black } } #declare eraser = superellipsoid { <1, .2> pigment { Gray90 } scale<.16,.16,.3125> rotate -90*y translate<-.95,.1875,0> } #declare back3 = cylinder { <-.135417, .1875, 0>, // Center of one end <-.947917, .1875, 0>, // Center of other end .1875 // Radius texture{ pigment{Black} } finish{Shiny} } #declare back2 = cylinder { <-.1042, .1875, 0>, // Center of one end <-.135417, .1875, 0>, // Center of other end .18 // Radius texture{ pigment{Black} } finish{Shiny} } #declare back1 = cylinder { <0, .1875, 0>, // Center of one end <-.104167, .1875, 0>, // Center of other end .125 // Radius texture{ pigment{Black} } finish{Shiny} } #declare pencyl = cylinder { <0, .1875, 0>, // Center of one end <5.4375, .1875, 0>, // Center of other end .1875 // Radius texture{ pigment{Black} } finish{Shiny} } #declare tip1 = cylinder { <5.4375, .1875, 0>, // Center of one end <5.5625, .1875, 0>, // Center of other end .1865 // Radius texture{pen2text} finish{pen2fin} } #declare tip2 = cone { <5.5625, .1875, 0>, .1865 // Center and radius of one end <6.25, .1875, 0>, .0625 // Center and radius of other end texture {pen2text} finish {pen2fin} } #declare tip3 = cylinder { <6.25, .1875, 0>, // Center of one end <6.375, .1875, 0>, // Center of other end .020833 // Radius texture{ pigment{P_Silver3} finish{Shiny} } } #declare tip = union{ object{tip1} object{tip2} object{tip3} } #declare back = union{ object{back1} object{back2} object{back3} object{eraser} } #declare tab = union{ object{tab1} object{tab2} object{tab3} object{tab4} } #declare pencil = union{ object{tab} object{back} object{pencyl} object{tip} } //The Pen, below #declare back = union{ cone { <0, 6.5, 0>, 6.5 // Center and radius of one end <20, 6, 0>, 6 // Center and radius of other end } sphere { <0, 6.55, 0> // center of sphere 6.49 // radius of sphere scale <.2,1,1> } } #declare ring = union{ cylinder{ <20,6,0> //center of one end <20.2,6,0> //center of other 6 //Radius pigment{Black} }cylinder{ <20.2,6,0> //center of one end <25.2,6,0> //center of other 6 //Radius texture{ pigment{P_Chrome2} finish{F_MetalD} } } cylinder{ <25.2,6,0> //center of one end <25.3,6,0> //center of other 6 //Radius pigment{Black} } } #declare body = cone{ <25.3,6,0>,6 //center and radius of one end <111.3,4.5,0>,4.5 //center and radius of other } #declare pentip1 = union{ cylinder{ <111.3,4.5,0> //center of one end <111.4,4.5,0> //center of other 4.5 //Radius pigment{Black} } cone{ <111.4,4.5,0>,4.5 <137.4,4.5,0>,1.5 texture{ pigment{P_Chrome2} finish{F_MetalD} } } } #declare pentip2 = union{ cylinder{ <137.4,4.5,0> <138.4,4.5,0> 1 } cone{ <138.4,4.5,0>,1 <140.4,4.5,0>,.5 } sphere{ <140.3,4.5,0> .5 pigment{NavyBlue} } } #declare clipsphere = sphere{ <60,13,0> 2.5 } #declare clipbody = union{ difference{ box{<2,5,0>, <36,6,5>} //first rectangle box{<24,4.9,-0.1>,<36.1,6.1,1.5>} box{<24,4.9,3.5>,<36.1,6.1,5.1>} cylinder{ <24,4.9,0> <24,6.1,0> 1.5 translate -24*x scale<15,1,1> translate 24*x } cylinder{ <24,4.9,5> <24,6.1,5> 1.5 translate -24*x scale<15,1,1> translate 24*x } } box{<0,1,0>, <1,4,5>} //lower left little one difference{ cylinder{ <2,4,0> <2,4,5> 2 } cylinder{ <2,4,-0.1> <2,4,5.1> 1 } box{<1,1,-.1>,<4,4,5.1>} box{<2,4,-0.1>,<4,5,5.1>} cylinder{ <24,4.9,0> <24,6.1,0> 1.5 translate -24*x scale<15,1,1> translate 24*x } cylinder{ <24,4.9,5> <24,6.1,5> 1.5 translate -24*x scale<15,1,1> translate 24*x } } } #declare pen = union{ object{back texture{T_Wood17 rotate <-15,90,0> scale<20,6,3> } finish{Shiny} } object{ring} object{body texture{T_Wood17 rotate <-15,90,0> scale<20,6,3> } finish{Shiny} } object{pentip1} object{pentip2 texture{ pigment{P_Brass3} finish{F_MetalB} } } object{clipsphere texture{ pigment{P_Chrome2} finish{F_MetalD} } } object{clipbody texture{ pigment{P_Chrome2} finish{F_MetalD} } translate <25,8,-2.5> } } object{pen rotate -30*x } object{pencil scale <16,18,18> translate <30,0,-60> rotate -10*y }