use the render procedure

This commit is contained in:
Tonton Th
2026-05-15 11:30:09 +02:00
parent 086c2af118
commit 52e5e99b07
3 changed files with 14 additions and 8 deletions

View File

@@ -35,8 +35,7 @@ starfield: starfield.f90 Makefile genplotting.o
starfield.png: starfield Makefile
./starfield
genplot2 -s 512x512 WS/starfield.scratch WS/a.tga
convert WS/a.tga $@
convert -verbose WS/a.tga $@
# -----------------------------------------------
@@ -65,7 +64,6 @@ spirale: spirale.f90 Makefile genplotting.o
spirale.png: spirale Makefile
./spirale
genplot2 -s 512x512 WS/spirale.scratch WS/a.tga
convert WS/a.tga $@
# -----------------------------------------------

View File

@@ -9,12 +9,15 @@ program spirale
use genplotting
implicit none
character(*), parameter :: scratch = "WS/spirale.scratch"
write (0, '(A)') "----[ genplotting spirale ]----"
call genp_init (0, 'WS/spirale.scratch')
call do_spirale (1337, 0.51, 0.0666, 0.7, 3)
call genp_init (0, scratch)
call do_spirale (1337, 0.51, 0.0666, 0.7, 5)
call do_spirale (1337, 0.42, 0.0333, 0.7, 6)
call genp_end (0)
call genp_do_render(scratch, "WS/a.tga", 512, 512)
contains
! ---------------------------------------------------------

View File

@@ -7,10 +7,15 @@
program starfield
use genplotting
implicit none
character(*), parameter :: scratch = "WS/starfield.scratch"
write (0, '(A)') "----[ genplotting starfield ]----"
call genp_init (0, 'WS/starfield.scratch')
call do_starfield (200)
call genp_init (0, scratch)
call do_starfield (300)
call genp_end (0)
call genp_do_render(scratch, "WS/a.tga", 512, 512)
contains
! ---------------------------------------------------------
subroutine plot_a_star(at_x, at_y, sz, color)
@@ -20,7 +25,7 @@ subroutine plot_a_star(at_x, at_y, sz, color)
integer :: idx
real :: rad, xv, yv
write(0, '("plot a star ", 2F8.3)') at_x, at_y
write(0, '("plot a star at ", 2F8.3)') at_x, at_y
call genp_set_offset(at_x, at_y)
do idx=0, 360, 36
! convert index to radians