#version 3.7; global_settings { assumed_gamma 1.4 } #ifndef (Fast) #declare Fast = yes; #end #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.15; object { RM_RubiksMagic("RRRURRRU") // rectangle translate RM_HalfThickness*y + RM_Size*<-1.5,0,0.5> rotate -60*x translate RM_Size*2*z } object { RM_RubiksMagic("RULDLLDU") // solved puzzle (planar configuration) translate -RM_Size*(x+z) rotate 180*z translate RM_HalfThickness*y rotate 135*y } //#declare RM_Partial=0.15; object { RM_RubiksMagic("Rmp RmP Um Lm Dmp UmP Lm Dm") // this is the "periscope" configuration, slightly deformed rotate 90*z translate RM_HalfThickness*y translate RM_HalfSize*y rotate -30*y translate RM_Size*<-4,0,0> } object { RM_RubiksMagic("RmRmUmLmLmDvDmDv") // "the cube" translate RM_HalfThickness*y translate 3*RM_HalfSize*z rotate -135*x //rotate -30*y translate RM_Size*<-3,0,2.5> } camera { location <8, 9, -10>*3 //look_at 6.6/2-y*.4 look_at 1.2*RM_Size*y angle 35 } light_source { 2*<20, 30, -10>, 1 fade_distance 80 fade_power 2 #if(!Fast) area_light x*4, y*4, 16, 16 jitter adaptive 1 circular orient #end } light_source { 2*<-20, 20, -15>, .5 fade_distance 80 fade_power 2 #if(!Fast) area_light x*4, y*4, 16, 16 jitter adaptive 1 circular orient #end } 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 }