Compare commits
No commits in common. "b707b784bf90bb1fd6a6b7ca7d6ad7c94732d8af" and "da56a6d0c02bf9d3e442df3a07c9219fed526070" have entirely different histories.
b707b784bf
...
da56a6d0c0
2
Fraktalism/.gitignore
vendored
2
Fraktalism/.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
|
||||
mkjulia
|
||||
pickover
|
||||
mklorentz
|
||||
lorentz
|
||||
mkmandel
|
||||
voxelize
|
||||
evolvopick
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
all: essai voxelize evolvopick pickover \
|
||||
mkjulia mklorentz mkmandel
|
||||
all: voxelize evolvopick pickover mkjulia lorentz essai \
|
||||
mkmandel
|
||||
|
||||
GFOPT = -Wall -Wextra -time -g -Imods/ -I../Modules
|
||||
|
||||
@ -53,7 +53,7 @@ evolvopick: evolvopick.f90 Makefile $(OBJDEP)
|
||||
voxelize: voxelize.f90 Makefile $(OBJDEP)
|
||||
gfortran $(GFOPT) $< $(OBJS) -o $@
|
||||
|
||||
mklorentz: mklorentz.f90 Makefile $(OBJDEP)
|
||||
lorentz: lorentz.f90 Makefile $(OBJDEP)
|
||||
gfortran $(GFOPT) $< $(OBJS) -o $@
|
||||
|
||||
mkmandel: mkmandel.f90 Makefile $(OBJDEP)
|
||||
@ -61,8 +61,8 @@ mkmandel: mkmandel.f90 Makefile $(OBJDEP)
|
||||
|
||||
# ---------------------------------------------
|
||||
|
||||
lorentz.pgm: mklorentz Makefile
|
||||
./mklorentz $@ > /dev/null
|
||||
lorentz.pgm: lorentz Makefile
|
||||
./lorentz $@ > /dev/null
|
||||
|
||||
pickover.pgm: pickover Makefile
|
||||
./pickover $@ > /dev/null
|
||||
|
@ -12,34 +12,13 @@ SDIR="$1"
|
||||
FNAME="$2"
|
||||
echo "Encoding from " $SDIR " to " $FNAME
|
||||
|
||||
#
|
||||
# trying to guess the format of inoput files
|
||||
#
|
||||
firstfile=$(ls -1 $SDIR/* | head -1)
|
||||
echo "first file :" $firstfile
|
||||
filetype=$(file $firstfile | awk '{ print $2 }')
|
||||
echo "file type :" $filetype
|
||||
|
||||
#
|
||||
# this is BOGUS, replace file by identify ?
|
||||
#
|
||||
case $filetype in
|
||||
PNG) extension=".png" ;;
|
||||
Netpbm) extension=".pgm" ;;
|
||||
*) extension=".binary" ;;
|
||||
esac
|
||||
echo "extension :" $extension
|
||||
|
||||
|
||||
|
||||
TITLE='---{ experimental }---'
|
||||
|
||||
ffmpeg -nostdin \
|
||||
-loglevel warning \
|
||||
-y -r 30 -f image2 -i $SDIR/%05d.pnm \
|
||||
-y -r 25 -f image2 -i $SDIR/%05d.png \
|
||||
-metadata artist='---{ tTh }---' \
|
||||
-metadata title="${TITLE}" \
|
||||
-preset veryslow \
|
||||
-c:v libx264 -pix_fmt yuv420p \
|
||||
$FNAME
|
||||
|
||||
|
@ -13,7 +13,7 @@ subroutine simple_julia(pic, cx, cy, maxiter)
|
||||
integer, intent(in) :: maxiter
|
||||
|
||||
integer :: ix, iy, width, height
|
||||
real :: fx, fy
|
||||
real :: fx, fy, fv
|
||||
complex :: Z, C
|
||||
integer :: iter
|
||||
logical :: over_iter
|
||||
@ -49,49 +49,4 @@ subroutine simple_julia(pic, cx, cy, maxiter)
|
||||
|
||||
end subroutine simple_julia
|
||||
!===============================================================
|
||||
subroutine julia_colormapped(pic, cx, cy, maxiter)
|
||||
use pixrgb
|
||||
type(t_pixrgb), intent(inout), dimension (:,:) :: pic
|
||||
real, intent(in) :: cx, cy
|
||||
integer, intent(in) :: maxiter
|
||||
|
||||
integer :: ix, iy, width, height
|
||||
real :: fx, fy
|
||||
complex :: Z, C
|
||||
integer :: iter
|
||||
logical :: over_iter
|
||||
|
||||
width = ubound(pic, 1)
|
||||
height = ubound(pic, 2)
|
||||
C = complex(cx, cy)
|
||||
print *, "Color julia, const = ", C
|
||||
do ix = 1, width
|
||||
fx = (float(ix) / (float(width*2)/4.0) - 1.0)
|
||||
do iy = 1, height
|
||||
fy = (float(iy) / (float(height*2)/4.0) - 1.0)
|
||||
! ------ traitement du pixel
|
||||
iter = 0 ; over_iter = .FALSE.
|
||||
Z = complex(fx, fy)
|
||||
do while ((real(Z)*real(Z) + imag(Z)*imag(Z)) .LT. 4.0)
|
||||
Z = (Z * Z) + C
|
||||
iter = iter + 1
|
||||
if (iter .GE. maxiter) then
|
||||
over_iter = .TRUE.
|
||||
exit
|
||||
endif
|
||||
end do
|
||||
if (over_iter) then
|
||||
pic(ix, iy)%r = 0
|
||||
pic(ix, iy)%g = mod(abs(int(real(Z) *140)), 255)
|
||||
pic(ix, iy)%b = mod(abs(int(aimag(Z)*140)), 255)
|
||||
else
|
||||
pic(ix, iy)%r = mod(iter*33, 255)
|
||||
pic(ix, iy)%g = mod(iter*29, 255)
|
||||
pic(ix, iy)%b = mod(iter*21, 255)
|
||||
endif
|
||||
enddo ! iy
|
||||
enddo ! ix
|
||||
|
||||
end subroutine
|
||||
!===============================================================
|
||||
end module
|
||||
|
@ -8,11 +8,10 @@ program julia
|
||||
|
||||
use spitpgm
|
||||
use JULIAS
|
||||
use PIXRGB
|
||||
|
||||
implicit none
|
||||
|
||||
type(t_pixrgb), allocatable :: picz(:,:)
|
||||
integer, dimension(640, 480) :: picz
|
||||
integer :: argc
|
||||
character(200) :: filename, string
|
||||
real :: cx, cy
|
||||
@ -26,10 +25,8 @@ program julia
|
||||
call getarg(2, string) ; read (string, *) cx
|
||||
call getarg(3, string) ; read (string, *) cy
|
||||
|
||||
allocate(picz(640, 480))
|
||||
|
||||
call julia_colormapped(picz, cx, cy, 500)
|
||||
call rgbpix_spit_as_pnm_8(picz, trim(filename))
|
||||
call simple_julia(picz, cx, cy, 3500)
|
||||
call spit_as_pgm_8(picz, trim(filename))
|
||||
|
||||
end program
|
||||
|
||||
|
@ -14,23 +14,20 @@ fi
|
||||
#
|
||||
# run the prog
|
||||
#
|
||||
workdir="frames/julia/"
|
||||
for foo in $(seq 0 179)
|
||||
for foo in $(seq 0 99)
|
||||
do
|
||||
|
||||
img=$(printf "%s/%05d.pnm" $workdir $foo)
|
||||
img=$(printf "frames/julia/%05d.pgm" $foo)
|
||||
bar=$(echo "$foo / 247.0" | bc -l)
|
||||
cx=$(echo "0.5 * (1.52*c($foo/28.0))" | bc -l)
|
||||
cy=$(echo "0.5 * (1.45*s($foo/17.0))" | bc -l)
|
||||
cx=$(echo "0.7 * (2.72*c($foo/3))" | bc -l)
|
||||
cy=$(echo "0.5 * (1.45+s($foo/2))" | bc -l)
|
||||
|
||||
./mkjulia $img $cx $cy
|
||||
|
||||
done
|
||||
|
||||
./tagpicz.sh $workdir
|
||||
|
||||
echo ; echo "Encoding, please wait..."
|
||||
|
||||
convert -delay 10 $workdir/*.pnm color-julia.gif
|
||||
convert -delay 10 frames/julia/*.pgm foo.gif
|
||||
# animate foo.gif &
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
!
|
||||
! this is the main programm
|
||||
!
|
||||
!-----------------------------------------------------
|
||||
|
||||
program lorentz
|
||||
|
||||
use spitpgm
|
||||
use fraktals
|
||||
|
||||
implicit none
|
||||
|
||||
integer, dimension(800, 600) :: picz
|
||||
integer :: argc
|
||||
character(200) :: filename
|
||||
|
||||
argc = IARGC()
|
||||
if (1 .NE. argc) then
|
||||
STOP ": MKLORENTZ NEED A FILENAME !"
|
||||
endif
|
||||
|
||||
call getarg(1, filename)
|
||||
|
||||
write (0, "(A)") "Mk Lorentz -> "//trim(filename)
|
||||
|
||||
call lorentz_0(picz, 50000)
|
||||
call spit_as_pgm_8(picz, trim(filename))
|
||||
|
||||
end program
|
||||
|
||||
!-----------------------------------------------------
|
@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# THIS IS JUST A QUICK'N'DIRTY HACK !
|
||||
# DO NOT USE IT IN REAL LIFE !
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SDIR="frames/spool/"
|
||||
if [ $# -eq 1 ] ; then
|
||||
SDIR="$1"
|
||||
fi
|
||||
|
||||
for img in $SDIR/*.pnm
|
||||
do
|
||||
|
||||
mogrify \
|
||||
-gravity South-East \
|
||||
-font Courier \
|
||||
-pointsize 12 \
|
||||
-fill Yellow \
|
||||
-annotate +10+10 "tTh 2023" \
|
||||
$img
|
||||
echo "tagging " $img
|
||||
|
||||
done
|
Loading…
Reference in New Issue
Block a user