Compare commits

..

7 Commits

Author SHA1 Message Date
tTh
a1c0bf6e34 add a useless prog 2022-12-23 21:13:47 +01:00
tTh
3c94d61e24 fractint color maps module 1st shoot 2022-12-23 21:11:46 +01:00
tTh
7a254d2c02 bla 2022-12-23 12:25:28 +01:00
tTh
24cb13ad19 need more work... 2022-12-20 13:04:30 +01:00
tTh
c0d8ee443f need more tuning ? 2022-12-17 12:09:57 +01:00
tTh
252ea6d764 cosmetic tuning 2022-12-17 12:08:44 +01:00
tTh
6d935e5fd0 some clean after erratic modifications 2022-12-17 10:35:44 +01:00
20 changed files with 1146 additions and 33 deletions

View File

@ -6,6 +6,7 @@ voxelize
evolvopick evolvopick
henon henon
essai essai
plotcolmap
frames/* frames/*
WS/*.dat WS/*.dat

View File

@ -1,7 +1,7 @@
all: voxelize evolvopick pickover julia lorentz essai all: voxelize evolvopick pickover julia lorentz essai
GFOPT = -Wall -Wextra -time -g -O -Imods/ -I../Modules GFOPT = -Wall -Wextra -time -g -Imods/ -I../Modules
# --------------------------------------------- # ---------------------------------------------
# the module 'spitpgm' is now in $PROJECT/Modules # the module 'spitpgm' is now in $PROJECT/Modules
@ -16,29 +16,38 @@ mods/xperiment.o: mods/xperiment.f90 Makefile
fraktals.o: fraktals.f90 Makefile fraktals.o: fraktals.f90 Makefile
gfortran $(GFOPT) -c $< gfortran $(GFOPT) -c $<
OBJS = mods/points3d.o mods/xperiment.o fraktals.o OBJDEP = mods/points3d.o mods/xperiment.o fraktals.o mods/fractcolmap.o
OBJS = $(OBJDEP) ../Modules/spitpgm.o
# --------------------------------------------- # ---------------------------------------------
essai: essai.f90 Makefile $(OBJS) essai: essai.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
henon: henon.f90 Makefile $(OBJS) plotcolmap: plotcolmap.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
julia: julia.f90 Makefile $(OBJS) # ---------------------------------------------
henon: henon.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
pickover: pickover.f90 Makefile $(OBJS) julia: julia.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
evolvopick: evolvopick.f90 Makefile $(OBJS) pickover: pickover.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@
evolvopick: evolvopick.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) $(DOT_O) -o $@ gfortran $(GFOPT) $< $(OBJS) $(DOT_O) -o $@
voxelize: voxelize.f90 Makefile $(OBJS) voxelize: voxelize.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
lorentz: lorentz.f90 Makefile $(OBJS) lorentz: lorentz.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@
mkmandel: mkmandel.f90 Makefile $(OBJDEP)
gfortran $(GFOPT) $< $(OBJS) -o $@ gfortran $(GFOPT) $< $(OBJS) -o $@
# --------------------------------------------- # ---------------------------------------------

View File

@ -9,7 +9,8 @@ qui montre ma première expérience dans ce domaine.
## La technique ## La technique
Le gros des calculs de fractales est fait dans `mods/fraktals.f90`, Le gros des calculs de fractales est fait dans `mods/fraktals.f90`,
et la gestion des pixels 'physiques' est fait dans `mods/spitpgm`. et la gestion des pixels 'physiques' est faite par le
module externe `spitpgm`.
Les fonctions d'usage général sont dans Les fonctions d'usage général sont dans
[mods/](répertoire mods/) ave trop peu [mods/](répertoire mods/) ave trop peu
@ -19,6 +20,8 @@ Des scripts _shell_ sont utilisés pour construire les vidéos.
## File Formats ## File Formats
Certains programmes enregistrent des tables de points 3d dans
des fichiers.
``` ```
type t_point3d type t_point3d

View File

@ -23,10 +23,10 @@ program essai
allocate(picz(W,H), stat=errcode) allocate(picz(W,H), stat=errcode)
do foo=1, 360 do foo=1, 360
write (filename, "(a, i5.5, a)") "frames/popcorn/", foo, ".pnm" write (filename, "(a, i5.5, a)") "frames/popcorn/", foo-1, ".pnm"
write(0, *) "-------->", trim(filename), "<" write(0, *) "-------->", trim(filename), "<"
kx = 50.0 * sin(real(foo)*25.133) kx = 50.0 * sin(real(foo)*21.133)
ky = 50.0 * cos(real(foo)*25.133) ky = 50.0 * cos(real(foo)*26.133)
write(0, *) foo, kx, ky write(0, *) foo, kx, ky
call parasites_0(picz, kx, ky, 233) call parasites_0(picz, kx, ky, 233)
call spit_as_pgm_8(picz, trim(filename)) call spit_as_pgm_8(picz, trim(filename))

View File

@ -26,7 +26,7 @@ subroutine parasites_0(pic, cx, cy, maxiter)
! write(0, *) "constantes", cx, cy ! write(0, *) "constantes", cx, cy
width = ubound(pic, 1) ; height = ubound(pic, 2) width = ubound(pic, 1) ; height = ubound(pic, 2)
coef = float(maxiter) coef = float(maxiter) / 12.3456789
do ix = 1, width do ix = 1, width
fx = cx + (float(ix) / (float(width)/4.0) - 2.0) fx = cx + (float(ix) / (float(width)/4.0) - 2.0)
@ -35,9 +35,9 @@ subroutine parasites_0(pic, cx, cy, maxiter)
fy = cy + (float(iy) / (float(height)/4.0) - 2.0) fy = cy + (float(iy) / (float(height)/4.0) - 2.0)
if (burps) then if (burps) then
pic(ix, iy) = int(fx * fy * coef * 1.005) pic(ix, iy) = mod(int(fx * fy * coef * 1.005), 250)
else else
pic(ix, iy) = int(fx * fy * coef) pic(ix, iy) = mod(int(fx * fy * coef), 250)
endif endif
enddo enddo
@ -45,7 +45,6 @@ subroutine parasites_0(pic, cx, cy, maxiter)
end subroutine parasites_0 end subroutine parasites_0
!=============================================================== !===============================================================
subroutine simple_julia(pic, cx, cy, maxiter) subroutine simple_julia(pic, cx, cy, maxiter)

View File

@ -4,8 +4,8 @@
!----------------------------------------------------- !-----------------------------------------------------
subroutine plotsomething(pic, start, cz) subroutine plotsomething(pic, start, cz)
use cmplxmath ! use cmplxmath
use imagetools ! use imagetools
implicit none implicit none
@ -93,7 +93,7 @@ program mkmandel
end subroutine plotsomething end subroutine plotsomething
end interface end interface
integer, dimension(768, 768) :: picz integer, dimension(512, 512) :: picz
type (CenterMag) :: cm type (CenterMag) :: cm
integer :: angle integer :: angle
real :: radangle, radius real :: radangle, radius

5
Fraktalism/mods/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
t
*.pnm

View File

@ -2,8 +2,23 @@
# compiling fraktalism's modules # compiling fraktalism's modules
# #
GFOPT = -Wall -Wextra -time -g GFOPT = -Wall -Wextra -time -g -I../../Modules
all: xperiment.o points3d.o fractcolmap.o
points3d.o: points3d.f90 Makefile points3d.o: points3d.f90 Makefile
gfortran $(GFOPT) -c $< gfortran $(GFOPT) -c $<
xperiment.o: xperiment.f90 Makefile
gfortran $(GFOPT) -c $<
fractcolmap.o: fractcolmap.f90 Makefile
gfortran $(GFOPT) -c $<
# TEST PROGGY --------------------
OBJS = fractcolmap.o xperiment.o points3d.o
t: t.f90 Makefile $(OBJS)
gfortran $(GFOPT) $< $(OBJS) ../../Modules/pixrgb.o -o $@

View File

@ -9,3 +9,5 @@ avec un script de build bien robuste.
Troisième point : Faire la [documentation](documentation.md) Troisième point : Faire la [documentation](documentation.md)
Quatrilème point : Cultiver la techno-futilité.

356
Fraktalism/mods/chroma.map Normal file
View File

@ -0,0 +1,356 @@
48 48 48 'chromatic' color map
56 48 56 by Todd Hedenstrom
64 48 64
72 48 72
80 48 80
88 48 88
96 48 96
104 48 104
112 48 112
120 48 120
128 48 128
136 48 136
144 48 144
152 48 152
160 48 160
168 48 168
176 48 176
184 48 184
192 48 192
200 48 200
208 48 208
216 48 216
224 48 224
216 48 224
208 48 224
200 48 224
192 48 224
184 48 224
176 48 224
168 48 224
160 48 224
152 48 224
144 48 224
136 48 224
128 48 224
120 48 224
112 48 224
104 48 224
96 48 224
88 48 224
80 48 224
72 48 224
64 48 224
56 48 224
48 48 224
48 56 224
48 64 224
48 72 224
48 80 224
48 88 224
48 96 224
48 104 224
48 112 224
48 120 224
48 128 224
48 136 224
48 144 224
48 152 224
48 160 224
48 168 224
48 176 224
48 184 224
48 192 224
48 200 224
48 208 224
48 216 224
48 224 224
48 224 216
48 224 208
48 224 200
48 224 192
48 224 184
48 224 176
48 224 168
48 224 160
48 224 152
48 224 144
48 224 136
48 224 128
48 224 120
48 224 112
48 224 104
48 224 96
48 224 88
48 224 80
48 224 72
48 224 64
48 224 56
48 224 48
56 224 56
64 224 64
72 224 72
80 224 80
88 224 88
96 224 96
104 224 104
112 224 112
120 224 120
128 224 128
136 224 136
144 224 144
152 224 152
160 224 160
168 224 168
176 224 176
184 224 184
192 224 192
200 224 200
208 224 208
216 224 216
224 224 224
224 224 216
224 224 208
224 224 200
224 224 192
224 224 184
224 224 176
224 224 168
224 224 160
224 224 152
224 224 144
224 224 136
224 224 128
224 224 120
224 224 112
224 224 104
224 224 96
224 224 88
224 224 80
224 224 72
224 224 64
224 224 56
224 224 48
224 216 48
224 208 48
224 200 48
224 192 48
224 184 48
224 176 48
224 168 48
224 160 48
224 152 48
224 144 48
224 136 48
224 128 48
224 120 48
224 112 48
224 104 48
224 96 48
224 88 48
224 80 48
224 72 48
224 64 48
224 56 48
224 48 48
216 48 48
208 48 48
200 48 48
192 48 48
184 48 48
176 48 48
168 48 48
160 48 48
152 48 48
144 48 48
136 48 48
128 48 48
120 48 48
112 48 48
104 48 48
96 48 48
88 48 48
80 48 48
72 48 48
64 48 48
56 48 48
48 48 48
40 48 48
48 48 48
56 48 56
64 48 64
72 48 72
80 48 80
88 48 88
96 48 96
104 48 104
112 48 112
120 48 120
128 48 128
136 48 136
144 48 144
152 48 152
160 48 160
168 48 168
176 48 176
184 48 184
192 48 192
200 48 200
208 48 208
216 48 216
224 48 224
216 48 224
208 48 224
200 48 224
192 48 224
184 48 224
176 48 224
168 48 224
160 48 224
152 48 224
144 48 224
136 48 224
128 48 224
120 48 224
112 48 224
104 48 224
96 48 224
88 48 224
80 48 224
72 48 224
64 48 224
56 48 224
48 48 224
48 56 224
48 64 224
48 72 224
48 80 224
48 88 224
48 96 224
48 104 224
48 112 224
48 120 224
48 128 224
48 136 224
48 144 224
48 152 224
48 160 224
48 168 224
48 176 224
48 184 224
48 192 224
48 200 224
48 208 224
48 216 224
48 224 224
48 224 216
48 224 208
48 224 200
48 224 192
48 224 184
48 224 176
48 224 168
48 224 160
48 224 152
48 224 144
48 224 136
48 224 128
48 224 120
48 224 112
48 224 104
48 224 96
48 224 88
48 224 80
48 224 72
48 224 64
48 224 56
48 224 48
56 224 56
64 224 64
72 224 72
80 224 80
88 224 88
96 224 96
104 224 104
112 224 112
120 224 120
128 224 128
136 224 136
144 224 144
152 224 152
160 224 160
168 224 168
176 224 176
184 224 184
192 224 192
200 224 200
208 224 208
216 224 216
224 224 224
224 224 216
224 224 208
224 224 200
224 224 192
224 224 184
224 224 176
224 224 168
224 224 160
224 224 152
224 224 144
224 224 136
224 224 128
224 224 120
224 224 112
224 224 104
224 224 96
224 224 88
224 224 80
224 224 72
224 224 64
224 224 56
224 224 48
224 216 48
224 208 48
224 200 48
224 192 48
224 184 48
224 176 48
224 168 48
224 160 48
224 152 48
224 144 48
224 136 48
224 128 48
224 120 48
224 112 48
224 104 48
224 96 48
224 88 48
224 80 48
224 72 48
224 64 48
224 56 48
224 48 48
216 48 48
208 48 48
200 48 48
192 48 48
184 48 48
176 48 48
168 48 48
160 48 48
152 48 48
144 48 48
136 48 48
128 48 48
120 48 48
112 48 48
104 48 48
96 48 48
88 48 48
80 48 48
72 48 48
64 48 48
56 48 48
48 48 48
40 48 48

View File

@ -1,11 +1,18 @@
# La doc (enfin !) # La doc des modules (enfin !)
Non, détrompez-vous, ce n'est pas vraiment une doc, parce que
les codes des modules du fraktalisme est en perpétuelle évolution.
## Points 3d ## Points 3d
Bientôt les quaternions ? Bientôt les quaternions ?
## Portable Net Map ## Xperiment
Fichiers de type `PGM` utilisés ici en version 16 bits, donc Des trucs bizarres, qui migreront (un jour, peut-être...) vers
65536 niveaux de gris. d'autres modules.
## Fractint color mapfile
This is juste a [wip](fractcolmap.f90), stay tuned.

View File

@ -0,0 +1,118 @@
module fractcolmap
use pixrgb ! from Modules dir
implicit none
integer :: currmap(0:255, 3)
logical :: initialized = .FALSE.
contains
!-----------------------------------------------------
subroutine fcolm_infos(msg)
character(*), intent(in) :: msg
write(0, *) ' -> fractcolmap infos because [', msg, ']'
write(0, *) ' initialized is ', initialized
end subroutine
!-----------------------------------------------------
subroutine fcolm_load_mapfile(fname)
character(*), intent(in) :: fname
integer :: io, errcode, idx
integer :: ir, ig, ib
write(0, *) ' -> fractcolmap load file [', fname, ']'
! trying to get access to the datas
open(newunit=io, file=fname, iostat=errcode, action='read')
if (errcode .NE. 0) then
write(0, *) ' errcode :', errcode
write(0, *) ' FILE ', fname, ' NOT FOUND'
STOP 'BECAUSE FULL NUCKED, SORRY'
endif
! loop over all the data
do idx=0, 255
read(io, *) ir, ig, ib
! write(*, '("idx ", I5, " got rgb", 3I6)') idx, ir, ig, ib
currmap(idx, 1) = ir
currmap(idx, 2) = ig
currmap(idx, 3) = ib
enddo
! a few cleanup
close(io)
end subroutine
!-----------------------------------------------------
!-
! draw all the colors in a nice picture
!-
subroutine fcolm_plot_mapfile(fname)
character(*), intent(in) :: fname
type(t_pixrgb), allocatable :: prgb(:,:)
integer :: errcode, ix, iy, xx
integer :: rgb(3)
write(0, *) ' -> fractcolmap plot map to [', fname, ']'
allocate(prgb(512, 128), stat=errcode)
! Please, add a molly-guard
if (0 .NE. errcode) then
write(0, *) "errcode allocate in plot_map: ", errcode
STOP 'ABEND'
endif
print *, ' FILE ', fname
do ix = 1, 255
call fcolm_get_rgb(ix-1, rgb)
xx = ix * 2
! print *, ix, xx, " => ", rgb
do iy=1, 128
prgb( xx, iy)%r = rgb(1)
prgb(1+xx, iy)%r = rgb(1)
prgb( xx, iy)%g = rgb(2)
prgb(1+xx, iy)%g = rgb(2)
prgb( xx, iy)%b = rgb(3)
prgb(1+xx, iy)%b = rgb(3)
enddo
enddo
! push all the colred dats to disk
call rgbpix_spit_as_pnm_8(prgb, fname)
deallocate(prgb)
end subroutine
!-----------------------------------------------------
subroutine fcolm_get_rgb(idx, rgb)
integer, intent(in) :: idx
integer, intent(out) :: rgb(3)
rgb(1) = max(min(currmap(idx, 1), 255), 0) ! Red
rgb(2) = max(min(currmap(idx, 2), 255), 0) ! Green
rgb(3) = max(min(currmap(idx, 3), 255), 0) ! Blue
end subroutine
!-----------------------------------------------------
subroutine fcolm_make_gray()
integer :: idx
do idx=0, 255
currmap(idx, 1) = idx
currmap(idx, 2) = idx
currmap(idx, 3) = idx
enddo
initialized = .TRUE.
end subroutine
!-----------------------------------------------------
subroutine fcolm_print_map()
integer :: idx
do idx=0, 255
print *, currmap(idx, 1), currmap(idx, 2), currmap(idx, 3)
enddo
end subroutine
!-----------------------------------------------------
end module

256
Fraktalism/mods/neon.map Normal file
View File

@ -0,0 +1,256 @@
0 0 0 A flashy map ... by D. Egnor
0 0 0
8 0 0
16 4 4
24 4 8
32 8 12
40 12 16
48 12 20
56 16 24
64 20 28
72 20 32
80 24 36
88 28 40
96 28 44
104 32 48
112 36 52
120 36 56
128 40 60
136 40 64
144 44 68
152 48 72
160 48 76
168 52 80
176 56 84
184 56 88
192 60 92
200 64 96
208 64 100
216 68 104
224 72 108
232 72 112
240 76 116
252 80 120
248 80 120
240 76 116
232 76 112
224 72 108
216 68 104
208 68 100
200 64 96
192 60 92
184 60 88
176 56 84
168 56 80
160 52 76
152 48 72
144 48 68
136 44 64
128 40 60
120 40 60
112 36 56
104 36 52
96 32 48
88 28 44
80 28 40
72 24 36
64 20 32
56 20 28
48 16 24
40 16 20
32 12 16
24 8 12
16 8 8
8 4 4
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 4 0
0 12 0
0 20 0
0 28 0
0 36 0
0 44 0
0 52 0
0 60 0
0 68 0
0 76 0
0 84 0
0 92 0
0 100 0
0 108 0
0 116 0
0 124 0
0 132 0
0 140 0
0 148 0
0 156 0
0 164 0
0 172 0
0 180 0
0 188 0
0 196 0
0 204 0
0 212 0
0 220 0
0 228 0
0 236 0
0 244 0
0 252 0
0 248 0
0 240 0
0 232 0
0 224 0
0 216 0
0 208 0
0 200 0
0 192 0
0 184 0
0 176 0
0 168 0
0 160 0
0 152 0
0 144 0
0 136 0
0 128 0
0 120 0
0 112 0
0 104 0
0 96 0
0 88 0
0 80 0
0 72 0
0 64 0
0 56 0
0 48 0
0 40 0
0 32 0
0 24 0
0 16 0
0 8 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
4 4 0
12 12 0
20 20 0
28 28 0
36 36 0
44 44 0
52 52 0
60 60 0
68 68 0
76 76 0
84 84 0
92 92 0
100 100 0
108 108 0
116 116 0
124 124 0
132 132 0
140 140 0
148 148 0
156 156 0
164 164 0
172 172 0
180 180 0
188 188 0
196 196 0
204 204 0
212 212 0
220 220 0
228 228 0
236 236 0
244 244 0
252 252 0
248 248 0
240 240 0
232 232 0
224 224 0
216 216 0
208 208 0
200 200 0
192 192 0
184 184 0
176 176 0
168 168 0
160 160 0
152 152 0
144 144 0
136 136 0
128 128 0
120 120 0
112 112 0
104 104 0
96 96 0
88 88 0
80 80 0
72 72 0
64 64 0
56 56 0
48 48 0
40 40 0
32 32 0
24 24 0
16 16 0
8 8 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

37
Fraktalism/mods/t.f90 Normal file
View File

@ -0,0 +1,37 @@
program t
use fractcolmap
call fcolm_infos('from main')
! call fcolm_make_gray()
call fcolm_load_mapfile('volcano.map')
call fcolm_plot_mapfile('volcano.pnm')
call fcolm_load_mapfile('neon.map')
call fcolm_plot_mapfile('neon.pnm')
call fcolm_load_mapfile('chroma.map')
call fcolm_plot_mapfile('chroma.pnm')
STOP 'BECAUSE YOU WAS OUMPFED.'
contains
!-------------------
subroutine print_boundaries()
integer :: foo
integer :: cmp(3)
do foo=-2, 5
call fcolm_get_rgb(foo, cmp)
print *, foo, ' --> ', cmp
enddo
do foo=252, 257
call fcolm_get_rgb(foo, cmp)
print *, foo, ' --> ', cmp
enddo
end subroutine
end program

256
Fraktalism/mods/volcano.map Normal file
View File

@ -0,0 +1,256 @@
0 0 0 An explosion of lava ... by D. Egnor
60 60 60
64 60 60
72 60 60
76 56 56
84 56 56
88 52 52
96 52 52
100 48 48
108 48 48
112 44 44
120 44 44
128 40 40
132 40 40
140 36 36
144 36 36
152 32 32
156 32 32
164 28 28
168 28 28
176 24 24
180 24 24
188 20 20
196 20 20
200 16 16
208 16 16
212 12 12
220 12 12
224 8 8
232 8 8
236 4 4
244 4 4
252 0 0
252 4 0
252 12 0
252 20 0
252 28 0
252 36 0
252 44 0
252 52 0
252 60 0
252 68 0
252 76 0
252 84 0
252 92 0
252 100 0
252 108 0
252 116 0
252 124 0
252 132 0
252 140 0
252 148 0
252 156 0
252 164 0
252 172 0
252 180 0
252 188 0
252 196 0
252 204 0
252 212 0
252 220 0
252 228 0
252 236 0
252 244 0
252 252 0
252 252 4
252 252 12
252 252 20
252 252 28
252 252 36
252 252 44
252 252 52
252 252 60
252 252 68
252 252 76
252 252 84
252 252 92
252 252 100
252 252 108
252 252 116
252 252 124
252 252 132
252 252 140
252 252 148
252 252 156
252 252 164
252 252 172
252 252 180
252 252 188
252 252 196
252 252 204
252 252 212
252 252 220
252 252 228
252 252 236
252 252 244
252 252 252
252 252 252
252 248 248
252 248 244
252 244 240
252 244 236
252 240 232
252 240 228
252 236 224
252 236 220
252 232 216
252 232 212
252 228 208
252 228 204
252 224 200
252 224 196
252 220 192
252 220 188
252 216 184
252 216 180
252 212 176
252 212 172
252 208 168
252 208 164
252 204 160
252 204 156
252 200 152
252 200 148
252 196 144
252 196 140
252 192 136
252 192 132
252 188 128
252 184 124
252 184 120
252 180 116
252 180 112
252 176 108
252 176 104
252 172 100
252 172 96
252 168 92
252 168 88
252 164 84
252 164 80
252 160 76
252 160 72
252 156 68
252 156 64
252 152 60
252 152 56
252 148 52
252 148 48
252 144 44
252 144 40
252 140 36
252 140 32
252 136 28
252 136 24
252 132 20
252 132 16
252 128 12
252 128 8
252 124 4
252 120 0
252 120 0
252 116 0
252 112 0
252 108 0
252 104 0
252 100 0
252 96 0
252 92 0
252 88 0
252 84 0
252 80 0
252 76 0
252 72 0
252 68 0
252 64 0
252 60 0
252 60 0
252 56 0
252 52 0
252 48 0
252 44 0
252 40 0
252 36 0
252 32 0
252 28 0
252 24 0
252 20 0
252 16 0
252 12 0
252 8 0
252 4 0
252 0 0
252 0 0
248 0 0
244 0 0
244 0 0
240 0 0
236 0 0
232 0 0
232 0 0
228 0 0
224 0 0
224 0 0
220 0 0
216 0 0
212 0 0
212 0 0
208 0 0
204 0 0
204 0 0
200 0 0
196 0 0
192 0 0
192 0 0
188 0 0
184 0 0
184 0 0
180 0 0
176 0 0
172 0 0
172 0 0
168 0 0
164 0 0
160 0 0
160 0 0
156 4 4
152 4 4
148 8 8
144 8 8
140 12 12
140 12 12
136 16 16
132 16 16
128 20 20
124 20 20
120 24 24
120 24 24
116 28 28
112 28 28
108 32 32
104 32 32
100 36 36
100 36 36
96 40 40
92 40 40
88 44 44
84 44 44
80 48 48
80 48 48
76 52 52
72 52 52
68 56 56
64 56 56
60 60 60
60 60 60

View File

@ -6,7 +6,7 @@ module xperiment
!=============================================================== !===============================================================
! nouveau 24 mai 2022 ! nouveau 24 mai 2022
subroutine parasites_0(pic, cx, cy, maxiter) subroutine parasites_1(pic, cx, cy, maxiter)
implicit none implicit none
! here is the wtf ! here is the wtf
@ -39,13 +39,13 @@ subroutine parasites_0(pic, cx, cy, maxiter)
enddo enddo
enddo enddo
end subroutine parasites_0 end subroutine parasites_1
!--------------------------------------------------------------- !---------------------------------------------------------------
! !
! aucune idee de l'utilisation de ce truc ! ! aucune idee de l'utilisation de ce truc !
! !
subroutine loop_of_parasites_0(nbre, mode) subroutine loop_of_parasites_1(nbre, mode)
implicit none implicit none
integer, intent(in) :: nbre, mode integer, intent(in) :: nbre, mode
@ -59,7 +59,7 @@ subroutine loop_of_parasites_0(nbre, mode)
enddo enddo
end subroutine loop_of_parasites_0 end subroutine loop_of_parasites_1
!=============================================================== !===============================================================
end module xperiment end module xperiment

23
Fraktalism/plotcolmap.f90 Normal file
View File

@ -0,0 +1,23 @@
program plotcolmap
use spitpgm
use fractcolmap
implicit none
integer :: argc
character(200) :: mapname, plotname
! -------check for command line arguments
argc = IARGC()
if (2 .NE. argc) then
STOP 'BECAUSE I NEED TWO ARGS'
endif
call getarg(1, mapname)
call getarg(2, plotname)
call fcolm_infos('from plotcolmap')
call fcolm_load_mapfile(trim(mapname))
call fcolm_plot_mapfile(trim(plotname))
end program

View File

@ -39,7 +39,7 @@ contains
end do end do
end do end do
call rgbpix_spit_as_pnm(pixrgb, "rgb.pnm") call rgbpix_spit_as_pnm_8(pixrgb, "rgb.pnm")
deallocate(pixrgb) deallocate(pixrgb)

View File

@ -15,7 +15,7 @@ end type
contains contains
!------------------------------------------------------------------- !-------------------------------------------------------------------
!- !-
subroutine rgbpix_spit_as_pnm(pic, fname) subroutine rgbpix_spit_as_pnm_8(pic, fname)
type(t_pixrgb), intent(in) :: pic(:,:) type(t_pixrgb), intent(in) :: pic(:,:)
character (len=*), intent(in) :: fname character (len=*), intent(in) :: fname
@ -24,14 +24,39 @@ subroutine rgbpix_spit_as_pnm(pic, fname)
open(newunit=io, file=fname) open(newunit=io, file=fname)
write (io, '(a2)') "P3" write (io, '(a2)') "P3"
write (io, '("# spit_rgb_pnm")') write (io, '("# rgbpix_spit_as_pnm_8")')
write (io, '(i0," ",i0)') size(pic, 1), size(pic, 2) write (io, '(i0," ",i0)') size(pic, 1), size(pic, 2)
write (io, '(i0)') 255 write (io, '(i0)') 255
do iy=1, ubound(pic, 2) do iy=1, ubound(pic, 2)
do ix=1, ubound(pic, 1) do ix=1, ubound(pic, 1)
write(io, "(3I7)") pic(ix, iy)%r, pic(ix, iy)%g, pic(ix, iy)%b write(io, "(3I4)") pic(ix, iy)%r, pic(ix, iy)%g, pic(ix, iy)%b
enddo
enddo
close(unit=io)
end subroutine
!-------------------------------------------------------------------
!-
subroutine rgbpix_spit_as_pnm_16(pic, fname)
type(t_pixrgb), intent(in) :: pic(:,:)
character (len=*), intent(in) :: fname
integer :: io, ix, iy
open(newunit=io, file=fname)
write (io, '(a2)') "P3"
write (io, '("# rgbpix_spit_as_pnm_16")')
write (io, '(i0," ",i0)') size(pic, 1), size(pic, 2)
write (io, '(i0)') 65535
do iy=1, ubound(pic, 2)
do ix=1, ubound(pic, 1)
write(io, "(3I6)") pic(ix, iy)%r, pic(ix, iy)%g, pic(ix, iy)%b
enddo enddo
enddo enddo

View File

@ -87,6 +87,7 @@ subroutine spit_as_pgm_8(pic, fname)
! XXX print *, " max = ", foo ! XXX print *, " max = ", foo
open(newunit=io, file=fname) open(newunit=io, file=fname)
write (io, '(a2)') "P2" write (io, '(a2)') "P2"
write (io, '(A)') "# spit_as_pgm_8"
write (io, '(i0," ",i0)') size(pic, 1), size(pic, 2) write (io, '(i0," ",i0)') size(pic, 1), size(pic, 2)
write (io, '(i0)') 255 write (io, '(i0)') 255