release of voxel-2
This commit is contained in:
parent
85d6b57eee
commit
694066169c
@ -12,34 +12,36 @@ fi
|
||||
|
||||
./voxelize > WS/voxels.dat
|
||||
./vox2inc.awk < WS/voxels.dat > WS/voxels.inc
|
||||
grep NbrVox WS/voxels.inc
|
||||
|
||||
TMPNG="/dev/shm/voxvidz.png"
|
||||
NBIMG=360
|
||||
|
||||
for idx in $( seq 0 $(( NBIMG - 1)) )
|
||||
do
|
||||
|
||||
dst=$(printf "frames/voxel/%05d.png" $idx)
|
||||
delta=$( echo "scale=3 ; ${idx}/360" | bc -l)
|
||||
echo "Renderbox work on " $dst " tu" $delta
|
||||
delta=$( echo "scale=6 ; ${idx}/360" | bc -l)
|
||||
echo "Renderbox work on "$dst" delta = " $delta
|
||||
|
||||
povray -ishowvoxels.pov -K$idx ${POVOPT} \
|
||||
-O${TMPNG} 2> WS/toto.err
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "ERROR ERROR ERROR ERROR"
|
||||
echo "ERROR ERROR ERROR ERROR ERROR ERROR"
|
||||
tail -15 WS/toto.err
|
||||
sleep 20
|
||||
#exit 1
|
||||
fi
|
||||
|
||||
titre='>>> Voxelisation - tTh - avril 2022'
|
||||
titre='Voxelisation - tTh - avril 2022'
|
||||
numbers=$(tail -1 WS/camvox.log | \
|
||||
awk '{printf ">>> %6.3f %6.3f %6.3f", $1, $2, $3}')
|
||||
echo $numbers
|
||||
awk '{printf " %6.3f %6.3f %6.3f", $1, $2, $3}')
|
||||
echo "$numbers"
|
||||
|
||||
convert ${TMPNG} \
|
||||
-fill Cyan \
|
||||
-fill Gray70 \
|
||||
-kerning 1 \
|
||||
-pointsize 16 \
|
||||
-pointsize 24 \
|
||||
-font AvantGarde-Book \
|
||||
-gravity South-West \
|
||||
-annotate +20+32 "$titre" \
|
||||
@ -51,4 +53,4 @@ do
|
||||
|
||||
done
|
||||
|
||||
./encode.sh frames/voxel/ voxel-1.mp4
|
||||
./encode.sh frames/voxel/ voxel-2.mp4
|
||||
|
@ -17,7 +17,7 @@ global_settings {
|
||||
#declare VOXEL = object
|
||||
{
|
||||
// sphere { 0, 1.18 }
|
||||
#local D = 1.38;
|
||||
#local D = 1.0111;
|
||||
box { <-D, -D, -D>, <D, D, D> }
|
||||
}
|
||||
|
||||
@ -34,18 +34,18 @@ object {
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// light_source { <-12, 45, -25> color Gray70 }
|
||||
light_source { <-52, 5, -38> color Yellow*0.55 }
|
||||
light_source { <-52, 5, -38> color Yellow*0.45 }
|
||||
light_source { < 59, 5, 48> color Gray20 }
|
||||
light_source { < 3, -59, 8> color Red*0.75 }
|
||||
light_source { < 8, 61, 3> color Green*0.85 }
|
||||
light_source { < 3, 59, 8> color Red*0.65 }
|
||||
light_source { < 8, -61, 3> color Green*0.75 }
|
||||
|
||||
#declare NormClock = (clock/360);
|
||||
|
||||
#declare ECAM = 88 - 23*NormClock;
|
||||
#declare ECAM = 88 - (73*NormClock);
|
||||
#declare XCAM = ECAM * sin(radians(clock));
|
||||
#declare YCAM = -12;
|
||||
#declare ZCAM = ECAM * cos(radians(clock));
|
||||
#declare ACAM = 65 + (27*NormClock);
|
||||
#declare ACAM = 65 + (48*NormClock);
|
||||
|
||||
#if (0 = clock)
|
||||
#fopen CL "WS/camvox.log" write
|
||||
|
@ -9,7 +9,7 @@ BEGIN {
|
||||
print "union {"
|
||||
}
|
||||
|
||||
$4 > 145 {
|
||||
$4 > 500 {
|
||||
count = $4
|
||||
value = $5
|
||||
if (count > maxcount)
|
||||
|
@ -7,23 +7,25 @@
|
||||
program voxelize
|
||||
use fraktals
|
||||
|
||||
implicit none
|
||||
|
||||
integer, parameter :: DIM = 100
|
||||
integer, dimension(:,:,:), allocatable :: cube
|
||||
type(t_point3d), dimension(:), allocatable :: points
|
||||
integer :: errcode, foo
|
||||
integer :: ix, iy, iz
|
||||
double precision, dimension(4) :: coefs
|
||||
integer :: nbr_points
|
||||
double precision, dimension(4) :: coefs, KB
|
||||
double precision :: dval
|
||||
|
||||
! XXX foo = (DIM*DIM*DIM) / (1024)
|
||||
! XXX PRINT *, "memory request for cube (in Kwords) ", foo
|
||||
write(0, *) "--- start of voxelize"
|
||||
|
||||
allocate (cube(DIM,DIM,DIM), stat=errcode)
|
||||
if (0 .NE. errcode) then
|
||||
STOP " : NO ENOUGH MEMORY FOR CUBE"
|
||||
endif
|
||||
|
||||
nbr_points = 3100000
|
||||
nbr_points = 2800000
|
||||
allocate(points(nbr_points), stat=errcode)
|
||||
if (0 .NE. errcode) then
|
||||
STOP " : NO ENOUGH MEMORY FOR POINTS"
|
||||
@ -31,7 +33,10 @@ program voxelize
|
||||
|
||||
coefs(1) = 2.23 ; coefs(2) = 0.42
|
||||
coefs(3) = -0.64 ; coefs(4) = -2.42
|
||||
call compute_pickover(points, coefs)
|
||||
|
||||
KB(1) = 1.51 ; KB(2) = -1.89
|
||||
KB(3) = 1.69 ; KB(4) = 0.79
|
||||
call compute_pickover(points, KB)
|
||||
|
||||
call clear_cube(cube)
|
||||
|
||||
@ -46,7 +51,7 @@ program voxelize
|
||||
enddo
|
||||
|
||||
dval = DBLE(MAXVAL(cube))
|
||||
write(0, *) "--- cube maximum = ", dval
|
||||
write(0, *) "--- maximum of the cube= ", dval
|
||||
|
||||
do foo=1, nbr_points
|
||||
call fcoor2icoor(points(foo)%x, ix)
|
||||
@ -57,6 +62,9 @@ program voxelize
|
||||
DBLE(cube(ix,iy,iz)) / dval
|
||||
enddo
|
||||
|
||||
dval = DBLE(MAXVAL(cube))
|
||||
write(0, *) "--- end of voxelize"
|
||||
|
||||
!-----------------------------------------------------
|
||||
contains
|
||||
!-----------------------------------------------------
|
||||
@ -76,7 +84,7 @@ subroutine fcoor2icoor(in, out)
|
||||
if (outvalue .GE. DIM) out = DIM-1
|
||||
|
||||
end subroutine
|
||||
!-----------------------------------------------------
|
||||
!------------------------------------------------------------
|
||||
subroutine clear_cube(cube)
|
||||
type(integer), dimension(:,:,:), intent(out) :: cube
|
||||
|
||||
@ -91,7 +99,7 @@ subroutine clear_cube(cube)
|
||||
enddo
|
||||
|
||||
end subroutine
|
||||
!-----------------------------------------------------
|
||||
!------------------------------------------------------------
|
||||
subroutine spit_cube_as_union(fname, datas, notused)
|
||||
character(*) :: fname
|
||||
type(integer), dimension(:,:,:), intent(in) :: datas
|
||||
@ -106,6 +114,7 @@ subroutine spit_cube_as_union(fname, datas, notused)
|
||||
STOP ' : SPITUNION : FAIL OPEN OUTPUT FILE'
|
||||
endif
|
||||
|
||||
|
||||
close(fd)
|
||||
|
||||
end subroutine
|
||||
|
Loading…
Reference in New Issue
Block a user