2022-04-03 06:44:24 +02:00
|
|
|
/*
|
|
|
|
* SHOW VOXELS
|
|
|
|
*
|
2022-04-15 17:13:07 +02:00
|
|
|
* see also : vox2inc.awk and voxelize.f90
|
2022-04-03 06:44:24 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#version 3.7;
|
|
|
|
|
|
|
|
global_settings {
|
2022-04-05 05:46:51 +02:00
|
|
|
ambient_light rgb <0.04, 0.04, 0.04>
|
2022-04-03 06:44:24 +02:00
|
|
|
assumed_gamma 1.0
|
|
|
|
}
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "colors.inc"
|
|
|
|
|
|
|
|
#declare VOXEL = object
|
|
|
|
{
|
|
|
|
// sphere { 0, 1.18 }
|
2022-04-15 17:13:07 +02:00
|
|
|
#local D = 1.92;
|
2022-04-03 06:44:24 +02:00
|
|
|
box { <-D, -D, -D>, <D, D, D> }
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "WS/voxels.inc"
|
|
|
|
object {
|
2022-04-05 05:46:51 +02:00
|
|
|
Voxels
|
|
|
|
texture {
|
|
|
|
pigment { color White }
|
2022-04-15 17:13:07 +02:00
|
|
|
finish { phong 0.6 specular 0.8 }
|
2022-04-05 05:46:51 +02:00
|
|
|
}
|
2022-04-15 17:13:07 +02:00
|
|
|
/*
|
|
|
|
* un peu de calcul empirique ?
|
|
|
|
*/
|
|
|
|
#local TRK = DIMC/2.0000000;
|
|
|
|
translate <-TRK, -TRK, -TRK>
|
|
|
|
// rotate <clock*0.22, 0, clock*0.17>
|
2022-04-03 06:44:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
2022-04-15 17:13:07 +02:00
|
|
|
#declare TriAxe = object
|
|
|
|
{
|
|
|
|
#local Sz = 300;
|
|
|
|
#local Ra = 0.20;
|
|
|
|
union {
|
|
|
|
cylinder { <-Sz, 0, 0>, <Sz, 0, 0>, Ra pigment { color Red } }
|
|
|
|
cylinder { <0, -Sz, 0>, <0, Sz, 0>, Ra pigment { color Green } }
|
|
|
|
cylinder { <0, 0, -Sz>, <0, 0, Sz>, Ra pigment { color Blue } }
|
|
|
|
}
|
|
|
|
finish { phong 0.6 specular 0.8 }
|
|
|
|
}
|
|
|
|
|
|
|
|
object { TriAxe }
|
|
|
|
|
|
|
|
plane {
|
|
|
|
<0, 1, 0>, -100
|
|
|
|
texture {
|
|
|
|
pigment { color srgb <0.203, 0.185, 0.191> }
|
|
|
|
finish { phong 0.18 metallic 0.55 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
light_source { <-29, 45, -27> color Gray70 }
|
|
|
|
light_source { <-52, 5, -48> color Yellow*0.45 }
|
|
|
|
light_source { < 59, 45, 48> color Gray20 }
|
|
|
|
light_source { < 59, -45, 48> color Gray20 }
|
|
|
|
light_source { < 9, 59, 18> color Red*0.65 }
|
|
|
|
light_source { < 8, -48, 3> color Green*0.75 }
|
|
|
|
|
|
|
|
#include "WS/nbimg.inc"
|
|
|
|
#declare NormClock = (clock/NbImg);
|
2022-04-03 06:44:24 +02:00
|
|
|
|
2022-04-15 17:13:07 +02:00
|
|
|
#declare ECAM = 190 - (100*NormClock);
|
|
|
|
#declare CKsmall = NormClock * 77.20;
|
|
|
|
#declare Offset = 0.10;
|
|
|
|
#declare XCAM = ECAM * (sin(radians(CKsmall)) + Offset);
|
|
|
|
#declare YCAM = 16;
|
|
|
|
#declare ZCAM = ECAM * (cos(radians(CKsmall)) + Offset);
|
|
|
|
#declare ACAM = 65 + (53*NormClock);
|
2022-04-05 05:46:51 +02:00
|
|
|
|
2022-04-15 17:13:07 +02:00
|
|
|
// #declare XCAM = ECAM * 0.8;
|
|
|
|
// #declare ZCAM = ECAM * 0.35;
|
2022-04-05 05:46:51 +02:00
|
|
|
|
|
|
|
#if (0 = clock)
|
|
|
|
#fopen CL "WS/camvox.log" write
|
|
|
|
#else
|
|
|
|
#fopen CL "WS/camvox.log" append
|
|
|
|
#end
|
2022-04-15 17:13:07 +02:00
|
|
|
#write (CL, clock, " ", NormClock, " ", ECAM, " ", ACAM, "\n")
|
2022-04-05 05:46:51 +02:00
|
|
|
#fclose CL
|
2022-04-03 06:44:24 +02:00
|
|
|
|
|
|
|
camera {
|
|
|
|
location <XCAM, YCAM, ZCAM>
|
|
|
|
// look_at <Bary_X, Bary_Y, Bary_Z>
|
|
|
|
look_at <0, 0, 0>
|
|
|
|
right x*image_width/image_height
|
2022-04-05 05:46:51 +02:00
|
|
|
angle ACAM
|
2022-04-03 06:44:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
//----------------------------------------------------------------
|