Compare commits

..

No commits in common. "101ae7c1e806af289dbc63db18f6d159df285af8" and "ed2b04caeb54f84456fda3ad9884ee55d62173f7" have entirely different histories.

13 changed files with 36 additions and 68 deletions

View File

@ -72,17 +72,12 @@ module bloubspace
type(t_bloubs), intent (out) :: blb
blb%px = 4.33 * (rand() - 0.50)
blb%py = 3.70 * (rand() - 0.50)
blb%py = 3.33 * (rand() - 0.50)
blb%pz = 4.51 * (rand() - 0.50)
blb%vx = (rand()) / 2.000
if (blb%px .LT. 0.0) blb%vx = -blb%vx
blb%vy = (rand()) / 3.200
if (blb%py .LT. 0.0) blb%vy = -blb%vx
blb%vy = (rand()) / 2.900
blb%vz = (rand()) / 2.000
if (blb%pz .LT. 0.0) blb%vz = -blb%vz
blb%state = 0
blb%alive = .TRUE.

View File

@ -1,6 +1,6 @@
#!/bin/bash
DDIR="frames/a"
DDIR="frames/"
ffmpeg -nostdin \
-loglevel warning \

View File

@ -3,10 +3,10 @@ program movebloubs
use bloubspace
implicit none
integer, parameter :: NB_MAX_BLOUBS = 2000000
integer, parameter :: NB_MAX_BLOUBS = 200000
! --------------------------------------------------------------
character(300) :: infile
character(200) :: infile
integer :: errcode, i
integer :: nbgot
type(t_bloubs), dimension(:), allocatable :: bloubs
@ -32,13 +32,12 @@ program movebloubs
write(0, '(A,I6,1X,A)') "slurped ", nbgot, "bloubs"
do i=1,nbgot
write(6, '(A8, 1X, 1L, 1X, I2, 3X, F8.3, 3X, 3F8.3, 3X, 3F8.3, 1X, I4)') &
write(6, '(A8, 1X, 1L, 1X, I2, 3X, F8.3, 3X, 3F8.3, 3X, 3F8.3)') &
bloubs(i)%nick, bloubs(i)%alive, &
bloubs(i)%state, &
bloubs(i)%radius, &
bloubs(i)%px, bloubs(i)%py, bloubs(i)%pz, &
bloubs(i)%vx, bloubs(i)%vy, bloubs(i)%vz, &
bloubs(i)%age
bloubs(i)%vx, bloubs(i)%vy, bloubs(i)%vz
enddo
end program

View File

@ -1,9 +1,5 @@
program mergebloubs
!-------------------------------------------!
! THIS IS A BIG MESS OF BUGS !
!-------------------------------------------!
use bloubspace
implicit none
@ -25,8 +21,7 @@ program mergebloubs
call getarg(1, infile)
call getarg(2, outfile)
write(0, '(A, 2A20, I8)') "*** mergebloubs ", &
trim(infile), trim(outfile), NB_MAX_BLOUBS
write(0, '(2A20, I8)') trim(infile), trim(outfile), NB_MAX_BLOUBS
! --------------- allocate memory for the people
@ -66,11 +61,6 @@ program mergebloubs
STOP " : ERR READING FIRST BLOUB"
endif
call display_bloub (bloub, "first bloub")
write(outu, iostat=errcode) bloub
if (0 .ne. errcode) then
STOP " : FIRST BLOUB, WRITE ERROR TO " // trim(outfile)
endif
les_bloubs(idx) = bloub
idx = idx + 1
@ -79,7 +69,7 @@ program mergebloubs
do ! infinite loop
! print *, "============ PASS ", idx
print *, "============ PASS ", idx
if (idx .EQ. NB_MAX_BLOUBS) then
write(0, '(I8, A)') idx, " max number of bloubs reached"
exit
@ -122,7 +112,7 @@ program mergebloubs
les_bloubs(idx) = bloub
endif
write(outu, iostat=errcode) bloub
write(outu, iostat=errcode) bloub ! no error control ?
if (0 .ne. errcode) then
STOP " : WRITE ERROR TO " // trim(outfile)
endif
@ -159,7 +149,7 @@ contains
blr%vy = (bla%vy + blb%vy) / 2.0
blr%vz = (bla%vz + blb%vz) / 2.0
blr%radius = (bla%radius + blb%radius) / 2.718
blr%radius = (bla%radius + blb%radius) / 1.414
blr%age = min(bla%age, blb%age)
! bring it to life !

View File

@ -58,7 +58,7 @@ program movebloubs
! moving, morphing and boundingboxing
call move_bloub (bloub, 0.185)
call bound_a_blob (bloub)
if (bloub%radius .GT. 0.0155) then
if (bloub%radius .GT. 0.0151) then
bloub%radius = bloub%radius * 0.9970
endif
@ -87,16 +87,11 @@ program movebloubs
! ok, we have read all the bloubs in the input file
! insert some fancy conditional here
if (compteur .LT. 200) then
call add_more_bloubs(outu, 5, 0.1333)
endif
! insert some very fancy conditional here
if (compteur .LT. 3000) then
rnd = rand()
write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
if (rnd .LT. 0.0455) then
call add_more_bloubs(outu, 24, 0.0999)
if (rnd .LT. 0.0450) then
call add_more_bloubs(outu, 24, 0.0990)
endif
endif
@ -120,7 +115,7 @@ contains
type(t_bloubs) :: bloub
integer :: foo, count
count = nbre+mod(irand(), 9)
count = nbre+mod(irand(), 7)
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
do foo=1, count

