#include "colors.inc" #include "textures.inc" #include "stones.inc" #declare sky_flag = 1; #declare star_flag = 1; #declare arrow_flag = 1; #declare mkernel_flag = 1; #declare explosion_flag = 1; #declare components_flag = 1; #declare myfont = "timrom.ttf"; camera { location <-3*1.1,-5*1.1,-8*1.1> look_at <-0.30,-0.6,0> } light_source { <-2,-5,-5> color rgb <1,1,1> } light_source { <6,10,-9> color rgb <1,1,1> } #if (explosion_flag) #declare R1 = seed(12345); #declare Explosion = object { merge { #declare num = 0; #declare max_num = 40; #while (num } finish { ambient 0 diffuse 0 } interior { media { emission 1.5 intervals 1 samples 5 method 3 density { spherical ramp_wave turbulence 1 color_map { [ 0.0 color rgbt <1, 0, 0, 1> ] [ 0.5 color rgbt <1, 1, 0.5, 0> ] [ 1.0 color rgbt <1, 1, 1, 0> ] } } } } hollow #declare halo_ypos = rand(R1)/2; #declare halo_size = 2/(2+halo_ypos*40); scale halo_size scale <1,rand(R1)/4 + 0.75,1> scale 0.5 rotate <0,0,rand(R1)*360> translate } #declare num = num + 1; #end } } object { Explosion scale 0.7 rotate <45,0,0> translate <4.2,0,-0.54> rotate <0,0,4*60+30>} object { Explosion scale 0.7 rotate <45,0,0> translate <3.6,0,-0.54> rotate <0,0,3*60+40>} #end /* explosion */ #if (star_flag) difference { merge { difference { cylinder { <0, 0, -0.5>, <0, 0, 0.5>, 2 } #declare alp = 0; #while (alp < 360) cylinder { <2.2, 0, -0.6>, <2.2, 0, 0.6>, (4*3.14159 + 3.6)/16 rotate <0,0,alp> } #declare alp = alp + 60; #end } /* difference */ #declare alp = 30; #while (alp < 360) difference { merge { box { <0.5,-0.1,-0.8>,<2.05,0.1,0.8> } box { <2.05,-0.1,-0.8>,<6,0.1,0.8> pigment { color rgb <0.4,0.4,0.4> } } #declare b_y = -0.85; #while (b_y < 0.8) #declare b_x = 1.8; #while (b_x < 6.5) box { , } box { , } #declare b_x = b_x + 0.5; #end #declare b_y = b_y + 0.6; #end texture { T_Stone24 scale 2 finish {ambient 0.65 reflection 0} } } /* merge */ box { <5.5,-5,-5>,<10,5,5> } rotate <0,0,alp> } /* difference */ #declare alp = alp + 60; #end } /* merge */ sphere { <0,0,0>, 1.3 scale <1,1,0.7> } sphere { <0,0,-5> 4.5 } texture { T_Stone24 scale 2 finish { ambient 0.65 reflection 0 } } } #end /* star */ #if (mkernel_flag) sphere { <0,0,0>, 1.3 scale <1,1,0.7> texture{ Polished_Chrome pigment{color rgbt <0.7,0.4,0,0.5>} finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0} } } text { ttf myfont "Micro-" 0, 0 pigment { color rgb <1,1,0.9> } scale 0.6 translate <-0.75,0.1,-0.2> finish {ambient 1.4} } text { ttf myfont "kernel" 0, 0 pigment { color rgb <1,1,0.9> } scale 0.6 translate <-0.75,-0.5,-0.2> finish {ambient 1.4} } #end /* mkernel */ #if (arrow_flag) #declare sca = 3.1415/180; #declare alp = 4*60*sca; #declare bet = 3*60*sca; /* arrow through kernel */ difference { merge { sphere_sweep { b_spline 5, <7*cos(alp),7*sin(alp),0>,0.1, <3*cos(alp),3*sin(alp),0>,0.1, <0,0,0>,0.1, <2*cos(bet),2*sin(bet),0>,0.1, <4*cos(bet),4*sin(bet),0>,0.1 } cone { <2*cos(bet),2*sin(bet),0>,0.2, <2.5*cos(bet),2.5*sin(bet),0>,0 } } box {<-5,-5,0.01>, <5,5,5>} box {<-5,-5,-0.01>, <5,5,-5>} pigment {color rgb <0.5,0.6,0.5>} finish {ambient 0.5} } merge { sphere_sweep { b_spline 5, <7*cos(alp),7*sin(alp),0>,0.02, <3*cos(alp),3*sin(alp),0>,0.02, <0,0,0>,0.02, <2*cos(bet),2*sin(bet),0>,0.02, <4*cos(bet),4*sin(bet),0>,0.02 } cone { <2*cos(bet),2*sin(bet),0>,0.05, <2.4*cos(bet),2.4*sin(bet),0>,0 } pigment {color rgb <0.7,1,0.7>} finish {ambient 1} } /* arrows to walls */ intersection { merge { cone { <4.2,-0.6,-0.14>,0.1, <4.2,0.9,-0.14>,0.1 } cone { <4.2,0.9,-0.14>,0.2, <4.2,1.4,-0.14>,0 } } box {<-5,-5,-0.13>,<5,5,-0.15>} pigment {color rgb <0.7,0.4,0.4>} finish {ambient 0.5} rotate <0, 0, 4*60+10> } merge { cone { <4.2,-0.6,-0.14>,0.02, <4.2,0.9,-0.14>,0.02 } cone { <4.2,0.9,-0.14>,0.05, <4.2,1.4,-0.14>,0 } pigment {color rgb <1.0,0.7,0.7>} finish {ambient 1} rotate <0, 0, 4*60+10> } intersection { merge { cone { <3.6,0.1,-0.14>,0.1, <3.6,-0.65,-0.14>,0.1 } cone { <3.6,-0.65,-0.14>,0.2, <3.6,-1.15,-0.14>,0 } } box {<-5,-5,-0.13>,<5,5,-0.15>} pigment {color rgb <0.7,0.4,0.4>} finish {ambient 0.5} rotate <0, 0, 4*60-10> } merge { cone { <3.6,0.1,-0.14>,0.02, <3.6,-0.65,-0.14>,0.02 } cone { <3.6,-0.65,-0.14>,0.05, <3.6,-1.15,-0.14>,0 } pigment {color rgb <1.0,0.7,0.7>} finish {ambient 1} rotate <0, 0, 4*60-10> } #end /* arrows */ #if (sky_flag) #declare Orange_Yellow = color rgb <1,0.8,0.0>*0.7; sphere{ <0,0,0>,1 hollow texture{ pigment{ gradient <0,1,0> turbulence 0.75 color_map{ [0 color White*0.7] [0.8 color Orange_Yellow*0.7] [1.0 color White*0.7] } quick_color White scale 4 rotate<180,0,30> } finish {ambient 1 diffuse 0} } scale 10000 } #end /* sky */ #if (components_flag) #macro msina_comp (main_color,interface_color,comp_index) merge { cylinder { <2,0,-0.5> <2,0,0.5> 1 texture{ Polished_Chrome pigment{color interface_color} finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0} } } difference { cylinder { <-1.5,0,-0.51> <-1.5,0,0.51> 5 } box { <-6,0,-0.6>,<6,6,0.6> rotate <0,0,30> } box { <-6,0,-0.6>,<6,-6,0.6> rotate <0,0,-30> } box { <-6,-6,-0.6>,<1.5,6,0.6> } } translate <1.5,0,0> texture{ Polished_Chrome pigment{color main_color} finish {ambient 0.55 diffuse 0.55 phong 1 reflection 0} } rotate <0,0,comp_index*60> } #end /* msina_comp macro */ #macro msina_text (string, scale_value, trans_value) text { ttf myfont string 0.3, 0 pigment { White } scale scale_value translate trans_value } #end /* msina_text macro */ msina_text ("TCP", 0.8, <3.1,-0.25,-0.58>) msina_comp (rgb <0.5,0.5,0.6>, rgb <0.7,0.4,0.0>, 0) msina_text ("IP", 1, <1.5,3.1,-0.58>) msina_comp (rgb <0.5,0.6,0.5>, rgb <0.7,0.4,0.0>, 1) msina_text ("Krypto", 0.6, <-3,3.1,-0.58>) msina_comp (rgb <0.6,0.5,0.6>, rgb <0.7,0.4,0.0>, 2) msina_text ("Key", 0.5, <-4.5,0.25,-0.58>) msina_text ("Manager", 0.5, <-4.8,-0.32,-0.58>) msina_comp (rgb <0.4,0.6,0.6>, rgb <0.7,0.4,0.0>, 3) msina_text ("Network", 0.6, <-3.2,-3.45,-0.58>) msina_comp (rgbt <0.6,0.4,0.4,0.5>, rgbt <0.7,0.4,0.0,0.5>, 4) msina_text ("Network", 0.6, <1.0,-3.45,-0.58>) msina_comp (rgb <0.6,0.6,0.4>, rgb <0.7,0.4,0.0>, 5) #end /* components */