add and use the workspace

This commit is contained in:
Tonton Th
2026-04-25 13:12:16 +02:00
parent 483fa3d13f
commit 5fb1b809e1
5 changed files with 20 additions and 5 deletions

View File

@@ -11,17 +11,29 @@ genplotting.o: genplotting.f90 Makefile
starfield: starfield.f90 Makefile genplotting.o starfield: starfield.f90 Makefile genplotting.o
gfortran -Wall $< genplotting.o -o $@ gfortran -Wall $< genplotting.o -o $@
starfield.png: starfield Makefile
./starfield
genplot2 -s 512x512 WS/starfield.scratch a.tga
convert a.tga $@
# -----------------------------------------------
randomwalk: randomwalk.f90 Makefile genplotting.o randomwalk: randomwalk.f90 Makefile genplotting.o
gfortran -Wall $< genplotting.o -o $@ gfortran -Wall $< genplotting.o -o $@
randomwalk.png: randomwalk Makefile
./randomwalk
genplot2 -s 512x512 WS/randomwalk.scratch a.tga
convert a.tga $@
# ----------------------------------------------- # -----------------------------------------------
spirale: spirale.f90 Makefile genplotting.o spirale: spirale.f90 Makefile genplotting.o
gfortran -Wall $< genplotting.o -o $@ gfortran -Wall $< genplotting.o -o $@
spirale.png: spirale Makefile spirale.png: spirale Makefile
./spirale > s.scratch ./spirale
genplot2 -s 512x512 s.scratch a.tga genplot2 -s 512x512 WS/spirale.scratch a.tga
convert a.tga $@ convert a.tga $@
# ----------------------------------------------- # -----------------------------------------------

3
WS/README.md Normal file
View File

@@ -0,0 +1,3 @@
# This is the work space.
Used to store work files, like `a.scratch` plotting directives.

View File

@@ -10,7 +10,7 @@ program randomwalk
write (0, '(A)') "----[ genplotting randomwalk ]----" write (0, '(A)') "----[ genplotting randomwalk ]----"
call srand(time()) call srand(time())
call genp_init (0, 'randomwalk.scratch') call genp_init (0, 'WS/randomwalk.scratch')
do foo=1, 51 do foo=1, 51
col = 2 + mod(foo, 4) col = 2 + mod(foo, 4)
call do_randomwalk(42, col) call do_randomwalk(42, col)

View File

@@ -8,7 +8,7 @@ program spirale
write (0, '(A)') "----[ genplotting spirale ]----" write (0, '(A)') "----[ genplotting spirale ]----"
call genp_init (0, 's.scratch') call genp_init (0, 'WS/spirale.scratch')
call do_spirale (1337, 0.51, 0.0666, 0.7) call do_spirale (1337, 0.51, 0.0666, 0.7)
call genp_end (0) call genp_end (0)

View File

@@ -5,7 +5,7 @@ program starfield
use genplotting use genplotting
implicit none implicit none
write (0, '(A)') "----[ genplotting starfield ]----" write (0, '(A)') "----[ genplotting starfield ]----"
call genp_init (0, 'starfield.scratch') call genp_init (0, 'WS/starfield.scratch')
call do_starfield (451) call do_starfield (451)
call genp_end (0) call genp_end (0)
contains contains