View File

@ -10,7 +10,6 @@ TMPPNG="/dev/shm/bloubs7.png"
POVOPT="+Q9 +a -v -d -W1600 -H1200 -WT2"
DDIR="frames/a"
LOGERR="log.error"
TXTCOLOR="RosyBrown"
# --- put the work file in ramdisk
BLBS_IN="/dev/shm/in.blbs"
@ -31,7 +30,7 @@ printf "\n#declare NbImg = %d;\n" $NBIMG > WS/nbimg.inc
# first, we have to make a seminal buch of bloubs
# --> this function need to be parametrizable
#
./genbloubs ${BLBS_IN} 3
./genbloubs ${BLBS_IN} 3000
for idx in $(seq 0 $((NBIMG-1)) )
do
@ -55,11 +54,12 @@ do
convert ${TMPPNG} \
-font Courier-Bold \
-pointsize 24 \
-fill "$TXTCOLOR" \
-fill Yellow \
-gravity south-east \
-annotate +25+5 "$td" \
-gravity south-west \
-annotate +25+5 "$hi" \
-fill Yellow \
-pointsize 48 \
-gravity north-east \
-annotate +25+5 "$count" \

View File

@ -35,8 +35,8 @@ object {
union {
plane { <1, 0, 0>, -32 }
plane { <1, 0, 0>, 32 }
plane { <0, 1, 0>, -24 }
plane { <0, 1, 0>, 24 }
plane { <0, 1, 0>, -23 }
plane { <0, 1, 0>, 23 }
plane { <0, 0, 1>, 50 }
texture {
@ -50,7 +50,7 @@ object {
#declare BH = 5; // H = taille en horizontal
#declare BV = 5; // V = taille en vertical
#declare BR = 0.032;
#declare BR = 0.028;
#declare Une_Borne = object
{

View File

@ -98,7 +98,7 @@ end subroutine
! d'après les pages 91/92 du livre de Roger T Stevens
! "Fractal programming in C"
!
subroutine plot_pickover(pic, count)
subroutine pickover_0(pic, count)
implicit none
integer, intent(inout), dimension (:,:) :: pic
integer, intent(in) :: count
@ -131,7 +131,7 @@ subroutine plot_pickover(pic, count)
deallocate(points)
end subroutine plot_pickover
end subroutine pickover_0
!-----------------------------------------------------
!

View File

@ -22,7 +22,7 @@ subroutine list_points3d(array, start, length)
endif
! send oi to stdout.
do i = start, start+length-1
do i = start, start+length
print *, array(i)%x, array(i)%y, array(i)%z, array(i)%seq
enddo

View File

@ -1,5 +1,7 @@
#!/usr/bin/awk
BEGIN {
print "// generated file, don't touch it bastard !"
print "#declare Pickover = object {"
@ -8,11 +10,11 @@ BEGIN {
# for every line
{
printf "object { Truc translate <%f, %f, %f> }\n", $1, $2, $3
printf "sphere { <%f, %f, %f> 0.015 }\n", $1, $2, $3
}
END {
print "} }"
print "// done", NR
print "// done"
}

View File

@ -6,11 +6,11 @@ global_settings {
}
#include "colors.inc"
#include "WS/pickover.inc"
#declare Tiers = NBPASS * 0.3333333;
#declare CK = (clock/Tiers)*180;
// --------------------------------------------------------------
#declare Rep = object
{
union {
@ -20,19 +20,9 @@ union {
cylinder { 0, <0, 0, 2>, RB pigment { color Blue } }
}
}
// object { Rep translate <-1, 0.10, -1> }
// --------------------------------------------------------------
#declare TS = 0.017;
#declare Truc = object
{
box { <-TS, -TS, -TS>, <TS, TS, TS> }
}
#include "WS/pickover.inc"
object {
object {
Pickover
@ -76,7 +66,7 @@ camera {
location <XCAM, YCAM, ZCAM>
look_at <0, 2.09, 0>
right x*image_width/image_height
angle 92
angle 86
}
// ----------------------------------------------------------

View File

@ -3,12 +3,8 @@
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
PASS=600
ERR="/tmp/pov.error"
POVINC="WS/pickover.inc"
./pickover foo.pgm | awk -f pick2pov.awk > $POVINC
head $POVINC
for pass in $(seq 0 $(( PASS-1 )) )
for pass in $(seq 0 $PASS)
do
dstname=$(printf "frames/pick3d/%05d.png" $pass)

View File

@ -11,7 +11,7 @@ program pickover
implicit none
integer, dimension(1024, 768) :: picz
integer, dimension(800, 600) :: picz
integer :: argc
character(200) :: filename
double precision, dimension(4) :: coefs
@ -36,8 +36,9 @@ program pickover
coefs(1) = 2.24 ; coefs(2) = 0.43
coefs(3) = -0.65 ; coefs(4) = -2.43
call compute_pickover(points, coefs)
call list_points3d(points, 2, 42000)
call list_points3d(points, 2, 32000)
end program