68 lines
1.6 KiB
POVRay
68 lines
1.6 KiB
POVRay
/*
|
|
* SHOW VOXELS
|
|
*
|
|
* see also : vox2inc.awk voxelize.f90
|
|
*/
|
|
|
|
#version 3.7;
|
|
|
|
global_settings {
|
|
ambient_light rgb <0.04, 0.04, 0.04>
|
|
assumed_gamma 1.0
|
|
}
|
|
//----------------------------------------------------------------
|
|
|
|
#include "colors.inc"
|
|
|
|
#declare VOXEL = object
|
|
{
|
|
// sphere { 0, 1.18 }
|
|
#local D = 1.0111;
|
|
box { <-D, -D, -D>, <D, D, D> }
|
|
}
|
|
|
|
#include "WS/voxels.inc"
|
|
object {
|
|
Voxels
|
|
texture {
|
|
pigment { color White }
|
|
finish { phong 0.8 specular 0.8}
|
|
}
|
|
translate <-Bary_X, -Bary_Y, -Bary_Z>
|
|
rotate <clock*2, 0, clock*1.414>
|
|
}
|
|
|
|
//----------------------------------------------------------------
|
|
// light_source { <-12, 45, -25> color Gray70 }
|
|
light_source { <-52, 5, -38> color Yellow*0.45 }
|
|
light_source { < 59, 5, 48> color Gray20 }
|
|
light_source { < 3, 59, 8> color Red*0.65 }
|
|
light_source { < 8, -61, 3> color Green*0.75 }
|
|
|
|
#declare NormClock = (clock/360);
|
|
|
|
#declare ECAM = 88 - (73*NormClock);
|
|
#declare XCAM = ECAM * sin(radians(clock));
|
|
#declare YCAM = -12;
|
|
#declare ZCAM = ECAM * cos(radians(clock));
|
|
#declare ACAM = 65 + (48*NormClock);
|
|
|
|
#if (0 = clock)
|
|
#fopen CL "WS/camvox.log" write
|
|
#else
|
|
#fopen CL "WS/camvox.log" append
|
|
#end
|
|
#write (CL, NormClock, " ", ECAM, " ", ACAM, "\n")
|
|
#fclose CL
|
|
|
|
camera {
|
|
location <XCAM, YCAM, ZCAM>
|
|
// look_at <Bary_X, Bary_Y, Bary_Z>
|
|
look_at <0, 0, 0>
|
|
right x*image_width/image_height
|
|
angle ACAM
|
|
}
|
|
|
|
//----------------------------------------------------------------
|
|
//----------------------------------------------------------------
|