From 5fb1b809e12191caff457748e16ac2f5395cfa71 Mon Sep 17 00:00:00 2001 From: Tonton Th Date: Sat, 25 Apr 2026 13:12:16 +0200 Subject: [PATCH] add and use the workspace --- Makefile | 16 ++++++++++++++-- WS/README.md | 3 +++ randomwalk.f90 | 2 +- spirale.f90 | 2 +- starfield.f90 | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 WS/README.md diff --git a/Makefile b/Makefile index de3e060..5f376ce 100644 --- a/Makefile +++ b/Makefile @@ -11,17 +11,29 @@ genplotting.o: genplotting.f90 Makefile starfield: starfield.f90 Makefile genplotting.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 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 gfortran -Wall $< genplotting.o -o $@ spirale.png: spirale Makefile - ./spirale > s.scratch - genplot2 -s 512x512 s.scratch a.tga + ./spirale + genplot2 -s 512x512 WS/spirale.scratch a.tga convert a.tga $@ # ----------------------------------------------- diff --git a/WS/README.md b/WS/README.md new file mode 100644 index 0000000..e7d9182 --- /dev/null +++ b/WS/README.md @@ -0,0 +1,3 @@ +# This is the work space. + +Used to store work files, like `a.scratch` plotting directives. diff --git a/randomwalk.f90 b/randomwalk.f90 index d08aa8a..7a408d7 100644 --- a/randomwalk.f90 +++ b/randomwalk.f90 @@ -10,7 +10,7 @@ program randomwalk write (0, '(A)') "----[ genplotting randomwalk ]----" call srand(time()) - call genp_init (0, 'randomwalk.scratch') + call genp_init (0, 'WS/randomwalk.scratch') do foo=1, 51 col = 2 + mod(foo, 4) call do_randomwalk(42, col) diff --git a/spirale.f90 b/spirale.f90 index a4ff4c3..afa5b0d 100644 --- a/spirale.f90 +++ b/spirale.f90 @@ -8,7 +8,7 @@ program 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 genp_end (0) diff --git a/starfield.f90 b/starfield.f90 index 7debea4..47f66c0 100644 --- a/starfield.f90 +++ b/starfield.f90 @@ -5,7 +5,7 @@ program starfield use genplotting implicit none write (0, '(A)') "----[ genplotting starfield ]----" - call genp_init (0, 'starfield.scratch') + call genp_init (0, 'WS/starfield.scratch') call do_starfield (451) call genp_end (0) contains