Compare commits

...

4 Commits

Author SHA1 Message Date
tTh aace571169 minor tweaks 2023-05-07 10:35:48 +02:00
tTh 5577bd1767 noisepic: first release 2023-05-07 10:33:43 +02:00
tTh 9049534157 oups? 2023-05-07 09:47:49 +02:00
tTh a1676f4bc9 typo 2023-05-07 08:53:58 +02:00
9 changed files with 91 additions and 12 deletions

View File

@ -86,8 +86,8 @@ subroutine julia_colormapped(pic, cx, cy, maxiter)
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)
pic(ix, iy)%g = mod(iter*59, 255)
pic(ix, iy)%b = mod(iter*41, 255)
endif
enddo ! iy
enddo ! ix

View File

@ -26,7 +26,7 @@ program julia
call getarg(2, string) ; read (string, *) cx
call getarg(3, string) ; read (string, *) cy
allocate(picz(640, 480))
allocate(picz(512, 342))
call julia_colormapped(picz, cx, cy, 500)
call rgbpix_spit_as_pnm_8(picz, trim(filename))

View File

@ -25,6 +25,8 @@ do
./mkjulia $img $cx $cy
sleep 145
done
./tagpicz.sh $workdir

View File

@ -15,12 +15,12 @@ fi
for img in $SDIR/*.pnm
do
mogrify \
-gravity South-East \
-font Courier \
-pointsize 12 \
-fill Yellow \
-annotate +10+10 "tTh 2023" \
mogrify \
-gravity South-East \
-font Courier \
-pointsize 12 \
-fill firebrick \
-annotate +10+10 "Konrad+tTh 2023" \
$img
echo "tagging " $img

1
GrafAnim/.gitignore vendored
View File

@ -3,6 +3,7 @@ essai
doubledice
doublegauss
trigofest
noisepic
*.scratch
*.genplot

View File

@ -20,6 +20,9 @@ trigofest: trigofest.f90 Makefile vue3axes.o utils_ga.o
gfortran $(GFOPT) $< ../Modules/pixrgb.o ../Modules/spitpgm.o \
utils_ga.o -o $@
noisepic: noisepic.f90 Makefile
gfortran $(GFOPT) $< ../Modules/spitpgm.o -o $@
# ---- modules locaux
usegenplot.o: usegenplot.f90 Makefile

View File

@ -4,7 +4,7 @@ program doublegauss
implicit none
type(t_pixrgb), allocatable :: pic(:,:)
character (len=80) :: filename
character (len=280) :: filename
integer :: pass, iter
integer :: xrnd, yrnd

73
GrafAnim/noisepic.f90 Normal file
View File

@ -0,0 +1,73 @@
program noisepic
use spitpgm
implicit none
integer :: numframe = 0
integer :: nbarg
character(len=256) :: arg
nbarg = IARGC()
if (nbarg .GT. 0) then
call GETARG(1, arg)
! write (0, '(A40, A5)') "argument = ", arg
read (arg, *) numframe
endif
call make_noise_pic(numframe)
contains
!-- ------------------------------------------------------------------
subroutine make_noise_pic (value)
integer, intent(in) :: value
integer :: foo
integer, dimension(:,:), allocatable :: pic
character (len=280) :: filename
allocate(pic(320, 240))
pic = 0
call srand(value+34)
foo = irand()
print *, 'val=', value, ' rnd=', foo
call plot_noise_pic(pic, 15000)
write (filename, "(a, i5.5, a)") "", value, ".pgm"
call spit_as_pgm_8(pic, trim(filename))
end subroutine
!-- ------------------------------------------------------------------
subroutine plot_noise_pic(picz, nbre)
integer, dimension(:,:), intent(inout) :: picz
integer, intent(in) :: nbre
integer :: width, height
integer :: quux, ix, iy, iv
width = ubound(picz, 1) ; height = ubound(picz, 2)
! print *, 'sz picz', width, height
do quux=1, nbre
ix = 1 + mod ( irand(), width )
iy = 1 + mod ( irand(), height )
iv = mod ( irand(), 256 )
! print *, ix, iy
picz(ix, iy) = iv
enddo
end subroutine
!-- ------------------------------------------------------------------
end program

View File

@ -83,8 +83,8 @@ subroutine plot_a_dot(pic, ix, iy, val)
end subroutine
!-------------------------------------------------------------
! La premirere spirale
! --------------------
! La premiere spirale
! -------------------
subroutine spirale(pic, inirad, param)
implicit none