Compare commits
No commits in common. "6eac66c8180c1b20ddce7f1bddf1a145f931385e" and "5030fda56f3c1d83a492db5a7cc0cb28a2f43174" have entirely different histories.
6eac66c818
...
5030fda56f
@ -107,8 +107,8 @@ module bloubspace
|
||||
integer :: errcode, output, foo, spitted
|
||||
character(200) :: chaine
|
||||
|
||||
! write (0, '(" spitting", (I6), " bloubs to ", (A), " file")') &
|
||||
! towrite, trim(fname)
|
||||
write (0, '(" spitting", (I6), " bloubs to ", (A), " file")') &
|
||||
towrite, trim(fname)
|
||||
|
||||
open( newunit=output, &
|
||||
file=trim(fname), form='unformatted', &
|
||||
@ -131,8 +131,7 @@ module bloubspace
|
||||
enddo
|
||||
|
||||
close(output)
|
||||
write(0, '(1X, "spitted ", I0, " bloubs to .", A)') &
|
||||
spitted, trim(fname)
|
||||
write(0, '(1X, "spitted ", I0, " bloubs.")') spitted
|
||||
|
||||
end subroutine spit_bloubs_to_file
|
||||
! ----------------------------------------------------------------
|
||||
@ -234,47 +233,40 @@ module bloubspace
|
||||
real, parameter :: SH = 6.0
|
||||
real, parameter :: SV = 4.0
|
||||
|
||||
logical :: flag
|
||||
|
||||
flag = .FALSE.
|
||||
|
||||
! X axis
|
||||
if ((blb%px + blb%radius) .GT. SH) then
|
||||
blb%vx = -1.0 * blb%vx
|
||||
blb%px = SH - blb%radius
|
||||
blb%age = blb%age + 1
|
||||
endif
|
||||
if ((blb%px - blb%radius) .LT. -SH) then
|
||||
blb%vx = -1.0 * blb%vx
|
||||
blb%px = -SH + blb%radius
|
||||
flag = .TRUE.
|
||||
blb%age = blb%age + 1
|
||||
endif
|
||||
|
||||
! vertical axe Y
|
||||
if ((blb%py - blb%radius) .LT. -SV) then
|
||||
blb%vy = -1.0 * blb%vy
|
||||
blb%py = -SV + blb%radius
|
||||
flag = .TRUE.
|
||||
blb%age = blb%age + 1
|
||||
endif
|
||||
if ((blb%py + blb%radius) .GT. SV) then ! overshoot ?
|
||||
blb%vy = -1.0 * blb%vy
|
||||
blb%age = blb%age + 1
|
||||
blb%py = SV - blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
|
||||
! Z axis
|
||||
if ((blb%pz + blb%radius) .GT. SH) then
|
||||
blb%vz = -1.0 * blb%vz
|
||||
blb%age = blb%age + 1
|
||||
blb%pz = SH - blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
if ((blb%pz + blb%radius) .LT. -SH) then
|
||||
blb%vz = -1.0 * blb%vz
|
||||
blb%pz = -SH + blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
|
||||
if (flag) then
|
||||
blb%age = blb%age + 1
|
||||
blb%pz = -SH + blb%radius
|
||||
endif
|
||||
|
||||
end subroutine
|
||||
|
@ -73,17 +73,9 @@ contains
|
||||
type(t_bloubs), intent(in) :: bla, blb
|
||||
type(t_bloubs), intent(out) :: blr
|
||||
|
||||
real :: va, vb
|
||||
!-
|
||||
! XXX please insert here a static counter for the 'num' id
|
||||
!-
|
||||
|
||||
blr%nick = "merged "
|
||||
blr%num = 0 ! ???
|
||||
|
||||
va = bla%radius * bla%radius * bla%radius
|
||||
vb = blb%radius * blb%radius * blb%radius
|
||||
|
||||
blr%px = (bla%px + blb%px) / 2.0
|
||||
blr%py = (bla%py + blb%py) / 2.0
|
||||
blr%pz = (bla%pz + blb%pz) / 2.0
|
||||
@ -92,8 +84,8 @@ contains
|
||||
blr%vy = (bla%vy + blb%vy) / 2.0
|
||||
blr%vz = (bla%vz + blb%vz) / 2.0
|
||||
|
||||
blr%radius = (va + vb) ** 0.33333333333
|
||||
blr%age = min(bla%age, blb%age)
|
||||
blr%radius = (bla%radius + blb%radius)
|
||||
blr%age = max(bla%age, blb%age)
|
||||
|
||||
! bring it to life !
|
||||
blr%alive = .TRUE.
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
INCFILE="WS/bloubs.inc"
|
||||
TMPPNG="/dev/shm/bloubs7.png"
|
||||
POVOPT="+Q9 +a -v -d -W1024 -H768 -WT2"
|
||||
POVOPT="+Q9 +a -v -d -W800 -H600 -WT2"
|
||||
DDIR="frames/a"
|
||||
LOGERR="log.error"
|
||||
TXTCOLOR="#db4090"
|
||||
TXTCOLOR="#db2080"
|
||||
|
||||
BLOUBDATAS="WS/bloubs.data"
|
||||
BARYDATAS="WS/log.barycentres"
|
||||
@ -34,12 +34,12 @@ printf "\n#declare NbImg = %d;\n" $NBIMG > WS/nbimg.inc
|
||||
# first, we have to make a seminal buch of bloubs
|
||||
# --> this function need to be parametrizable
|
||||
#
|
||||
./genbloubs ${BLBS_IN} 666
|
||||
./genbloubs ${BLBS_IN} 97
|
||||
|
||||
for idx in $(seq 0 $((NBIMG-1)) )
|
||||
do
|
||||
|
||||
echo "================= run passe $idx ===================="
|
||||
echo "============== run passe $idx ===================="
|
||||
|
||||
# make the bloubs's data readable by POVray
|
||||
#
|
||||
@ -55,20 +55,21 @@ do
|
||||
sleep 90
|
||||
fi
|
||||
|
||||
td=$(date -u +'%F %R' | tr '01' 'ol')
|
||||
td=$(date -u +'%F %R:%S' | tr '01' 'ol')
|
||||
hi=$(printf "#%04d" $idx | tr '01' 'ol')
|
||||
count=$(tail -1 "WS/log.nb_bloubs" | tr '01' 'ol')
|
||||
count=$(tail -1 "WS/log.nb_bloubs")
|
||||
|
||||
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
||||
|
||||
convert ${TMPPNG} \
|
||||
-font Courier-Bold \
|
||||
-pointsize 32 \
|
||||
-pointsize 22 \
|
||||
-fill "$TXTCOLOR" \
|
||||
-gravity south-east \
|
||||
-annotate +25+5 "$td" \
|
||||
-gravity south-west \
|
||||
-annotate +25+5 "$hi" \
|
||||
-pointsize 28 \
|
||||
-gravity north-east \
|
||||
-annotate +45+5 "$count" \
|
||||
-gravity north-west \
|
||||
@ -82,7 +83,7 @@ do
|
||||
# mv ${BLBS_OUT} ${BLBS_IN}
|
||||
|
||||
echo "### run done"
|
||||
sleep 5
|
||||
sleep 10
|
||||
|
||||
done
|
||||
|
||||
|
@ -44,19 +44,16 @@ union {
|
||||
}
|
||||
}
|
||||
|
||||
cylinder { 0, -y, 30
|
||||
texture {
|
||||
pigment { color srgb <0.225, 0.244, 0.211> }
|
||||
finish { phong 0.18 metallic 0.25 reflection 0.15 }
|
||||
}
|
||||
translate -6.20*y
|
||||
}
|
||||
cylinder { 0, -y, 30 pigment { color White } translate -4.20*y}
|
||||
|
||||
sky_sphere {
|
||||
pigment { color Gray20 }
|
||||
emission rgb <0.01, 0.01, 0.01>
|
||||
emission rgb <0.1, 0.1, 0.1>
|
||||
}
|
||||
|
||||
|
||||
// object { cylinder { <0, 0, 0>, <10, 0, 0>, 0.05 pigment { color Cyan } } }
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
#declare Croisillon = object
|
||||
@ -76,63 +73,39 @@ object { Croisillon scale 0.80 translate <Bary_X, Bary_Y, Bary_Z> }
|
||||
// ----------------------------------------------------------
|
||||
|
||||
#declare BH = 6; // H = taille en horizontal
|
||||
#declare BV = 6; // V = taille en vertical
|
||||
#declare BV = 4; // V = taille en vertical
|
||||
#declare BR = 0.056;
|
||||
|
||||
#declare Une_Borne = object
|
||||
{
|
||||
merge {
|
||||
cylinder { <0, BV, 0>, <0, -BV, 0>, BR }
|
||||
cylinder { <0, 0.042, 0>, <0, -0.042, 0>, BR*1.90 }
|
||||
cylinder { <0, 0.036, 0>, <0, -0.036, 0>, BR*2 }
|
||||
}
|
||||
}
|
||||
|
||||
#local Ruc = BR * 0.90;
|
||||
#local Rud = BR * 0.30;
|
||||
|
||||
#declare Un_Cadre = object
|
||||
{
|
||||
merge {
|
||||
#local Ruc = BR * 0.90;
|
||||
cylinder { <-BH, 0, -BH>, <-BH, 0, BH>, Ruc }
|
||||
cylinder { < BH, 0, -BH>, < BH, 0, BH>, Ruc }
|
||||
cylinder { < BH, 0, -BH>, <-BH, 0, -BH>, Ruc }
|
||||
cylinder { < BH, 0, BH>, <-BH, 0, BH>, Ruc }
|
||||
cylinder { < BH, 0, 0>, <-BH, 0, 0>, Rud }
|
||||
cylinder { < 0, 0, -BH>, < 0, 0, BH>, Rud }
|
||||
}
|
||||
texture {
|
||||
pigment { color Gray50 }
|
||||
finish { phong 0.87 specular 0.57 }
|
||||
}
|
||||
}
|
||||
|
||||
#declare Montants = object
|
||||
{
|
||||
union {
|
||||
cylinder { <-BH, -BH, 0>, <-BH, BH, 0>, Rud }
|
||||
cylinder { < BH, -BH, 0>, < BH, BH, 0>, Rud }
|
||||
cylinder { < 0, -BH, -BH>, < 0, BH, -BH>, Rud }
|
||||
cylinder { < 0, -BH, BH>, < 0, BH, BH>, Rud }
|
||||
}
|
||||
texture {
|
||||
pigment { color Gray50 }
|
||||
finish { phong 0.57 specular 0.87 }
|
||||
}
|
||||
pigment { color Gray40 }
|
||||
}
|
||||
|
||||
#declare Les_Bornes = object
|
||||
{
|
||||
union {
|
||||
#local E = 0.0005;
|
||||
#local E = 0.0015;
|
||||
object { Un_Cadre translate y*(BV-E) }
|
||||
object { Un_Cadre translate -y*(BV-E) }
|
||||
|
||||
object { Montants }
|
||||
|
||||
#local G = Green * 0.80;
|
||||
object { Une_Borne translate <-BH, 0, -BH> pigment { color Blue } }
|
||||
object { Une_Borne translate < BH, 0, -BH> pigment { color G } }
|
||||
object { Une_Borne translate <-BH, 0, BH> pigment { color G } }
|
||||
object { Une_Borne translate < BH, 0, -BH> pigment { color Green } }
|
||||
object { Une_Borne translate <-BH, 0, BH> pigment { color Green } }
|
||||
object { Une_Borne translate < BH, 0, BH> pigment { color Red } }
|
||||
}
|
||||
}
|
||||
@ -160,12 +133,12 @@ union {
|
||||
}
|
||||
// ----------------------------------------------------------
|
||||
|
||||
light_source { < 19, 12+NormClock, -17> color Gray80 }
|
||||
light_source { <-14, 10-NormClock, -29> color Gray70 }
|
||||
light_source { <19, 12+NormClock, -17> color Gray80 }
|
||||
light_source { <12, 10-NormClock, -29> color Gray70 }
|
||||
|
||||
#declare XCAM = 5 - ( 10 * NormClock);
|
||||
#declare YCAM = -1.1 + (1.25 * NormClock);
|
||||
#declare ZCAM = -19.20;
|
||||
#declare YCAM = -1.1 + (1.15 * NormClock);
|
||||
#declare ZCAM = -16.50;
|
||||
|
||||
#declare XLAT = 0;
|
||||
#declare YLAT = 0;
|
||||
|
@ -35,16 +35,13 @@ BEGIN {
|
||||
by += $2
|
||||
bz += $3
|
||||
pigment = "pigment { color " color " }"
|
||||
printf "\tsphere { <%f, %f, %f>, %f \n\t\t%s }\n", \
|
||||
printf "\tsphere { <%f, %f, %f>, %f %s }\n", \
|
||||
$1, $2, $3, $4, pigment
|
||||
count++
|
||||
}
|
||||
|
||||
END {
|
||||
# print "\t}\n"
|
||||
print "\t} // end of union\n"
|
||||
print "finish { phong 0.67 specular 0.57 }\n"
|
||||
print "}\n"
|
||||
print "\t} // end of union\n}\n"
|
||||
print "#declare Nb_Bloubs = ", count, ";\n"
|
||||
print "#declare Bary_X = ", bx/count, ";";
|
||||
print "#declare Bary_Y = ", by/count, ";";
|
||||
|
Loading…
Reference in New Issue
Block a user