POV-Ray : Newsgroups : povray.advanced-users : 3d data files - help please Server Time
30 Jul 2024 02:15:46 EDT (-0400)
  3d data files - help please (Message 1 to 10 of 10)  
From: SamuelT 
Subject: 3d data files - help please
Date: 28 Mar 2000 23:19:37
Message: <38E18469.B011CFAE@aol.com>
Hello all you advanced users :) I'm having problems understanding how to
make a 3d data file for use with isosurfaces. The MegaPov docs tell me I
can use #fwrite (I assume they mean #write) to make my file. When I
tried this, pov still could not find my .dat file. Can I just write some
numbers manually, or use basic to make a text file?

Plus, does anybody know where I can get .dat files to use with
isosurfaces?

Thanks in advanced, err advance :)

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge


Post a reply to this message

From: david sharp
Subject: Re: 3d data files - help please
Date: 29 Mar 2000 12:25:39
Message: <38e23c93@news.povray.org>
SamuelT. <STB### [at] aolcom> wrote
[ ... ]
>                                        I'm having problems understanding
how to
> make a 3d data file for use with isosurfaces. The MegaPov docs tell me I
> can use #fwrite (I assume they mean #write) to make my file. When I
> tried this, pov still could not find my .dat file. Can I just write some
> numbers manually, or use basic to make a text file?

Yes, the '#fwrite' is a mistake and should be '#write'. Yes, you could
type a bunch of numbers into a file and use that. Or get BASIC
to write the data file. Why MegaPov couldn't find your file, I don't know.
Maybe try a test using a fully specified path for the data file?

A silly (random data) example:
////////////////////////////////
#declare S1=seed(0);
#fopen fileid "mydata.dat" write
#declare i=0;
#while (i<4)
  #declare j=0;
  #while (j<4)
    #declare k=0;
    #while(k<4)
       // note the "\n" to separate density values from each other
       #write (fileid, .5-rand(S1),"\n")
       #declare k=k+1;
    #end
    #declare j=j+1;
  #end
  #declare i=i+1;
#end
#fclose fileid

isosurface {
 function { "data_3D_3", <1.0>, library   "i_dat3d", "mydata.dat", <4, 4, 4,
0> }
 contained_by { sphere {0, 5 } }
 eval
 pigment { Red}
}
////////////////////////


Post a reply to this message

From: David Vincent-Jones
Subject: Re: 3d data files - help please
Date: 29 Mar 2000 17:41:19
Message: <38e2868f@news.povray.org>
Almost pleased that I am not the only one having problems here.

I tried a couple of the demos and find that the file format for "data_3D_3"
looks like a single col. of data. I would have assumed that the file should
be 3 cols. for the <x,y,z>.

Anybody have any experience with these files...

David V-J

Has anybody tried a simple height_field with a non_gridded data set
SamuelT. <STB### [at] aolcom> wrote in message
news:38E18469.B011CFAE@aol.com...
> Hello all you advanced users :) I'm having problems understanding how to
> make a 3d data file for use with isosurfaces. The MegaPov docs tell me I
> can use #fwrite (I assume they mean #write) to make my file. When I
> tried this, pov still could not find my .dat file. Can I just write some
> numbers manually, or use basic to make a text file?
>
> Plus, does anybody know where I can get .dat files to use with
> isosurfaces?
>
> Thanks in advanced, err advance :)
>
> --
> Samuel Benge
>
> E-Mail: STB### [at] aolcom
>
> Visit the still unfinished isosurface tutorial:
> http://members.aol.com/stbenge
>
>


Post a reply to this message

From: david sharp
Subject: Re: 3d data files - help please
Date: 29 Mar 2000 19:35:15
Message: <38e2a143@news.povray.org>
David Vincent-Jones <geo### [at] galaxynetcom> wrote in message
news:38e2868f@news.povray.org...

> I tried a couple of the demos and find that the file format for
"data_3D_3"
> looks like a single col. of data. I would have assumed that the file
should
> be 3 cols. for the <x,y,z>.

the format is just a list of numbers. spaces, commas or newlines
can delimit them. you can format it in columns if you like. Realize
that these are supposed 'isofunction' *values*. They are scalars
(single numbers),  not vectors or coordinates.


