minor changes

This commit is contained in:
tTh 2023-02-11 20:28:05 +01:00
parent 18ec65d612
commit c05d80a223
6 changed files with 6 additions and 79 deletions

View File

@ -9,8 +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 faite par le et la gestion des pixels 'physiques' est faite par les
module externe `spitpgm`. modules externes `spitpgm` et `pixrgb`.
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
@ -38,3 +38,6 @@ Generally writen as a *sequencial unformated* file.
- Rajouter des formules - Rajouter des formules
- Ne pas procastiner sur le reste - Ne pas procastiner sur le reste
## See also
- https://www.maths.town/fractal-articles/mandelbulb/mandelbulb-all-powers/

View File

@ -153,5 +153,4 @@ function modulus2(pt)
modulus2 = real(pt)*real(pt) + imag(pt)*imag(pt) modulus2 = real(pt)*real(pt) + imag(pt)*imag(pt)
end end
!----------------------------------------------------- !-----------------------------------------------------
end module fraktals end module fraktals

View File

@ -25,7 +25,6 @@ program henon
!----------------------------------------------------- !-----------------------------------------------------
contains contains
!----------------------------------------------------- !-----------------------------------------------------
!----------------------------------------------------- !-----------------------------------------------------
subroutine compute_pixel_henon(a, b, maxpasse, passe, limit, rx, ry) subroutine compute_pixel_henon(a, b, maxpasse, passe, limit, rx, ry)
implicit none implicit none

View File

@ -1,33 +0,0 @@
!-----------------------------------------------------
! JULIA
! =====
! this is the main program
!-----------------------------------------------------
program julia
use spitpgm
use fraktals
implicit none
integer, dimension(512, 342) :: picz
integer :: argc
character(200) :: filename, string
real :: cx, cy
argc = IARGC()
if (3 .NE. argc) then
STOP ": JULIA PROGGY NEED PARAMETERS !"
endif
call getarg(1, filename)
call getarg(2, string) ; read (string, *) cx
call getarg(3, string) ; read (string, *) cy
call simple_julia(picz, cx, cy, 2500)
call spit_as_pgm_8(picz, trim(filename))
end program
!-----------------------------------------------------

View File

@ -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 ": LORENTZ NEED A FILENAME !"
endif
call getarg(1, filename)
write (0, "(A)") "Lorentz -> "//trim(filename)
call lorentz_0(picz, 50000)
call spit_as_pgm_8(picz, trim(filename))
end program
!-----------------------------------------------------

View File

@ -8,8 +8,6 @@ module xperiment
subroutine parasites_1(pic, cx, cy, maxiter) subroutine parasites_1(pic, cx, cy, maxiter)
implicit none implicit none
! here is the wtf
integer, intent(inout), dimension (:,:) :: pic integer, intent(inout), dimension (:,:) :: pic
real, intent(in) :: cx, cy real, intent(in) :: cx, cy
@ -23,22 +21,18 @@ subroutine parasites_1(pic, cx, cy, maxiter)
width = ubound(pic, 1) ; height = ubound(pic, 2) width = ubound(pic, 1) ; height = ubound(pic, 2)
coef = float(maxiter) coef = float(maxiter)
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)
burps = (RAND() .lt. 0.01) burps = (RAND() .lt. 0.01)
do iy = 1, height do iy = 1, height
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) = int(fx * fy * coef * 1.005)
else else
pic(ix, iy) = int(fx * fy * coef) pic(ix, iy) = int(fx * fy * coef)
endif endif
enddo enddo
enddo enddo
end subroutine parasites_1 end subroutine parasites_1
!--------------------------------------------------------------- !---------------------------------------------------------------
@ -52,13 +46,9 @@ subroutine loop_of_parasites_1(nbre, mode)
integer :: idx integer :: idx
if (mode .NE. 0) STOP "BAD MODE" if (mode .NE. 0) STOP "BAD MODE"
do idx = 0, nbre do idx = 0, nbre
write(0, *) "popcorn loop ", idx write(0, *) "popcorn loop ", idx
enddo enddo
end subroutine loop_of_parasites_1 end subroutine loop_of_parasites_1
!=============================================================== !===============================================================