2022-12-03 12:25:37 +11:00
|
|
|
/*
|
|
|
|
* Visualisation en 3d d'une tentative de champ gravitationnel
|
|
|
|
*
|
|
|
|
* tTh novembre 2022
|
|
|
|
*/
|
|
|
|
|
|
|
|
#version 3.7;
|
|
|
|
global_settings {
|
|
|
|
ambient_light rgb <0.07, 0.05, 0.05>
|
|
|
|
assumed_gamma 1.0
|
|
|
|
max_trace_level 6
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "colors.inc"
|
|
|
|
|
2022-12-04 06:42:29 +11:00
|
|
|
#declare NormClock = clock / 2000.01;
|
2022-12-05 23:10:40 +11:00
|
|
|
#debug concat("- - - - - - - ", str(NormClock, 7, 5), "\n")
|
2022-12-04 06:42:29 +11:00
|
|
|
|
2022-12-03 12:25:37 +11:00
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2022-12-04 06:42:29 +11:00
|
|
|
#declare HFDIR = "WS/nanim/";
|
2022-12-03 12:25:37 +11:00
|
|
|
#declare HFCK = mod(clock, 2000);
|
|
|
|
#declare HFNAME = concat(HFDIR, str(HFCK , -5, 0), ".pgm");
|
2022-12-15 01:32:59 +11:00
|
|
|
|
|
|
|
#declare CMDIR = "WS/colmap/";
|
2022-12-17 07:16:02 +11:00
|
|
|
#declare CMNAME = concat(CMDIR, str(HFCK , -5, 0), ".pnm");
|
2022-12-15 01:32:59 +11:00
|
|
|
|
|
|
|
#debug concat("- - - - - - - ", HFNAME, " ", CMNAME, "\n")
|
2022-12-03 12:25:37 +11:00
|
|
|
|
|
|
|
#declare GravityField = object
|
|
|
|
{
|
|
|
|
height_field {
|
|
|
|
pgm HFNAME
|
|
|
|
smooth // on
|
|
|
|
translate <-0.5, 0, -0.5>
|
|
|
|
}
|
|
|
|
texture {
|
2022-12-15 01:32:59 +11:00
|
|
|
pigment {
|
2022-12-17 07:16:02 +11:00
|
|
|
image_map { ppm CMNAME }
|
2022-12-15 01:32:59 +11:00
|
|
|
// image_map { png "WS/mire1024.png" }
|
|
|
|
rotate x*90
|
|
|
|
translate <-0.5, 0, -0.5>
|
|
|
|
}
|
|
|
|
finish { phong 0.45 }
|
2022-12-03 12:25:37 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-12 03:00:58 +11:00
|
|
|
object { GravityField scale <4.10, 0.60, 4.10> }
|
2022-12-03 12:25:37 +11:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2023-02-16 03:41:17 +11:00
|
|
|
#if (0)
|
2022-12-05 23:10:40 +11:00
|
|
|
merge {
|
|
|
|
cylinder { <0, -0.5, 0>, <0, 1, 0>, 0.0175 }
|
|
|
|
sphere { <0, 1, 0>, 0.0175 }
|
|
|
|
pigment { color Red }
|
|
|
|
}
|
2023-02-16 03:41:17 +11:00
|
|
|
#end
|
2022-12-04 06:42:29 +11:00
|
|
|
|
2023-02-16 03:41:17 +11:00
|
|
|
light_source { < -2, 9.3, -7> color Gray80 }
|
2023-02-12 03:00:58 +11:00
|
|
|
light_source { < -6, 9.3, -8> color Orange*0.65 }
|
|
|
|
light_source { < -15, 2.3, 17> color Gray70 }
|
2022-12-03 12:25:37 +11:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
2023-02-16 03:41:17 +11:00
|
|
|
#declare Xcam = -5.05;
|
|
|
|
#declare Ycam = 2.5 - (1.7*NormClock);
|
|
|
|
#declare Zcam = -8 + (11.66*NormClock);
|
|
|
|
|
2022-12-03 12:25:37 +11:00
|
|
|
camera {
|
2023-02-16 03:41:17 +11:00
|
|
|
// omnimax
|
|
|
|
location <Xcam, Ycam, Zcam>
|
2022-12-03 12:25:37 +11:00
|
|
|
look_at <0, 0, 0>
|
|
|
|
right x*image_width/image_height
|
2023-02-16 03:41:17 +11:00
|
|
|
angle 34
|
2022-12-03 12:25:37 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|