add the circles factory

This commit is contained in:
Tonton Th
2026-05-14 19:52:23 +02:00
parent e060fad764
commit 086c2af118
3 changed files with 42 additions and 0 deletions

1
.gitignore vendored
View File

@@ -14,4 +14,5 @@ lissajous
squarmania
testbed
rndwlkng
morecircles

View File

@@ -15,6 +15,19 @@ testbed: testbed.f90 Makefile genplotting.o
rndwlkng: rndwlkng.f90 Makefile genplotting.o
gfortran -Wall $< genplotting.o -o $@
rndwlkng.png: rndwlkng Makefile
./rndwlkng
convert rndwlkng.png rndwlkng.png
# -----------------------------------------------
morecircles: morecircles.f90 Makefile genplotting.o
gfortran -Wall $< genplotting.o -o $@
morecircles.png: morecircles Makefile
./morecircles
convert morecircles.tga morecircles.png
# -----------------------------------------------
starfield: starfield.f90 Makefile genplotting.o

28
morecircles.f90 Normal file
View File

@@ -0,0 +1,28 @@
!
! YOU LIKE CIRCLES ? TAKE IT SISTA !
!
! this crapware is released by tTh under the
! DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
!
program morecircles
use genplotting
implicit none
integer idx
real fdx, xp, yp, scx, scy
call genp_init(0, "WS/morecircles.scratch")
scx = 0.8 ; scy = 1.5
do idx=5, 60
fdx = real(idx)
xp = 3.5 * cos((fdx/14.0)-0.7)
yp = 3.5 * sin((fdx/10.0)+0.3)
call genp_set_offset(xp, yp)
call genp_set_scale(scx, scy)
call genp_circle(fdx, 60, 1+mod(idx, 3))
scx = scx + 0.0075
scy = scy - 0.0075
enddo
call genp_end(0)
call genp_do_render("WS/morecircles.scratch", "morecircles.tga", &
512, 512)
end program