#include "colors.inc" #include "textures.inc" global_settings { assumed_gamma 2.2 max_trace_level 256 } #declare FishBlackPigment=pigment { color Black } #declare FishSpotPink=pigment { bozo //leopard turbulence 0.3 color_map { [0.00 color rgbf<.45,.2,.27>] [0.1 color rgbf<.45,.2,.27>] [0.2 color rgb<.63,.28,.38>] [1.00 color rgb<.63,.28,.38>] } scale .02 } #declare FishSpotOrange=pigment { bozo //leopard turbulence 0.3 color_map { [0.00 color rgb<.69,.47,.38>] [0.5 color rgb<.69,.47,.38>] [0.8 color rgb<.35,.24,.19>] [1.00 color rgb<.35,.24,.19>] } scale .02 } #declare FishBackPigment=pigment { bozo //leopard turbulence 0.3 color_map { //[0.00 color Gray] //[0.5 color Gray] [0.00 rgb<.52,.47,.40>] [0.5 rgb<.52,.47,.40>] [0.8 color Black] [1.00 color Black] } scale .01 } #declare FishSidePigment=pigment { gradient y pigment_map { [0 color rgb<.52,.47,.40>] [.4 FishSpotOrange] [.5 FishSpotPink] [.6 FishSpotOrange] [1.00 color rgb<.52,.47,.40>] } } #declare FishBottomPigment=pigment { color rgb<.52,.47,.40> } #declare FishTex=texture { pigment { gradient y pigment_map { [0.0 FishBlackPigment] [0.1 FishBlackPigment] [0.3 FishBackPigment] [0.4 FishSidePigment] [0.6 FishSidePigment] [0.7 FishBackPigment] [0.8 FishBottomPigment] } translate<0,-.5,0> scale 20 rotate<180,0,0> } finish { metallic ambient 0.1 diffuse 0.8 brilliance 1.0 reflection 0.3 phong 0.8 phong_size 120 } normal { hexagon .1 scale <.3,.1,.1> } scale .5 } #declare ClearQuilt=texture { //pigment { color rgbf <0.578, 0.422, 0.195,.8> } pigment { color rgbf <0.55, 0.5, 0.45,.8> } finish { metallic ambient 0.1 diffuse 0.8 brilliance 6.0 reflection 0.4 phong 0.8 phong_size 120 } normal { quilted 1 control0 0.5 control1 1 scale 0.45 turbulence 0.5 lambda 0.5 omega 0.707 octaves 4 } scale 1.5 } #declare GrayTex=texture { Aluminum normal { quilted 1 control0 0.5 control1 1 scale 0.45 turbulence 0.5 lambda 0.5 omega 0.707 octaves 4 } } #declare TeethTex=texture { pigment { color White } finish { metallic ambient 0.1 diffuse 0.8 brilliance 1.0 reflection 0.3 phong 0.8 phong_size 120 } } #declare Ring=difference { cylinder { <-2.5,0,0>,<-2,0,0>,5 } difference { cylinder { <-2.4,0,0>,<-2.1,0,0>,6 } cylinder { <-2.5,0,0>,<-2,0,0>,4.95 } } texture { Aluminum } } #declare Band=union { union { object { Ring } object { Ring translate<4.5,0,0> } } intersection { cylinder { <-2,0,0>,<2,0,0>,5 } union { box { <-10,1,-10>,<10,.9,10> } box { <-10,-1,-10>,<10,-.9,10> } } texture { Aluminum } } intersection { cylinder { <-2.25,0,0>,<2.25,0,0>,4.9 } box { <-20,.95,-20>,<20,20,20> } //texture { GrayTex } texture { FishTex } } intersection { cylinder { <-2.25,0,0>,<2.25,0,0>,4.9 } box { <-20,-.95,-20>,<20,.95,20> } //texture { BlueWhiteCrackle } texture { FishTex } } intersection { cylinder { <-2.25,0,0>,<2.25,0,0>,4.9 } box { <-20,-20,-20>,<20,-.95,20> } //texture { WhiteQuilt } texture { FishTex } } } #declare TopFin=union { // Fin sphere { <.75,5,0>,.15 } cylinder { <.75,5,0>,<3,6,0>,.15 } sphere { <3,6,0>,.15 } cylinder { <3,6,0>,<-6,12,0>,.15 } sphere { <-6,12,0>,.15 } cylinder { <-6,12,0>,<-4,6,0>,.15 } sphere { <-.75,5,0>,.15 } cylinder { <-.75,5,0>,<-4,6,0>,.15 } sphere { <-4,6,0>,.15 } cylinder { <-.75,5,0>,<.75,5,0>,.15 } polygon { 5,<.75,5>,<3,6>,<-6,12>,<-4,6>,<-.75,5> texture { ClearQuilt } } texture { Aluminum } } #declare ConeBand=union { intersection { cone { <-10,0,0>,3.3,<-18,0,0>,1.1 } union { box { <-100,.65,-100>,<100,.55,100> } box { <-100,-.65,-100>,<100,-.55,100> } } } intersection { cone { <-10,0,0>,3.2,<-18,0,0>,1 } box { <-20,.6,-20>,<20,20,20> } //texture { GrayTex } texture { FishTex } } intersection { cone { <-10,0,0>,3.2,<-18,0,0>,1 } box { <-20,-.6,-20>,<20,.6,20> } texture { FishTex } //texture { BlueWhiteCrackle } } intersection { cone { <-10,0,0>,3.2,<-18,0,0>,1 } box { <-20,-20,-20>,<20,-.6,20> } texture { FishTex } //texture { WhiteQuilt } } sphere { <-18,0,0>,1.1 } // Center Spike cylinder { <-18,0,0>,<-21,0,0>,.2 } cone { <-21,0,0>,.2,<-24,0,0>,.001 } union { cylinder { <-18,0,0>,<-21,0,0>,.2 } cone { <-21,0,0>,.2,<-24,0,0>,.001 } translate<18,0,0> rotate<0,0,-10> translate<-18,0,0> } union { cylinder { <-18,0,0>,<-21,0,0>,.2 } cone { <-21,0,0>,.2,<-24,0,0>,.001 } translate<18,0,0> rotate<0,0,-20> translate<-18,0,0> } union { cylinder { <-18,0,0>,<-21,0,0>,.2 } cone { <-21,0,0>,.2,<-24,0,0>,.001 } translate<18,0,0> rotate<0,0,10> translate<-18,0,0> } union { cylinder { <-18,0,0>,<-21,0,0>,.2 } cone { <-21,0,0>,.2,<-24,0,0>,.001 } translate<18,0,0> rotate<0,0,20> translate<-18,0,0> } // Back Top Fin object { TopFin translate<0,-5,0> scale .9 translate<-18,1,0> } // Back Bottom Fin object { TopFin translate<0,-5,0> scale .65 rotate<180,0,0> translate<-18,-1,0> } texture { Aluminum } } // Top Fin + Connector #declare Body=union { // Connector difference { intersection { cylinder { <-.75,0,0>,<.75,0,0>,5 } // Main Connector Band cylinder { <0,2.5,-100>,<0,2.5,100>,.75 } } cylinder { <0,2.5,-100>,<0,2.5,100>,.65 } } intersection { cylinder { <-.75,0,0>,<.75,0,0>,4.95 } // Main Connector Band cylinder { <0,2.5,-100>,<0,2.5,100>,.75 } } difference { cylinder { <-.75,0,0>,<.75,0,0>,5 } // Main Band box { <-100,-100,-100>,<100,2.5,100> } // Cut Off Bottom Half box { <-.65,-100,-100>,<.65,100,100> } // Cut Out Center } difference { cylinder { <-.75,0,0>,<.75,0,0>,4.95 } // Main Band Inside box { <-100,-100,-100>,<100,2.5,100> } // Cut Off Bottom Half } object { TopFin } texture { Aluminum } } #declare Fins=union { // Bottom 1 Fin object { TopFin translate<0,-5,0> scale .2 rotate<180,0,0> translate<-1.25,-5,0> } // Bottom 2 Fin object { TopFin translate<0,-5,0> scale .4 rotate<180,0,0> translate<1,-5,0> } // Right Side Fin object { TopFin translate<0,-5,0> scale .5 rotate<-130,0,0> translate<0,0,-5> } // Left Side Fin object { TopFin translate<0,-5,0> scale .5 rotate<130,0,0> translate<0,0,5> } // Fin Seg 1 object { TopFin translate<0,-5,0> scale .2 translate<-3.75,4.75,0> } // Fin Seg 2 object { TopFin translate<0,-5,0> scale .18 translate<-5.5,4.5,0> } // Fin Seg 3 object { TopFin translate<0,-5,0> scale .16 translate<-7,4,0> } // Fin Seg 4 object { TopFin translate<0,-5,0> scale .16 translate<-8.5,3.5,0> } // Fin Seg 5 object { TopFin translate<0,-5,0> scale .16 translate<-10,3,0> } } #declare Head=union { difference { sphere { <3,0,0>,4.5 } box { <3,-100,-100>,<100,100,100> } } // Top Mouth difference { // Outer Skin sphere { <0,0,0>,4.6 scale<2.5,1,1> } sphere { <0,0,0>,4.4 scale<2.5,1,1> } box { <-100,-100,-100>,<100,.75,100> } box { <-100,-100,-100>,<0,100,100> } // Eye Holes cylinder { <-100,2.5,-3>,<100,2.5,-3>,.65 } cylinder { <-100,2.5,3>,<100,2.5,3>,.65 } translate<3,0,0> texture { FishTex } } difference { sphere { <0,0,0>,4.5 scale<2.5,1,1> } sphere { <0,0,0>,4.4 scale<2.5,1,1> } box { <-100,-100,-100>,<100,0,100> } box { <-100,-100,-100>,<0,100,100> } // Eye Holes cylinder { <-100,2.5,-3>,<100,2.5,-3>,.5 } cylinder { <-100,2.5,3>,<100,2.5,3>,.5 } translate<3,0,0> } difference { // Eye Window sphere { <0,0,0>,4.4 scale<2.5,1,1> } sphere { <0,0,0>,4.3 scale<2.5,1,1> } box { <-100,-100,-100>,<100,0,100> } box { <-100,-100,-100>,<0,100,100> } translate<3,0,0> texture { Glass3 } } // Top Mouth Lip cylinder { <0,0,0>,<0,.5,0>,4.5 scale<2.55,1,1> translate<3,0,0> } union { // Bottom Mouth difference { // Outer Skin sphere { <0,0,0>,4.6 scale<2.2,1,1> } cylinder { <0,-100,0>,<0,100,0>,4.5 } box { <-100,-.75,-100>,<100,100,100> } box { <-100,-100,-100>,<0,100,100> } texture { FishTex } } difference { sphere { <0,0,0>,4.5 scale<2.2,1,1> } box { <-100,0,-100>,<100,100,100> } box { <-100,-100,-100>,<0,100,100> } } // Bottom Mouth Lip cylinder { <0,0,0>,<0,-.5,0>,4.5 scale<2.25,1,1> } union { // Bottom Teeth #declare Count=-80; #while (Count<=80) cone { <4.4,0,0>,.1,<4.4,abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } cone { <4.2,0,0>,.1,<4.2,abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } cone { <4,0,0>,.1,<4,abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } #declare Count=Count+2.5; #end scale<2.2,1,1> texture { TeethTex } } // Bottom Teeth rotate<0,0,-10> translate<3,0,0> } // Bottom Mouth union { // Top Teeth #declare Count=-80; #while (Count<=80) cone { <4.4,0,0>,.1,<4.4,-abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } cone { <4.2,0,0>,.1,<4.2,-abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } cone { <4,0,0>,.1,<4,-abs(abs(Count)-80)*.01875+.001,0>,.001 rotate<0,Count,0> } #declare Count=Count+2.5; #end scale<2.5,1,1> translate<3,0,0> texture { TeethTex } } // Top Teeth texture { Aluminum } } #declare Pyrmid=union { triangle { <-1,1,0>,<1,1,0>,<0,0,-1> } triangle { <1,1,0>,<1,-1,0>,<0,0,-1> } triangle { <1,-1,0>,<-1,-1,0>,<0,0,-1> } triangle { <-1,1,0>,<-1,-1,0>,<0,0,-1> } // Ext surface //triangle { <-1,1,0>,<-1,1,1>,<1,1,1> } //triangle { <-1,1,0>,<1,1,0>,<1,1,1> } //triangle { <-1,-1,0>,<-1,-1,1>,<1,-1,1> } //triangle { <-1,-1,0>,<1,-1,0>,<1,-1,1> } } #declare Cap=union { #declare Height=0; #while (Height<14) #declare Count=0; #while (Count<360) object { Pyrmid translate<0,Height,-20> rotate<0,Count,0> } #declare Count=Count+5; #end #declare Height=Height+2; #end cylinder { <0,-1,0>,<0,13,0>,20 } torus { 18,2 translate<0,13,0> } torus { 18,2 translate<0,-1,0> } cylinder { <0,-3,0>,<0,15,0>,18 } texture { Aluminum } } #declare LookLeftFish=union { object { Band rotate<0,0,0> } object { Band scale .95 translate<-2.5,0,0> rotate<0,5,0> } object { Band scale .9 translate<-4,0,0> rotate<0,7,0> } object { Band scale .8 translate<-6,0,0> rotate<0,9,0> } object { Band scale .75 translate<-7.5,0,0> rotate<0,11,0> } object { Band scale .7 translate<-9,0,0> rotate<0,13,0> } object { Body } object { ConeBand translate<10,0,0> rotate<0,15,0> translate<-10,0,0> rotate<0,15,0> } object { Head rotate<0,-10,0> } object { Fins } object { Cap scale .03 translate<0,5,0> rotate<-60,0,0> } object { Cap scale .03 translate<0,5,0> rotate<60,0,0> } } #declare LookRightFish=union { object { Band rotate<0,0,0> } object { Band scale .95 translate<-2.5,0,0> rotate<0,-5,0> } object { Band scale .9 translate<-4,0,0> rotate<0,-7,0> } object { Band scale .8 translate<-6,0,0> rotate<0,-9,0> } object { Band scale .75 translate<-7.5,0,0> rotate<0,-11,0> } object { Band scale .7 translate<-9,0,0> rotate<0,-13,0> } object { Body } object { ConeBand translate<10,0,0> rotate<0,-15,0> translate<-10,0,0> rotate<0,-15,0> } object { Head rotate<0,10,0> } object { Fins } object { Cap scale .03 translate<0,5,0> rotate<-60,0,0> } object { Cap scale .03 translate<0,5,0> rotate<60,0,0> } } #declare Fish = object { LookLeftFish } //object { LookLeftFish rotate<0,120,0> translate<-10,0,0> } //object { LookRightFish rotate<0,120,0> translate<10,0,0> } //object { TheSpikeFish scale .2 rotate<0,-30,0> translate<-10,0,0> } #declare GroundHF=height_field { png "maps/ground.png" // the file name to read //tga "book.tga" smooth // make smoother surface texture { pigment { image_map { png "maps/book.png" // the file to read (iff/gif/tga/png/sys) map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance //once } // image_map scale .25 rotate<90,0,0> //color NavyBlue } normal { bump_map { png "maps/book2.png" // the file to read (iff/gif/tga/png/sys) map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance bump_size .5 //once } // image_map scale .25 rotate<90,0,0> } finish { ambient .25 } } translate<-.5,-.5,-.5> scale<400,10,400> } #declare WaterG=object { box { <-200,-200,-200>,<200,200,20000> } texture { //pigment{ color rgbf <0.0, 0.0, 1.0, 0.9> } pigment{ color rgbf<0.74902,0.847059,0.847059,.9> } normal { //ripples 0.75 //frequency 10 bumps 1 bump_size 5 } finish { ambient .25 reflection 0.3 refraction 0.5 ior 1.33 } scale 5 } } #declare NormalCamera=camera { location <0,20,-40> look_at<0,0,0> right up y } camera { NormalCamera } light_source { <2000,2000,-2000> color White } light_source { <-2000,2000,-2000> color White } background { color White } object { LookLeftFish rotate<0,120,0> translate<-10,0,0> } object { LookRightFish rotate<0,120,0> translate<10,0,0> } //object { WaterG } object { GroundHF translate<0,-10,0> }