#include "metals.inc" /* Test version of the mummy rendering intended for the holographic panoramagrams. Steps through a range of isosurfaces Changed from holopano2 to support 0.8mm holopixels */ // 0 for false, >0 for true #declare SHOWISO = 1; global_settings { ambient_light rgb <1,1,1> assumed_gamma 2 max_trace_level 10 } background { color rgb <0,0,0> } // Volume dimensions #declare NX = 256; #declare NY = 256; #declare NZ = 508; #declare ZSCALE = 1.5; #declare YROTATE = 0; #declare TRANS = transform { scale 0.5 rotate <0,0,90> scale <1,1,-ZSCALE> translate <-40,0,0> } // Camera settings #declare APERTURE = 74.2; #declare DIST = 873.6; #declare VP = ; #declare VD = <-1,0,0>; #declare VU = <0,0,1>; // The camera camera { perspective location VP up y right -image_width*x/image_height angle APERTURE sky VU look_at VP + VD } // Lights light_source { //VP color rgb <1,1,1> } // ************************ Isosurface ************************ #if (SHOWISO > 0) // Isosurface #declare thefinish = finish { ambient 0.2 diffuse 0.6 specular 0.25 } #declare NFRAMES = 1402; #declare ISOSTART = 2000; #declare ISOSTOP = 20000; // This wont work because the isosurface generator nor the CAT scan data // can be made available. Provided here for illustrative purposes only. #declare FNAME = concat("iso/",str(ISOSTOP+floor((ISOSTART-ISOSTOP)*frame_number/NFRAMES),-5,0),".inc"); #include FNAME #declare STARTCOLOUR = rgb <200,180,90>/255; #declare STOPCOLOUR = rgb <255,255,255>/255; difference { object { mesh2 { themesh } } plane { <0,-1,0>, -70 } texture { pigment { color STOPCOLOUR + (STARTCOLOUR - STOPCOLOUR) * clock } finish { thefinish } } transform { TRANS } no_shadow } #end // ************************ Bounding box ************************ #declare BALLSCALE = 1.5; #declare edgeradius = 4; #declare framefinish = finish { ambient 0.4 diffuse 0.7 specular 0.6 } #declare edgetexture = texture { //pigment { rgb <0.5,0.5,0.75> } pigment { P_Copper3 } finish { framefinish } } #declare balltexture = texture { //pigment { rgb <0.5,0.65,0.5> } pigment { P_Brass5 } finish { framefinish } } union { cylinder { <0,0,0>, <0,NY,0> , edgeradius texture { edgetexture } } cylinder { <0,NY,0>, , edgeradius texture { edgetexture } } cylinder { , , edgeradius texture { edgetexture } } cylinder { , <0,0,0> , edgeradius texture { edgetexture } } cylinder { <0,0,NZ*ZSCALE>, <0,NY,NZ*ZSCALE> , edgeradius texture { edgetexture } } cylinder { <0,NY,NZ*ZSCALE>, , edgeradius texture { edgetexture } } cylinder { , , edgeradius texture { edgetexture } } cylinder { , <0,0,NZ*ZSCALE> , edgeradius texture { edgetexture } } cylinder { <0,0,0>, <0,0,NZ*ZSCALE> , edgeradius texture { edgetexture } } cylinder { <0,NY,0>, <0,NY,NZ*ZSCALE> , edgeradius texture { edgetexture } } cylinder { , , edgeradius texture { edgetexture } } cylinder { , , edgeradius texture { edgetexture } } sphere { <0,0,0>, BALLSCALE*edgeradius texture { balltexture } } sphere { <0,NY,0>, BALLSCALE*edgeradius texture { balltexture } } sphere { <0,NY,NZ*ZSCALE>, BALLSCALE*edgeradius texture { balltexture } } sphere { <0,0,NZ*ZSCALE>, BALLSCALE*edgeradius texture { balltexture } } sphere { , BALLSCALE*edgeradius texture { balltexture } } sphere { , BALLSCALE*edgeradius texture { balltexture } } sphere { , BALLSCALE*edgeradius texture { balltexture } } sphere { , BALLSCALE*edgeradius texture { balltexture } } translate <-NX/2,-NY/2,-(NZ*ZSCALE)/2> scale 0.5 rotate <0,0,90> translate <-40,0,0> no_shadow } // ************************ Image plane ************************ polygon { 5, <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>, <0,0,0> texture { pigment { // Not provided but any replacement png image will do. image_map { png "painting.png"} } finish { ambient 1 diffuse 0 specular 0.0 } } rotate <0,90,0> scale <1,1.5*NY,NZ> translate <-NX/2,-1.5*NY/2,NZ/2> }