working on groundbase
This commit is contained in:
parent
afbeaaf887
commit
ba9c8e47c7
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ DIMS = -W1600 -H1200
|
||||
POVOPT = +q9 +A -d
|
||||
POVDEP = contexte.inc hexacone.inc hexabenz.inc \
|
||||
globals.inc hexawood.inc datas/hf.png \
|
||||
dynamic.inc trident.inc
|
||||
dynamic.inc trident.inc groundbase.inc
|
||||
|
||||
CK=180
|
||||
|
||||
|
110
contexte.inc
110
contexte.inc
@ -5,98 +5,12 @@
|
||||
/* voir aussi le fichier 'globals.inc' */
|
||||
|
||||
/* ======================================================= */
|
||||
/*
|
||||
* nouveau debut fevrier 2025 - we love raytracing
|
||||
*
|
||||
* une cabane pour faire riche.
|
||||
* une seule forme de cabane pour le moment
|
||||
*/
|
||||
#declare Base_cabane_forme = object
|
||||
{
|
||||
difference {
|
||||
#local Hc = 0.90;
|
||||
box { <-0.90, 0, 0>, <0.90, Hc, 0.80> }
|
||||
box { <-0.89, 0.01, -1> <0.89, Hc-0.01, 0.79> }
|
||||
#local Hc = Hc * 0.75;
|
||||
cylinder { <-1, Hc, -0.29>, <1, Hc, 0.29>, 0.09 }
|
||||
#undef Hc
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 }
|
||||
}
|
||||
#include "groundbase.inc"
|
||||
|
||||
#declare Cabane_Base_2 = object
|
||||
{
|
||||
object { Base_cabane_forme }
|
||||
texture { T_Beton_2 }
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
|
||||
#declare GroudBase_coin = object
|
||||
{
|
||||
merge {
|
||||
cylinder { 0, y*0.5, 0.09 }
|
||||
sphere { 0, 0.10 scale <1, 0.23, 1> translate y*0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
#declare GroundBase_a = object
|
||||
{
|
||||
union {
|
||||
#local Dx = 1.5;
|
||||
#local Dz = 1.0;
|
||||
box { <-Dx, 0, -Dz>, <Dx, H_base, Dz> }
|
||||
#local Ha = y*(H_base*2);
|
||||
cylinder { 0, Ha, 0.08 translate <Dx, 0, -Dz> }
|
||||
#local Hb = Ha * 1.17;
|
||||
cone { Ha, 0.08, Hb, 0.05 translate < Dx, 0, -Dz> }
|
||||
cone { Ha, 0.08, Hb, 0.05 translate <-Dx, 0, -Dz> }
|
||||
#undef Ha
|
||||
#undef Hb
|
||||
#undef Dx
|
||||
#undef Dz
|
||||
}
|
||||
texture { T_Grnt7 rotate 49 scale 0.22 }
|
||||
}
|
||||
|
||||
#declare GroundBase_b = object
|
||||
{
|
||||
#local Sz = SzBase - 0.14;
|
||||
union {
|
||||
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
||||
object { GroudBase_coin translate <-Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate <-Sz, 0, Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, Sz> }
|
||||
}
|
||||
texture { T_Grnt27 rotate 9 scale 0.32 }
|
||||
#undef Sz
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare La_GroundBase = object
|
||||
{
|
||||
union {
|
||||
object { GroundBase_b }
|
||||
/*
|
||||
* ici, mettre la cabane
|
||||
*/
|
||||
#local Dz = <0, 0, -7>;
|
||||
object { GroundBase_a translate Dz }
|
||||
object { Cabane_Base_2 rotate y*180 translate Dz }
|
||||
}
|
||||
translate y*H_sol
|
||||
}
|
||||
/* ======================================================= */
|
||||
|
||||
#macro GyroPhare_mat ()
|
||||
@ -222,27 +136,6 @@ blob {
|
||||
|
||||
/* ======================================================= */
|
||||
|
||||
#declare Le_Sol = object
|
||||
{
|
||||
height_field {
|
||||
png "datas/hf.png"
|
||||
smooth
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
texture {
|
||||
pigment {
|
||||
// color DarkGreen
|
||||
image_map { png "datas/cmap.png" }
|
||||
rotate x*90
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
}
|
||||
// normal { bumps 0.035 scale 0.186 }
|
||||
finish { phong 0.105 }
|
||||
}
|
||||
translate y*H_sol
|
||||
}
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
|
||||
@ -423,7 +316,6 @@ sky_sphere {
|
||||
#declare Le_Decor = object
|
||||
{
|
||||
union {
|
||||
object { Le_Sol }
|
||||
object { Underground }
|
||||
object { La_GroundBase }
|
||||
// object { Les_Bibelots }
|
||||
|
@ -24,7 +24,7 @@ global_settings {
|
||||
*/
|
||||
|
||||
#declare SzSol = 34;
|
||||
#declare H_sol = 0.500;
|
||||
#declare H_sol = 0.100;
|
||||
|
||||
#declare SzBase = 2.90;
|
||||
#declare H_base = 0.50;
|
||||
|
126
groundbase.inc
Normal file
126
groundbase.inc
Normal file
@ -0,0 +1,126 @@
|
||||
/*
|
||||
* _ _
|
||||
* __ _ _ __ ___ _ _ _ __ __| || |__ __ _ ___ ___
|
||||
* / _` || '__|/ _ \ | | | || '_ \ / _` || '_ \ / _` |/ __| / _ \
|
||||
* | (_| || | | (_) || |_| || | | || (_| || |_) || (_| |\__ \| __/
|
||||
* \__, ||_| \___/ \__,_||_| |_| \__,_||_.__/ \__,_||___/ \___|
|
||||
* |___/
|
||||
*
|
||||
* nouveau debut fevrier 2025 - we love raytracing
|
||||
*
|
||||
* une cabane pour faire riche.
|
||||
* une seule forme de cabane pour le moment
|
||||
*/
|
||||
#declare Base_cabane_forme = object
|
||||
{
|
||||
difference {
|
||||
#local Hc = 0.90;
|
||||
box { <-0.90, 0, 0>, <0.90, Hc, 0.80> }
|
||||
box { <-0.89, 0.01, -1> <0.89, Hc-0.01, 0.79> }
|
||||
#local Hc = Hc * 0.75;
|
||||
cylinder { <-1, Hc, -0.29>, <1, Hc, 0.29>, 0.09 }
|
||||
#undef Hc
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 }
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
#declare GroundBase_Sol = object
|
||||
{
|
||||
intersection {
|
||||
height_field {
|
||||
png "datas/hf.png" smooth
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
texture {
|
||||
pigment {
|
||||
image_map { png "datas/cmap.png" }
|
||||
rotate x*90
|
||||
translate <-.5, 0, -.5>
|
||||
scale <SzSol, 1, SzSol>
|
||||
}
|
||||
}
|
||||
}
|
||||
cylinder { -y*5, y*5, SzSol*0.45 }
|
||||
}
|
||||
finish { phong 0.105 }
|
||||
translate y*H_sol
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
||||
#declare GroundBase_a = object
|
||||
{
|
||||
union {
|
||||
#local Dx = 1.5;
|
||||
#local Dz = 1.0;
|
||||
box { <-Dx, 0, -Dz>, <Dx, H_base, Dz> }
|
||||
#local Ha = y*(H_base*2);
|
||||
cylinder { 0, Ha, 0.08 translate <Dx, 0, -Dz> }
|
||||
#local Hb = Ha * 1.17;
|
||||
cone { Ha, 0.08, Hb, 0.05 translate < Dx, 0, -Dz> }
|
||||
cone { Ha, 0.08, Hb, 0.05 translate <-Dx, 0, -Dz> }
|
||||
#undef Ha
|
||||
#undef Hb
|
||||
#undef Dx
|
||||
#undef Dz
|
||||
}
|
||||
texture { T_Grnt7 rotate 49 scale 0.22 }
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare GroudBase_coin = object
|
||||
{
|
||||
merge {
|
||||
cylinder { 0, y*0.5, 0.09 }
|
||||
sphere { 0, 0.10 scale <1, 0.23, 1> translate y*0.5 }
|
||||
}
|
||||
}
|
||||
|
||||
#declare GroundBase_b = object
|
||||
{
|
||||
#local Sz = SzBase - 0.14;
|
||||
union {
|
||||
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
||||
object { GroudBase_coin translate <-Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, -Sz> }
|
||||
object { GroudBase_coin translate <-Sz, 0, Sz> }
|
||||
object { GroudBase_coin translate < Sz, 0, Sz> }
|
||||
}
|
||||
texture { T_Grnt27 rotate 9 scale 0.32 }
|
||||
#undef Sz
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
#declare La_GroundBase = object
|
||||
{
|
||||
union {
|
||||
object { GroundBase_Sol }
|
||||
object { GroundBase_b translate y*H_sol }
|
||||
/*
|
||||
* ici, mettre la cabane
|
||||
*/
|
||||
#local Dz = <0, 0, -7>;
|
||||
// object { GroundBase_a translate Dz }
|
||||
object { Cabane_Base_2 rotate y*180 translate Dz }
|
||||
}
|
||||
translate y*(H_sol+H_base)
|
||||
}
|
||||
|
||||
/* ======================================================= */
|
Loading…
Reference in New Issue
Block a user