#version 3.7; global_settings { assumed_gamma 1.4 } #declare Fast = yes; #declare magiccode = "DmRmRUmRDmRmUm"; #declare magiccode = "RRRURRRU"; #declare commento = " "; #ifdef (file) #fopen magicfile "/tmp/magicfile.inc" read //#while (defined(magicfile)) #read (magicfile, magiccode, commento) //#end #fclose magicfile #end #declare RM_ambient=0.4; #include "colors.inc" #include "rm_rubiksmagic.inc" loadcustom ("rm_custom.jpg") //#declare RM_Decoration = RM_DecMatchbox; //#declare RM_Decoration = RM_DecTileId; #declare RM_Decoration = RM_DecLingao; #ifdef (marca) #declare RM_Decoration = marca; #end #declare RM_Partial = 0.9; #declare puzzle1 = object { RM_RubiksMagic(magiccode) }; #declare puzzle2 = object {puzzle1 rotate 180*z} #declare cornermin1 = min_extent (puzzle1); #declare cornermax1 = max_extent (puzzle1); #declare cornermin2 = min_extent (puzzle2); #declare cornermax2 = max_extent (puzzle2); #declare center1 = (cornermin1 + cornermax1)/2; #declare center2 = (cornermin2 + cornermax2)/2; #declare away = 2.0; object { puzzle1 translate - translate -away*RM_Size*x translate -cornermin1.y*y } object { puzzle1 translate - rotate 160*y translate away*RM_Size*x translate -cornermin1.y*y } object { puzzle2 translate - translate 2*away*RM_Size*z translate -cornermin2.y*y } text {ttf "timrom.ttf" magiccode 0.2, 0 pigment {Blue} finish { ambient .3 } rotate 90*x scale 1.5 translate -away*RM_Size*x translate -2.5*RM_Size*z translate 0.0*RM_Size*x translate 0.1*y } text {ttf "timrom.ttf" commento 0.2, 0 pigment {Black} finish { ambient .3 } rotate 90*x scale 1.2 translate -away*RM_Size*x translate -2.2*RM_Size*z translate 0.0*RM_Size*x translate 0.1*y } /* object { RM_RubiksMagic("DmRmRUmRDmRmUm") translate -RM_HalfSize*x translate RM_HalfSize*x rotate 90*z rotate 180*y translate RM_Size*x translate RM_HalfThickness*y translate 1*RM_HalfSize*y } */ camera { location <8, 9, -10>*4 // look_at 6.6/2-y*.4 look_at 3*(y+z) angle 35 } light_source { <20, 30, -10>, 1 fade_distance 60 fade_power 2 #if(!Fast) area_light x*4, y*4, 16, 16 jitter adaptive 1 circular orient #end } light_source { <-20, 20, -15>, .5 fade_distance 60 fade_power 2 #if(!Fast) area_light x*4, y*4, 16, 16 jitter adaptive 1 circular orient #end } //light_source //{ 0.5*<-20, 25, 5>, .5 // fade_distance 30 // fade_power 2 //} plane { y, 0 #if(Fast) pigment { rgb <1, .9, .7> } #else texture { average texture_map { #declare S = seed(0); #local ReflColor = .8*<1, .9, .7> + .2*<1,1,1>; #declare Ind = 0; #while(Ind < 20) [1 pigment { rgb <1, .9, .7> } normal { bumps .1 translate *100 scale .001 } finish { reflection { ReflColor*.1, ReflColor*.5 } } ] #declare Ind = Ind+1; #end } } #end }