trying new things

This commit is contained in:
Tonton Th
2025-10-31 12:08:50 +01:00
parent 7c2fc424b3
commit 876d574eec
4 changed files with 270 additions and 87 deletions

199
essai.pov
View File

@@ -6,7 +6,6 @@
#version 3.7;
#include "globals.inc"
#debug "\n GLOBALS INCLUDED\n"
#include "contexte.inc"
@@ -16,18 +15,70 @@
#include "hexawood.inc"
#include "trident.inc"
// XXX
#include "xperiment.inc"
// XXX
// =======================================================
/* nouveau du 20 octobre 2025
* Un semblant de wagonnet qui va tourner sur le
* rail circulaire
*/
#macro Wagonnet_0 (Longueur)
object {
/* le corps */
merge {
#local L2 = Longueur / 2;
#local R = 0.50;
cylinder { <L2, 0, 0>, <-L2, 0, 0>, R }
sphere { <0, 0, 0>, R
scale <3, 1, 1>
translate x*L2
}
/* le kiosque (est-ce un sous-marin ?) */
sphere { <-L2, 0, 0>, R }
merge {
cylinder { <0, 0, 0>, <0, L2, 0>, R/4 }
sphere { <0, 0, 0>, R/4
scale <1, 0.4, 1> translate y*L2
}
scale <2, 1, 1> translate x*L2*0.70
}
#local R = rand(Rng1);
#if (R < 0.333)
texture { WIP_color }
#elseif (R < 0.666)
texture { GoldDark }
#else
texture { Flashy scale 17 }
#end
}
}
#end // macro
#declare Un_Wagonnet = object
{
#local R = 2;
object { Wagonnet_0 (3)
rotate y*clock
}
}
// =======================================================
/* nouveau du 7 octobre 2025 */
#macro Une_Boule ()
sphere {
0, 0.18
0, 0.1111 + (rand(Rng1) * 0.20)
#local R = rand(Rng1);
#if (R < 0.333)
pigment { color Red }
texture { C_Texture }
#elseif (R < 0.666)
pigment { color Green }
texture { M_Texture }
#else
pigment { color Blue }
texture { Y_Texture }
#end
}
#end // macro
@@ -39,132 +90,112 @@ sphere {
{
union {
#for (A, 0, 24, 1)
#local CK = (NormClock*60.00) + (A*0.07);
object { Une_Boule ()
#local TX = 2.6 * (A/10) * (0.5 - NormClock);
#local TY = 2 * abs(sin(clock*0.07*A));
#local TZ = 3.0 * cos(NormClock*0.08*A);
#local TX = 1.6 * sin(CK);
#local TY = 1.4 * cos(sin(CK));
#local TZ = 2.0 * cos(1-CK);
translate <TX, TY, TZ>
}
object { Repere scale 2 }
#end // for
}
finish { ambient 0 phong 1 }
//translate <-0.5, -0.5, -0.5> // recalage de l'objet fini
scale 1.3333333
}
// =======================================================
/*
* nouveau du 12 octobre 2025
* nouveau du 25 octobre 2025
*/
#macro Cahute_0 ()
#debug "Enter macro Cahute_0\n"
difference {
#local KX = 0.70;
#local KH = 1.60 + rand(Rng1) + rand(Rng1);
#local KZ = KX + (0.24*rand(Rng1));
box { <-KX, 0, -KZ>, <KX, KH, KZ> }
#local KX = KX * 0.99;
#local KH = KH * 0.99;
#local KZ = KZ * 0.99;
box { <-KX, 0, -KZ>, <KX, KH, KZ> }
cylinder { <-10, KH/2, 0>, <10, KH/2, 0>, KX * 0.741 }
#local R = rand(Rng1);
#debug concat("Random = ", str(R, 6, 4), "\n")
#if ( R < 0.33 )
texture { Flashy scale <17, 23, 5> }
#elseif ( R < 0.66 )
texture { T_Beton_1 }
#else
texture { T_Beton_2 }
#end // if
rotate y * (77 * rand(Rng1))
}
#end // macro
#declare Les_Cahutes = object
#declare Obj_BasicTexture = object
{
union {
#local K = 2.70;
object { Cahute_0 () translate -x * K }
object { Cahute_0 () translate x * K }
object { Cahute_0 () translate -z * K }
object { Cahute_0 () translate z * K }
#local R = 0.333;
merge {
cylinder { 0, y, R }
sphere { 0, R scale <1, 0.20, 1> translate y }
}
}
#declare BasicTextures = object
{
#local TR = 2.20;
union {
object { Obj_BasicTexture texture { R_Texture }
translate <TR, 0, 0> }
object { Obj_BasicTexture texture { G_Texture }
translate <0, 0, 0> }
object { Obj_BasicTexture texture { B_Texture }
translate <0, 0, TR> }
object { Obj_BasicTexture texture { Y_Texture }
translate < TR, 0, TR> }
object { Obj_BasicTexture texture { M_Texture }
translate <-TR, 0, TR> }
object { Obj_BasicTexture texture { C_Texture }
translate <-TR, 0, -TR> }
}
rotate y * (clock*3.33)
}
// =======================================================
#debug "ACTION !!!\n"
// ------------------------------------------------------ ##
#declare Tridents = object
{
#local RX = -11 + (80*sin(NormClock*9.81) + 3*sin(NormClock*23));
#local RZ = 96 - (54*Cos_010(NormClock));
union {
object { Trident_A () rotate <RX, 0, RZ>
translate < -1.5, 1.0, 0> }
object { Trident_A () rotate <0, clock, 0>
translate < 1.5, 1.8, 0> }
}
}
// ------------------------------------------------------ ##
#declare Gyros = object
{
// #debug " Les gyros !!!\n"
union {
#for (I, 0, 359, 30)
#declare E = 11;
#declare E = 12;
#declare Dx = E * sin(radians(I));
#declare Dz = E * cos(radians(I));
object { GyroPhare () translate <Dx, 0, Dz> }
// #debug " Gyro !!!\n"
#end
}
}
// ------------------------------------------------------ ##
object { Gyros }
#declare Selector = mod(int(clock/30), 6);
// ------------------------------------------------------ ##
#debug " !!! ACTION !!!\n"
// ------------------------------------------------------ ##
#declare Selector = mod(int(clock/60)+19, 8);
#debug concat("Selector = ", str(Selector, 6, 0), "\n")
#switch (Selector)
#case (0)
object { Tridents scale 1.12 rotate -y*(clock*0.666) }
object { OpenBox translate y*2.1 }
#break
#case (1)
object { Les_Cahutes scale 0.50 }
#break
object { Les_Arches rotate -y*(clock*0.666) }
#break
#case (2)
object { HexaWood rotate -y*(clock*0.38) translate y }
#break
#case (3)
object { Chose rotate x*5 rotate y*clock }
object { Chose () translate y*0.34 rotate -y*clock }
#break
#case (4)
object { HexaBenz () scale 2 translate 2.7*y rotate -y*clock }
#break
#case (5)
object { Les_Boules translate y }
object { Les_Boules translate y*0.8 }
#break
#end // switch selector
#case (6)
object { Un_Wagonnet translate y }
#break
#case (7)
#local Pos = <0, 0, 0>;
object { BasicTextures rotate -y*clock translate Pos }
#break
#end // switch selector
plane {
y, 0
texture { T_Planete_B scale 0.666 }
texture { Ground_Texture }
}
object { Repere translate y*1.0 }
// object { Repere translate y*1.0 }
// =======================================================
@@ -182,6 +213,6 @@ camera {
orthographic
#end
location <CamX, CamY, CamZ>
look_at <0, 1.4, 0>
angle 12 - 3*Cos_01(NormClock)
look_at <0, 1.6, 0>
angle 17 - 3*Cos_01(NormClock)
}