Post a reply to this message

From: david sharp
Subject: Re: 3d data files - help please
Date: 29 Mar 2000 20:37:51
Message: <38e2afef@news.povray.org>
david sharp <dsh### [at] interportnet> wrote
 > the format is just a list of numbers. spaces, commas or newlines
 > can delimit them.

No, commas (by themselves) will not delimit the isofunction
values.


Post a reply to this message

From: SamuelT 
Subject: Re: 3d data files - help please
Date: 29 Mar 2000 21:40:11
Message: <38E2BEA3.A5CBE850@aol.com>
david sharp wrote:

> <snip> They are scalars
> (single numbers),  not vectors or coordinates.

Took me a while before I figured that out. I've been working today to
crack the sequence and I did it. I will post an image I made using a
hand-typed data file.

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge


Post a reply to this message

From: david sharp
Subject: Re: 3d data files - help please
Date: 30 Mar 2000 11:37:33
Message: <38e382cd@news.povray.org>
SamuelT. <STB### [at] aolcom> wrote
[ ... ]

If you are going  to type in values, probably
just using an array in the scene file (rather than
a data file) would be less of a pain.

E.g.:
///////////////
#declare Darray =
 array[3][3][3]
{
 {
  {-1,1,-1},
  {0,1,0},
  {-1,1,-1}
 },
 {
  {0,-1,0},
  {-1,1,-1},
  {0,-1,0}
 },
 {
  {1,0,1},
  {0,-1,0},
  {1,0,1}
 }
}

#declare FileDataFn = function{ "data_3D_3", <1>
     library   "i_dat3d",Darray, <3,3,3,0>
}
//////////


Post a reply to this message

From: SamuelT 
Subject: Re: 3d data files - help please
Date: 30 Mar 2000 13:43:49
Message: <38E3A07F.BD030760@aol.com>
Thanks, I'll have to try that.

david sharp wrote:

> SamuelT. <STB### [at] aolcom> wrote
> [ ... ]
>
> If you are going  to type in values, probably
> just using an array in the scene file (rather than
> a data file) would be less of a pain.
>
> E.g.:
> ///////////////
> #declare Darray =
>  array[3][3][3]
> {
>  {
>   {-1,1,-1},
>   {0,1,0},
>   {-1,1,-1}
>  },
>  {
>   {0,-1,0},
>   {-1,1,-1},
>   {0,-1,0}
>  },
>  {
>   {1,0,1},
>   {0,-1,0},
>   {1,0,1}
>  }
> }
>
> #declare FileDataFn = function{ "data_3D_3", <1>
>      library   "i_dat3d",Darray, <3,3,3,0>
> }
> //////////

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge


Post a reply to this message

From: ingo
Subject: Re: 3d data files - help please
Date: 11 Apr 2000 13:56:46
Message: <8F13CAA51seed7@204.213.191.228>
SamuelT. wrote:

>Plus, does anybody know where I can get .dat files to use with
>isosurfaces?

Just stumbled over:

http://www-itg.lbl.gov/ITG.hm.pg.docs/Whole.Frog/Whole.Frog.html
near the end of the page has ftp-links to sets of a tomato, orange, 
pumpkin, frog and rat.

Mutch bigger and harder to get:
http://www.nlm.nih.gov/research/visible/visible_human.html

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: SamuelT 
Subject: Re: 3d data files - help please
Date: 11 Apr 2000 23:03:49
Message: <38F3E7CD.6F01BF40@aol.com>
Thanks, I'll check them out

ingo wrote:

> SamuelT. wrote:
>
> >Plus, does anybody know where I can get .dat files to use with
> >isosurfaces?
>
> Just stumbled over:
>
> http://www-itg.lbl.gov/ITG.hm.pg.docs/Whole.Frog/Whole.Frog.html
> near the end of the page has ftp-links to sets of a tomato, orange,
> pumpkin, frog and rat.
>
> Mutch bigger and harder to get:
> http://www.nlm.nih.gov/research/visible/visible_human.html
>
> Ingo
>
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray    : http://members.home.nl/seed7/

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.