use the render procedure
This commit is contained in:
4
Makefile
4
Makefile
@@ -35,8 +35,7 @@ starfield: starfield.f90 Makefile genplotting.o
|
|||||||
|
|
||||||
starfield.png: starfield Makefile
|
starfield.png: starfield Makefile
|
||||||
./starfield
|
./starfield
|
||||||
genplot2 -s 512x512 WS/starfield.scratch WS/a.tga
|
convert -verbose WS/a.tga $@
|
||||||
convert WS/a.tga $@
|
|
||||||
|
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
|
|
||||||
@@ -65,7 +64,6 @@ spirale: spirale.f90 Makefile genplotting.o
|
|||||||
|
|
||||||
spirale.png: spirale Makefile
|
spirale.png: spirale Makefile
|
||||||
./spirale
|
./spirale
|
||||||
genplot2 -s 512x512 WS/spirale.scratch WS/a.tga
|
|
||||||
convert WS/a.tga $@
|
convert WS/a.tga $@
|
||||||
|
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
|
|||||||
@@ -9,12 +9,15 @@ program spirale
|
|||||||
use genplotting
|
use genplotting
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
character(*), parameter :: scratch = "WS/spirale.scratch"
|
||||||
|
|
||||||
write (0, '(A)') "----[ genplotting spirale ]----"
|
write (0, '(A)') "----[ genplotting spirale ]----"
|
||||||
|
|
||||||
call genp_init (0, 'WS/spirale.scratch')
|
call genp_init (0, scratch)
|
||||||
call do_spirale (1337, 0.51, 0.0666, 0.7, 3)
|
call do_spirale (1337, 0.51, 0.0666, 0.7, 5)
|
||||||
call do_spirale (1337, 0.42, 0.0333, 0.7, 6)
|
call do_spirale (1337, 0.42, 0.0333, 0.7, 6)
|
||||||
call genp_end (0)
|
call genp_end (0)
|
||||||
|
call genp_do_render(scratch, "WS/a.tga", 512, 512)
|
||||||
|
|
||||||
contains
|
contains
|
||||||
! ---------------------------------------------------------
|
! ---------------------------------------------------------
|
||||||
|
|||||||
@@ -7,10 +7,15 @@
|
|||||||
program starfield
|
program starfield
|
||||||
use genplotting
|
use genplotting
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
character(*), parameter :: scratch = "WS/starfield.scratch"
|
||||||
|
|
||||||
write (0, '(A)') "----[ genplotting starfield ]----"
|
write (0, '(A)') "----[ genplotting starfield ]----"
|
||||||
call genp_init (0, 'WS/starfield.scratch')
|
call genp_init (0, scratch)
|
||||||
call do_starfield (200)
|
call do_starfield (300)
|
||||||
call genp_end (0)
|
call genp_end (0)
|
||||||
|
call genp_do_render(scratch, "WS/a.tga", 512, 512)
|
||||||
|
|
||||||
contains
|
contains
|
||||||
! ---------------------------------------------------------
|
! ---------------------------------------------------------
|
||||||
subroutine plot_a_star(at_x, at_y, sz, color)
|
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
|
integer :: idx
|
||||||
real :: rad, xv, yv
|
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)
|
call genp_set_offset(at_x, at_y)
|
||||||
do idx=0, 360, 36
|
do idx=0, 360, 36
|
||||||
! convert index to radians
|
! convert index to radians
|
||||||
|
|||||||
Reference in New Issue
Block a user