Compare commits
No commits in common. "101ae7c1e806af289dbc63db18f6d159df285af8" and "ed2b04caeb54f84456fda3ad9884ee55d62173f7" have entirely different histories.
101ae7c1e8
...
ed2b04caeb
@ -72,17 +72,12 @@ 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.70 * (rand() - 0.50)
|
blb%py = 3.33 * (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
|
||||||
if (blb%px .LT. 0.0) blb%vx = -blb%vx
|
blb%vy = (rand()) / 2.900
|
||||||
|
|
||||||
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/a"
|
DDIR="frames/"
|
||||||
|
|
||||||
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 = 2000000
|
integer, parameter :: NB_MAX_BLOUBS = 200000
|
||||||
|
|
||||||
! --------------------------------------------------------------
|
! --------------------------------------------------------------
|
||||||
character(300) :: infile
|
character(200) :: infile
|
||||||
integer :: errcode, i
|
integer :: errcode, i
|
||||||
integer :: nbgot
|
integer :: nbgot
|
||||||
type(t_bloubs), dimension(:), allocatable :: bloubs
|
type(t_bloubs), dimension(:), allocatable :: bloubs
|
||||||
@ -32,13 +32,12 @@ 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, 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)%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,9 +1,5 @@
|
|||||||
program mergebloubs
|
program mergebloubs
|
||||||
|
|
||||||
!-------------------------------------------!
|
|
||||||
! THIS IS A BIG MESS OF BUGS !
|
|
||||||
!-------------------------------------------!
|
|
||||||
|
|
||||||
use bloubspace
|
use bloubspace
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
@ -25,8 +21,7 @@ program mergebloubs
|
|||||||
call getarg(1, infile)
|
call getarg(1, infile)
|
||||||
call getarg(2, outfile)
|
call getarg(2, outfile)
|
||||||
|
|
||||||
write(0, '(A, 2A20, I8)') "*** mergebloubs ", &
|
write(0, '(2A20, I8)') trim(infile), trim(outfile), NB_MAX_BLOUBS
|
||||||
trim(infile), trim(outfile), NB_MAX_BLOUBS
|
|
||||||
|
|
||||||
! --------------- allocate memory for the people
|
! --------------- allocate memory for the people
|
||||||
|
|
||||||
@ -66,11 +61,6 @@ 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
|
||||||
|
|
||||||
@ -79,7 +69,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
|
||||||
@ -122,7 +112,7 @@ program mergebloubs
|
|||||||
les_bloubs(idx) = bloub
|
les_bloubs(idx) = bloub
|
||||||
endif
|
endif
|
||||||
|
|
||||||
write(outu, iostat=errcode) bloub
|
write(outu, iostat=errcode) bloub ! no error control ?
|
||||||
if (0 .ne. errcode) then
|
if (0 .ne. errcode) then
|
||||||
STOP " : WRITE ERROR TO " // trim(outfile)
|
STOP " : WRITE ERROR TO " // trim(outfile)
|
||||||
endif
|
endif
|
||||||
@ -159,7 +149,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) / 2.718
|
blr%radius = (bla%radius + blb%radius) / 1.414
|
||||||
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.0155) then
|
if (bloub%radius .GT. 0.0151) then
|
||||||
bloub%radius = bloub%radius * 0.9970
|
bloub%radius = bloub%radius * 0.9970
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -87,16 +87,11 @@ 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.0455) then
|
if (rnd .LT. 0.0450) then
|
||||||
call add_more_bloubs(outu, 24, 0.0999)
|
call add_more_bloubs(outu, 24, 0.0990)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -120,7 +115,7 @@ contains
|
|||||||
type(t_bloubs) :: bloub
|
type(t_bloubs) :: bloub
|
||||||
integer :: foo, count
|
integer :: foo, count
|
||||||
|
|
||||||
count = nbre+mod(irand(), 9)
|
count = nbre+mod(irand(), 7)
|
||||||
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,7 +10,6 @@ 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"
|
||||||
@ -31,7 +30,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} 3
|
./genbloubs ${BLBS_IN} 3000
|
||||||
|
|
||||||
for idx in $(seq 0 $((NBIMG-1)) )
|
for idx in $(seq 0 $((NBIMG-1)) )
|
||||||
do
|
do
|
||||||
@ -55,11 +54,12 @@ do
|
|||||||
convert ${TMPPNG} \
|
convert ${TMPPNG} \
|
||||||
-font Courier-Bold \
|
-font Courier-Bold \
|
||||||
-pointsize 24 \
|
-pointsize 24 \
|
||||||
-fill "$TXTCOLOR" \
|
-fill Yellow \
|
||||||
-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>, -24 }
|
plane { <0, 1, 0>, -23 }
|
||||||
plane { <0, 1, 0>, 24 }
|
plane { <0, 1, 0>, 23 }
|
||||||
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.032;
|
#declare BR = 0.028;
|
||||||
|
|
||||||
#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 plot_pickover(pic, count)
|
subroutine pickover_0(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 plot_pickover(pic, count)
|
|||||||
|
|
||||||
deallocate(points)
|
deallocate(points)
|
||||||
|
|
||||||
end subroutine plot_pickover
|
end subroutine pickover_0
|
||||||
|
|
||||||
!-----------------------------------------------------
|
!-----------------------------------------------------
|
||||||
!
|
!
|
||||||
|
@ -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-1
|
do i = start, start+length
|
||||||
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,5 +1,7 @@
|
|||||||
#!/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 {"
|
||||||
@ -8,11 +10,11 @@ BEGIN {
|
|||||||
|
|
||||||
# for every line
|
# 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 {
|
END {
|
||||||
print "} }"
|
print "} }"
|
||||||
print "// done", NR
|
print "// done"
|
||||||
}
|
}
|
@ -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,19 +20,9 @@ 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
|
||||||
@ -76,7 +66,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 92
|
angle 86
|
||||||
}
|
}
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3,12 +3,8 @@
|
|||||||
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"
|
|
||||||
|
|
||||||
./pickover foo.pgm | awk -f pick2pov.awk > $POVINC
|
for pass in $(seq 0 $PASS)
|
||||||
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(1024, 768) :: picz
|
integer, dimension(800, 600) :: picz
|
||||||
integer :: argc
|
integer :: argc
|
||||||
character(200) :: filename
|
character(200) :: filename
|
||||||
double precision, dimension(4) :: coefs
|
double precision, dimension(4) :: coefs
|
||||||
@ -36,8 +36,9 @@ 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, 42000)
|
call list_points3d(points, 2, 32000)
|
||||||
|
|
||||||
end program
|
end program
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user