Compare commits
8 Commits
ed2b04caeb
...
101ae7c1e8
Author | SHA1 | Date | |
---|---|---|---|
|
101ae7c1e8 | ||
|
7a534be476 | ||
|
9dab731285 | ||
|
96834f5f21 | ||
|
8b14eaca25 | ||
|
6d51ad3947 | ||
|
d987ff1685 | ||
|
cf1323e1a8 |
@ -72,12 +72,17 @@ module bloubspace
|
|||||||
type(t_bloubs), intent (out) :: blb
|
type(t_bloubs), intent (out) :: blb
|
||||||
|
|
||||||
blb%px = 4.33 * (rand() - 0.50)
|
blb%px = 4.33 * (rand() - 0.50)
|
||||||
blb%py = 3.33 * (rand() - 0.50)
|
blb%py = 3.70 * (rand() - 0.50)
|
||||||
blb%pz = 4.51 * (rand() - 0.50)
|
blb%pz = 4.51 * (rand() - 0.50)
|
||||||
|
|
||||||
blb%vx = (rand()) / 2.000
|
blb%vx = (rand()) / 2.000
|
||||||
blb%vy = (rand()) / 2.900
|
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%vz = (rand()) / 2.000
|
blb%vz = (rand()) / 2.000
|
||||||
|
if (blb%pz .LT. 0.0) blb%vz = -blb%vz
|
||||||
|
|
||||||
blb%state = 0
|
blb%state = 0
|
||||||
blb%alive = .TRUE.
|
blb%alive = .TRUE.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DDIR="frames/"
|
DDIR="frames/a"
|
||||||
|
|
||||||
ffmpeg -nostdin \
|
ffmpeg -nostdin \
|
||||||
-loglevel warning \
|
-loglevel warning \
|
||||||
|
@ -3,10 +3,10 @@ program movebloubs
|
|||||||
use bloubspace
|
use bloubspace
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer, parameter :: NB_MAX_BLOUBS = 200000
|
integer, parameter :: NB_MAX_BLOUBS = 2000000
|
||||||
|
|
||||||
! --------------------------------------------------------------
|
! --------------------------------------------------------------
|
||||||
character(200) :: infile
|
character(300) :: infile
|
||||||
integer :: errcode, i
|
integer :: errcode, i
|
||||||
integer :: nbgot
|
integer :: nbgot
|
||||||
type(t_bloubs), dimension(:), allocatable :: bloubs
|
type(t_bloubs), dimension(:), allocatable :: bloubs
|
||||||
@ -32,12 +32,13 @@ program movebloubs
|
|||||||
write(0, '(A,I6,1X,A)') "slurped ", nbgot, "bloubs"
|
write(0, '(A,I6,1X,A)') "slurped ", nbgot, "bloubs"
|
||||||
|
|
||||||
do i=1,nbgot
|
do i=1,nbgot
|
||||||
write(6, '(A8, 1X, 1L, 1X, I2, 3X, F8.3, 3X, 3F8.3, 3X, 3F8.3)') &
|
write(6, '(A8, 1X, 1L, 1X, I2, 3X, F8.3, 3X, 3F8.3, 3X, 3F8.3, 1X, I4)') &
|
||||||
bloubs(i)%nick, bloubs(i)%alive, &
|
bloubs(i)%nick, bloubs(i)%alive, &
|
||||||
bloubs(i)%state, &
|
bloubs(i)%state, &
|
||||||
bloubs(i)%radius, &
|
bloubs(i)%radius, &
|
||||||
bloubs(i)%px, bloubs(i)%py, bloubs(i)%pz, &
|
bloubs(i)%px, bloubs(i)%py, bloubs(i)%pz, &
|
||||||
bloubs(i)%vx, bloubs(i)%vy, bloubs(i)%vz
|
bloubs(i)%vx, bloubs(i)%vy, bloubs(i)%vz, &
|
||||||
|
bloubs(i)%age
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end program
|
end program
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
program mergebloubs
|
program mergebloubs
|
||||||
|
|
||||||
|
!-------------------------------------------!
|
||||||
|
! THIS IS A BIG MESS OF BUGS !
|
||||||
|
!-------------------------------------------!
|
||||||
|
|
||||||
use bloubspace
|
use bloubspace
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
@ -21,7 +25,8 @@ program mergebloubs
|
|||||||
call getarg(1, infile)
|
call getarg(1, infile)
|
||||||
call getarg(2, outfile)
|
call getarg(2, outfile)
|
||||||
|
|
||||||
write(0, '(2A20, I8)') trim(infile), trim(outfile), NB_MAX_BLOUBS
|
write(0, '(A, 2A20, I8)') "*** mergebloubs ", &
|
||||||
|
trim(infile), trim(outfile), NB_MAX_BLOUBS
|
||||||
|
|
||||||
! --------------- allocate memory for the people
|
! --------------- allocate memory for the people
|
||||||
|
|
||||||
@ -61,6 +66,11 @@ program mergebloubs
|
|||||||
STOP " : ERR READING FIRST BLOUB"
|
STOP " : ERR READING FIRST BLOUB"
|
||||||
endif
|
endif
|
||||||
call display_bloub (bloub, "first bloub")
|
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
|
les_bloubs(idx) = bloub
|
||||||
idx = idx + 1
|
idx = idx + 1
|
||||||
|
|
||||||
@ -69,7 +79,7 @@ program mergebloubs
|
|||||||
|
|
||||||
do ! infinite loop
|
do ! infinite loop
|
||||||
|
|
||||||
print *, "============ PASS ", idx
|
! print *, "============ PASS ", idx
|
||||||
if (idx .EQ. NB_MAX_BLOUBS) then
|
if (idx .EQ. NB_MAX_BLOUBS) then
|
||||||
write(0, '(I8, A)') idx, " max number of bloubs reached"
|
write(0, '(I8, A)') idx, " max number of bloubs reached"
|
||||||
exit
|
exit
|
||||||
@ -112,7 +122,7 @@ program mergebloubs
|
|||||||
les_bloubs(idx) = bloub
|
les_bloubs(idx) = bloub
|
||||||
endif
|
endif
|
||||||
|
|
||||||
write(outu, iostat=errcode) bloub ! no error control ?
|
write(outu, iostat=errcode) bloub
|
||||||
if (0 .ne. errcode) then
|
if (0 .ne. errcode) then
|
||||||
STOP " : WRITE ERROR TO " // trim(outfile)
|
STOP " : WRITE ERROR TO " // trim(outfile)
|
||||||
endif
|
endif
|
||||||
@ -149,7 +159,7 @@ contains
|
|||||||
blr%vy = (bla%vy + blb%vy) / 2.0
|
blr%vy = (bla%vy + blb%vy) / 2.0
|
||||||
blr%vz = (bla%vz + blb%vz) / 2.0
|
blr%vz = (bla%vz + blb%vz) / 2.0
|
||||||
|
|
||||||
blr%radius = (bla%radius + blb%radius) / 1.414
|
blr%radius = (bla%radius + blb%radius) / 2.718
|
||||||
blr%age = min(bla%age, blb%age)
|
blr%age = min(bla%age, blb%age)
|
||||||
|
|
||||||
! bring it to life !
|
! bring it to life !
|
||||||
|
@ -58,7 +58,7 @@ program movebloubs
|
|||||||
! moving, morphing and boundingboxing
|
! moving, morphing and boundingboxing
|
||||||
call move_bloub (bloub, 0.185)
|
call move_bloub (bloub, 0.185)
|
||||||
call bound_a_blob (bloub)
|
call bound_a_blob (bloub)
|
||||||
if (bloub%radius .GT. 0.0151) then
|
if (bloub%radius .GT. 0.0155) then
|
||||||
bloub%radius = bloub%radius * 0.9970
|
bloub%radius = bloub%radius * 0.9970
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -87,11 +87,16 @@ program movebloubs
|
|||||||
! ok, we have read all the bloubs in the input file
|
! ok, we have read all the bloubs in the input file
|
||||||
|
|
||||||
! insert some fancy conditional here
|
! 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
|
if (compteur .LT. 3000) then
|
||||||
rnd = rand()
|
rnd = rand()
|
||||||
write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
|
write (0, '(A,1X,F9.6)') "try to add bloubs, rnd is", rnd
|
||||||
if (rnd .LT. 0.0450) then
|
if (rnd .LT. 0.0455) then
|
||||||
call add_more_bloubs(outu, 24, 0.0990)
|
call add_more_bloubs(outu, 24, 0.0999)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -115,7 +120,7 @@ contains
|
|||||||
type(t_bloubs) :: bloub
|
type(t_bloubs) :: bloub
|
||||||
integer :: foo, count
|
integer :: foo, count
|
||||||
|
|
||||||
count = nbre+mod(irand(), 7)
|
count = nbre+mod(irand(), 9)
|
||||||
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
|
write(0, '(A,I4,1X,A)') "adding", count, "bloubs"
|
||||||
|
|
||||||
do foo=1, count
|
do foo=1, count
|
||||||
|
@ -10,6 +10,7 @@ TMPPNG="/dev/shm/bloubs7.png"
|
|||||||
POVOPT="+Q9 +a -v -d -W1600 -H1200 -WT2"
|
POVOPT="+Q9 +a -v -d -W1600 -H1200 -WT2"
|
||||||
DDIR="frames/a"
|
DDIR="frames/a"
|
||||||
LOGERR="log.error"
|
LOGERR="log.error"
|
||||||
|
TXTCOLOR="RosyBrown"
|
||||||
|
|
||||||
# --- put the work file in ramdisk
|
# --- put the work file in ramdisk
|
||||||
BLBS_IN="/dev/shm/in.blbs"
|
BLBS_IN="/dev/shm/in.blbs"
|
||||||
@ -30,7 +31,7 @@ printf "\n#declare NbImg = %d;\n" $NBIMG > WS/nbimg.inc
|
|||||||
# first, we have to make a seminal buch of bloubs
|
# first, we have to make a seminal buch of bloubs
|
||||||
# --> this function need to be parametrizable
|
# --> this function need to be parametrizable
|
||||||
#
|
#
|
||||||
./genbloubs ${BLBS_IN} 3000
|
./genbloubs ${BLBS_IN} 3
|
||||||
|
|
||||||
for idx in $(seq 0 $((NBIMG-1)) )
|
for idx in $(seq 0 $((NBIMG-1)) )
|
||||||
do
|
do
|
||||||
@ -54,12 +55,11 @@ do
|
|||||||
convert ${TMPPNG} \
|
convert ${TMPPNG} \
|
||||||
-font Courier-Bold \
|
-font Courier-Bold \
|
||||||
-pointsize 24 \
|
-pointsize 24 \
|
||||||
-fill Yellow \
|
-fill "$TXTCOLOR" \
|
||||||
-gravity south-east \
|
-gravity south-east \
|
||||||
-annotate +25+5 "$td" \
|
-annotate +25+5 "$td" \
|
||||||
-gravity south-west \
|
-gravity south-west \
|
||||||
-annotate +25+5 "$hi" \
|
-annotate +25+5 "$hi" \
|
||||||
-fill Yellow \
|
|
||||||
-pointsize 48 \
|
-pointsize 48 \
|
||||||
-gravity north-east \
|
-gravity north-east \
|
||||||
-annotate +25+5 "$count" \
|
-annotate +25+5 "$count" \
|
||||||
|
@ -35,8 +35,8 @@ object {
|
|||||||
union {
|
union {
|
||||||
plane { <1, 0, 0>, -32 }
|
plane { <1, 0, 0>, -32 }
|
||||||
plane { <1, 0, 0>, 32 }
|
plane { <1, 0, 0>, 32 }
|
||||||
plane { <0, 1, 0>, -23 }
|
plane { <0, 1, 0>, -24 }
|
||||||
plane { <0, 1, 0>, 23 }
|
plane { <0, 1, 0>, 24 }
|
||||||
plane { <0, 0, 1>, 50 }
|
plane { <0, 0, 1>, 50 }
|
||||||
|
|
||||||
texture {
|
texture {
|
||||||
@ -50,7 +50,7 @@ object {
|
|||||||
|
|
||||||
#declare BH = 5; // H = taille en horizontal
|
#declare BH = 5; // H = taille en horizontal
|
||||||
#declare BV = 5; // V = taille en vertical
|
#declare BV = 5; // V = taille en vertical
|
||||||
#declare BR = 0.028;
|
#declare BR = 0.032;
|
||||||
|
|
||||||
#declare Une_Borne = object
|
#declare Une_Borne = object
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ end subroutine
|
|||||||
! d'après les pages 91/92 du livre de Roger T Stevens
|
! d'après les pages 91/92 du livre de Roger T Stevens
|
||||||
! "Fractal programming in C"
|
! "Fractal programming in C"
|
||||||
!
|
!
|
||||||
subroutine pickover_0(pic, count)
|
subroutine plot_pickover(pic, count)
|
||||||
implicit none
|
implicit none
|
||||||
integer, intent(inout), dimension (:,:) :: pic
|
integer, intent(inout), dimension (:,:) :: pic
|
||||||
integer, intent(in) :: count
|
integer, intent(in) :: count
|
||||||
@ -131,7 +131,7 @@ subroutine pickover_0(pic, count)
|
|||||||
|
|
||||||
deallocate(points)
|
deallocate(points)
|
||||||
|
|
||||||
end subroutine pickover_0
|
end subroutine plot_pickover
|
||||||
|
|
||||||
!-----------------------------------------------------
|
!-----------------------------------------------------
|
||||||
!
|
!
|
||||||
|
@ -22,7 +22,7 @@ subroutine list_points3d(array, start, length)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
! send oi to stdout.
|
! send oi to stdout.
|
||||||
do i = start, start+length
|
do i = start, start+length-1
|
||||||
print *, array(i)%x, array(i)%y, array(i)%z, array(i)%seq
|
print *, array(i)%x, array(i)%y, array(i)%z, array(i)%seq
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#!/usr/bin/awk
|
#!/usr/bin/awk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
print "// generated file, don't touch it bastard !"
|
print "// generated file, don't touch it bastard !"
|
||||||
print "#declare Pickover = object {"
|
print "#declare Pickover = object {"
|
||||||
@ -10,11 +8,11 @@ BEGIN {
|
|||||||
|
|
||||||
# for every line
|
# for every line
|
||||||
{
|
{
|
||||||
printf "sphere { <%f, %f, %f> 0.015 }\n", $1, $2, $3
|
printf "object { Truc translate <%f, %f, %f> }\n", $1, $2, $3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
END {
|
END {
|
||||||
print "} }"
|
print "} }"
|
||||||
print "// done"
|
print "// done", NR
|
||||||
}
|
}
|
@ -6,11 +6,11 @@ global_settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "colors.inc"
|
#include "colors.inc"
|
||||||
#include "WS/pickover.inc"
|
|
||||||
|
|
||||||
#declare Tiers = NBPASS * 0.3333333;
|
#declare Tiers = NBPASS * 0.3333333;
|
||||||
#declare CK = (clock/Tiers)*180;
|
#declare CK = (clock/Tiers)*180;
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
#declare Rep = object
|
#declare Rep = object
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
@ -20,9 +20,19 @@ union {
|
|||||||
cylinder { 0, <0, 0, 2>, RB pigment { color Blue } }
|
cylinder { 0, <0, 0, 2>, RB pigment { color Blue } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// object { Rep translate <-1, 0.10, -1> }
|
// 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 {
|
||||||
object {
|
object {
|
||||||
Pickover
|
Pickover
|
||||||
@ -66,7 +76,7 @@ camera {
|
|||||||
location <XCAM, YCAM, ZCAM>
|
location <XCAM, YCAM, ZCAM>
|
||||||
look_at <0, 2.09, 0>
|
look_at <0, 2.09, 0>
|
||||||
right x*image_width/image_height
|
right x*image_width/image_height
|
||||||
angle 86
|
angle 92
|
||||||
}
|
}
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3,8 +3,12 @@
|
|||||||
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
|
POVOPT=" -d +q9 +a +W1920 +H1080 -v +WT4"
|
||||||
PASS=600
|
PASS=600
|
||||||
ERR="/tmp/pov.error"
|
ERR="/tmp/pov.error"
|
||||||
|
POVINC="WS/pickover.inc"
|
||||||
|
|
||||||
for pass in $(seq 0 $PASS)
|
./pickover foo.pgm | awk -f pick2pov.awk > $POVINC
|
||||||
|
head $POVINC
|
||||||
|
|
||||||
|
for pass in $(seq 0 $(( PASS-1 )) )
|
||||||
do
|
do
|
||||||
|
|
||||||
dstname=$(printf "frames/pick3d/%05d.png" $pass)
|
dstname=$(printf "frames/pick3d/%05d.png" $pass)
|
||||||
|
@ -11,7 +11,7 @@ program pickover
|
|||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
integer, dimension(800, 600) :: picz
|
integer, dimension(1024, 768) :: picz
|
||||||
integer :: argc
|
integer :: argc
|
||||||
character(200) :: filename
|
character(200) :: filename
|
||||||
double precision, dimension(4) :: coefs
|
double precision, dimension(4) :: coefs
|
||||||
@ -36,9 +36,8 @@ program pickover
|
|||||||
coefs(1) = 2.24 ; coefs(2) = 0.43
|
coefs(1) = 2.24 ; coefs(2) = 0.43
|
||||||
coefs(3) = -0.65 ; coefs(4) = -2.43
|
coefs(3) = -0.65 ; coefs(4) = -2.43
|
||||||
|
|
||||||
|
|
||||||
call compute_pickover(points, coefs)
|
call compute_pickover(points, coefs)
|
||||||
call list_points3d(points, 2, 32000)
|
call list_points3d(points, 2, 42000)
|
||||||
|
|
||||||
end program
|
end program
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user