evolution du pickover (premier essai)

This commit is contained in:
tth 2022-03-27 04:36:25 +02:00
parent 3621217402
commit d5ff30a545
4 changed files with 107 additions and 5 deletions

View File

@ -2,6 +2,10 @@
julia
pickover
lorentz
voxelize
evolvopick
WS/*.dat
*.pgm
*.gif

View File

@ -1,23 +1,28 @@
GFOPT = -Wall -Wextra -time -g -Imods/
GFOPT = -Wall -Wextra -time -g -pg -Imods/
# ---------------------------------------------
mods/spitpgm.o: mods/spitpgm.f90 Makefile
mods/spitpgm.o: mods/spitpgm.f90 Makefile
gfortran $(GFOPT) -c $< -o $@
mods/points3d.o: mods/points3d.f90 Makefile
gfortran $(GFOPT) -c $< -o $@
fraktals.o: fraktals.f90 Makefile
gfortran $(GFOPT) -c $<
OBJS = mods/spitpgm.o fraktals.o
DOT_O = mods/points3d.o
OBJS = mods/spitpgm.o mods/points3d.o fraktals.o
# ---------------------------------------------
julia: julia.f90 Makefile $(OBJS)
gfortran $(GFOPT) $< $(OBJS) -o $@
pickover: pickover.f90 Makefile $(OBJS) $(DOT_O)
pickover: pickover.f90 Makefile $(OBJS)
gfortran $(GFOPT) $< $(OBJS) -o $@
evolvopick: evolvopick.f90 Makefile $(OBJS)
gfortran $(GFOPT) $< $(OBJS) $(DOT_O) -o $@
voxelize: voxelize.f90 Makefile $(OBJS)

68
Fraktalism/evolvopick.f90 Normal file
View File

@ -0,0 +1,68 @@
program evolvopick
use spitpgm
use points3d
use fraktals
!-----------------------------------------------------
implicit none
double precision, dimension(4) :: KA, KB, KI
integer :: tick, nbsteps
double precision :: dptick
type(t_point3d), dimension(:), allocatable :: points
integer :: nbpoints
integer :: errcode
character (len=200) :: command
KA(1) = 2.24 ; KA(2) = 0.43
KA(3) = -0.65 ; KA(4) = -2.43
KB(1) = 1.11 ; KB(2) = 0.22
KB(3) = 1.65 ; KB(4) = -1.43
nbsteps = 1199
nbpoints = 26000
allocate(points(nbpoints), stat=errcode)
if (0 .NE. errcode) then
STOP " : EVOLVOPICK, NO ENOUGH MEMORY"
endif
do tick = 0, nbsteps
dptick = DBLE(tick) / DBLE(nbsteps)
! print *, tick, " ", dptick
call interp4dp(KA, KB, KI, dptick)
! print *, KI(1), KI(2), KI(3), KI(4)
write(0, '(1X, I8, 3X, 4F12.6)') tick, KI
call compute_pickover(points, KI)
call write_points3d(points, 7, 25990, 'WS/pick.dat')
write(command, '(A, I6)') './tracepick.sh ', tick
call execute_command_line (command, exitstat=errcode)
if (0 .NE. errcode) then
STOP ' : ERR RUN COMMAND !'
endif
enddo
!-----------------------------------------------------
contains
subroutine interp4dp (ina, inb, out, dpk)
double precision, dimension(4), intent(in) :: ina, inb
double precision, dimension(4), intent(out) :: out
double precision, intent(in) :: dpk
integer :: foo
do foo=1, 4
out(foo) = (ina(foo) * (1.0-dpk)) + (inb(foo) * (dpk))
enddo
end subroutine
end program evolvopick

25
Fraktalism/tracepick.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
POVOPT=" -d +q9 +a +W1024 +H768 -v +WT2"
TMPNG="/dev/shm/evolv.png"
outfile=$(printf "frames/pick3d/%05d.png" $1)
# echo $outfile
awk -f pick2pov.awk < WS/pick.dat > WS/pickover.inc
PASS=900
povray -ipick3d.pov -K120 ${POVOPT} \
Declare=NBPASS=${PASS} \
-O${TMPNG} 2> toto
convert ${TMPNG} \
-fill Gray50 \
-gravity South-West \
-pointsize 24 \
-annotate +20+10 "tTh" \
$outfile