begin of a new era, maybe
This commit is contained in:
47
Fraktalism/voxelize.f90
Normal file
47
Fraktalism/voxelize.f90
Normal file
@@ -0,0 +1,47 @@
|
||||
!-----------------------------------------------------
|
||||
! VOXELIZE
|
||||
! ========
|
||||
! this is the main program
|
||||
!-----------------------------------------------------
|
||||
program voxelize
|
||||
use fraktals
|
||||
|
||||
integer, parameter :: DIM = 500
|
||||
integer, dimension(:,:,:), allocatable :: cube
|
||||
type(t_point3d), dimension(:), allocatable :: points
|
||||
integer :: errcode, foo
|
||||
integer :: ix, iy, iz
|
||||
double precision, dimension(4) :: coefs
|
||||
|
||||
foo = (DIM*DIM*DIM) / (1024)
|
||||
PRINT *, "memory request for cube (in Kwords) ", foo
|
||||
|
||||
allocate (cube(DIM,DIM,DIM), stat=errcode)
|
||||
if (0 .NE. errcode) then
|
||||
STOP " : NO ENOUGH MEMORY FOR CUBE"
|
||||
endif
|
||||
|
||||
nbr_points = 99999
|
||||
allocate(points(nbr_points), stat=errcode)
|
||||
if (0 .NE. errcode) then
|
||||
STOP " : NO ENOUGH MEMORY FOR POINTS"
|
||||
endif
|
||||
|
||||
coefs(1) = 2.24 ; coefs(2) = 0.43
|
||||
coefs(3) = -0.65 ; coefs(4) = -2.43
|
||||
call compute_pickover(points, coefs)
|
||||
|
||||
call clear_cube(cube)
|
||||
|
||||
do foo=1, nbr_points
|
||||
ix = nint(points(foo)%x * dble(DIM))
|
||||
iy = nint(points(foo)%y * dble(DIM))
|
||||
iz = nint(points(foo)%z * dble(DIM))
|
||||
enddo
|
||||
!-----------------------------------------------------
|
||||
contains
|
||||
!-----------------------------------------------------
|
||||
!-----------------------------------------------------
|
||||
end program voxelize
|
||||
!-----------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user