HexaCone/essai.pov

156 lines
3.0 KiB
POVRay
Raw Normal View History

2024-12-16 03:53:42 +11:00
/*
2024-12-31 22:51:12 +11:00
* H E X A C O N E - E S S A I
2025-01-08 10:13:37 +11:00
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
2024-12-16 03:53:42 +11:00
*/
#version 3.7;
2024-12-29 14:56:10 +11:00
#include "globals.inc"
2024-12-24 06:09:00 +11:00
2024-12-16 03:53:42 +11:00
#include "contexte.inc"
2024-12-23 01:05:36 +11:00
#include "elements.inc"
2025-01-08 10:13:37 +11:00
#include "hexabenz.inc"
2024-12-23 01:05:36 +11:00
2025-02-10 05:02:32 +11:00
// =======================================================
/*
* nouveau debut fevrier 2025 - we love raytracing
*/
/*
* deux textures
*/
#declare T_Beton_1 = texture
{
pigment { color <0.9, 0.8, 0.8> }
normal { dents 0.75 scale 0.3 }
}
#declare T_Beton_2 = texture
{
pigment { color <0.9, 0.8, 0.8> }
normal { dents 0.25 scale 2 }
}
/*
* une seule forme de cabane pour le moment
*/
#declare Base_cabane_forme = object
{
difference {
box { <-0.90, 0, 0>, <0.90, 1.00, 0.80> }
box { <-0.89, -1, -1> <0.89, 0.99, 0.79> }
cylinder { <-1, 0.75, -0.23>, <1, 0.75, 0.23>, 0.09 }
}
}
/*
* comparaison des deux textures par le rendu
* de la meme forme de cabane.
*/
#declare Cabane_Base_1 = object
{
object { Base_cabane_forme }
texture { T_Beton_1 }
}
#declare Cabane_Base_2 = object
{
object { Base_cabane_forme }
texture { T_Beton_2 }
}
/*
* assemblage des deux versions face a face
*/
#declare Les_Cabanes = object
{
union {
#local E = 1.10;
object { Cabane_Base_1 rotate 270*y translate -x*E }
object { Cabane_Base_2 rotate 90*y translate x*E }
#undef E
}
}
2024-12-23 01:05:36 +11:00
// =======================================================
2025-01-27 13:34:51 +11:00
#declare QuadriPole = object
{
#local R = 0.02;
#local E = 0.25;
#local H = H_cone*2;
union {
cylinder { 0, y*H, R translate -x*E }
cylinder { 0, y*H, R translate x*E }
cylinder { 0, y*H, R translate -z*E }
cylinder { 0, y*H, R translate z*E }
}
texture { WIP_color }
#undef E
#undef H
#undef R
}
2025-01-14 10:38:40 +11:00
// =======================================================
2025-01-08 10:13:37 +11:00
#macro Bubble ()
sphere {
2025-01-27 13:34:51 +11:00
0, 0.065
2025-01-12 12:33:39 +11:00
#if ( rand(Rng1) < 0.333 )
texture { Ruby_Glass }
#elseif ( rand(Rng1) < 0.666 )
2025-01-14 10:38:40 +11:00
texture { Orange_Glass }
2025-01-12 12:33:39 +11:00
#else
2025-01-14 10:38:40 +11:00
texture { Gold_Nugget }
2025-01-08 10:13:37 +11:00
#end
}
#end
2024-12-21 00:24:45 +11:00
2025-01-08 10:13:37 +11:00
#macro Un_Machin ()
union {
2025-01-14 10:38:40 +11:00
#for (Y, 1, 8, 1)
2025-01-08 10:13:37 +11:00
object { Bubble() translate y*Y*0.1 }
#end
2024-12-31 22:51:12 +11:00
}
2025-01-08 10:13:37 +11:00
#end
2024-12-31 22:51:12 +11:00
2025-01-08 10:13:37 +11:00
#declare Les_Machins = object
{
union {
2025-02-10 05:02:32 +11:00
#local Rk = 3.95 + NormClock;
2025-01-27 13:34:51 +11:00
#for (foo, 0, 359, 45)
2025-01-14 10:38:40 +11:00
#local Xpos = Rk * sin(radians(foo));
#local Zpos = Rk * cos(radians(foo));
2025-01-27 13:34:51 +11:00
#local RND = rand(Rng1);
2025-02-10 05:02:32 +11:00
object { Un_Machin () translate <Xpos, 0, Zpos> }
2025-01-08 10:13:37 +11:00
#end
2025-01-27 13:34:51 +11:00
#undef RND
2025-01-14 10:38:40 +11:00
#undef Rk
2025-01-08 10:13:37 +11:00
}
}
2024-12-31 22:51:12 +11:00
2025-01-27 13:34:51 +11:00
// =======================================================
2025-02-10 05:02:32 +11:00
2025-02-04 11:06:18 +11:00
object { GroundBase }
2025-02-10 05:02:32 +11:00
object { Les_Cabanes rotate -y*(clock*0.75) translate y*H_base }
2025-02-04 11:06:18 +11:00
// object { OpenBox translate y*1.2 }
2025-02-10 05:02:32 +11:00
object { Les_Machins translate y*1.5 }
2025-01-27 13:34:51 +11:00
object { Le_Decor }
2024-12-31 22:51:12 +11:00
2025-02-10 05:02:32 +11:00
object { Repere translate y*2 }
2024-12-29 14:56:10 +11:00
// =======================================================
2024-12-16 03:53:42 +11:00
2025-01-14 10:38:40 +11:00
// light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
// light_source { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
2024-12-16 08:24:38 +11:00
2025-02-04 11:06:18 +11:00
#local CamX = -2.7 + (3.8*Cos_01(NormClock));
2025-01-27 13:34:51 +11:00
#local CamY = 1.81 + (4*sqrt(NormClock));
2025-02-04 11:06:18 +11:00
#local CamZ = 1.7 + (3.8*Cos_01(NormClock));
2024-12-16 03:53:42 +11:00
camera {
2025-02-10 05:02:32 +11:00
// fisheye
2025-01-14 10:38:40 +11:00
location <CamX, CamY, 9.99>
2025-01-27 13:34:51 +11:00
look_at <0, 0.5, 0>
2025-02-10 05:02:32 +11:00
angle 32 + 4*Cos_01(NormClock)
2024-12-16 03:53:42 +11:00
}