POV-Ray : Newsgroups : povray.general : Sparse Data Server Time
11 Aug 2024 15:19:49 EDT (-0400)
  Sparse Data (Message 1 to 9 of 9)  
From: David Vincent-Jones
Subject: Sparse Data
Date: 4 Jul 1999 12:58:43
Message: <377f92c3@news.povray.org>
I am currently gridding my sparse data prior to rendering as a height field.
The capability of direct rendering of the sparse data would really be a
bonus.


Post a reply to this message

From: PoD
Subject: Re: Sparse Data
Date: 4 Jul 1999 17:56:59
Message: <377FD8B9.E6316345@merlin.net.au>
David Vincent-Jones wrote:
> 
> I am currently gridding my sparse data prior to rendering as a height field.
> The capability of direct rendering of the sparse data would really be a
> bonus.

Depending on how sparse your data are and whether you want to use CSG, a
triangle mesh might be more appropriate.

Cheers, PoD.


Post a reply to this message

From: Ken
Subject: Re: Sparse Data
Date: 4 Jul 1999 23:22:33
Message: <378024A7.10F32358@pacbell.net>
David Vincent-Jones wrote:
> 
> I am currently gridding my sparse data prior to rendering as a height field.
> The capability of direct rendering of the sparse data would really be a
> bonus.

What is "sparse data" ?

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Markus Becker
Subject: Re: Sparse Data
Date: 5 Jul 1999 04:53:10
Message: <37807393.3354D304@zess.uni-siegen.de>
Ken wrote:
> 
> What is "sparse data" ?

A matrix where only "some" data points are occupied. Depending
on how much data points are available, it might be more economic
to not store the matrix as e.g.

0 0 0 0 1 0
0 1 0 0 0 0
0 0 0 1 0 0

but as:

(1,5),(2,2),(3,4).

Markus
-- 

 Ich nicht eine Sekunde!!!" H. Heinol in Val Thorens


Post a reply to this message

From: Nieminen Mika
Subject: Re: Sparse Data
Date: 5 Jul 1999 06:25:52
Message: <37808830@news.povray.org>
Dynamic memory allocation is not possible in povray. This means that
you can't make, for example, lists or other dynamic data structure types.
The only "half"-dynamic data type is the array, which is not very useful
for lists.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Sparse Data
Date: 8 Jul 1999 11:26:53
Message: <3784C44F.571CDEBB@compuserve.com>
>Dynamic memory allocation is not possible in povray. This means that
you can't make, for example, lists or other dynamic data structure
types.
The only "half"-dynamic data type is the array, which is not very useful

for lists.<

Actually, it is, because POV-Ray is written in C, and the scene
description language is interpreted. I believe it dynamically allocates
the objects and variables (using pre-allocated memory for speed) as it
parses them, doesn't it? Now, you couldn't make pointers, and that kind
of thing, but the structures would be faster in C anyway, all you would
have to do is describe the structure to the parser, and tell the parser
what to put in it or retrieve from it.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Sparse Data
Date: 9 Jul 1999 02:35:50
Message: <37859846@news.povray.org>
Chris Huff <Chr### [at] compuservecom> wrote:
:>Dynamic memory allocation is not possible in povray.

: Actually, it is, because POV-Ray is written in C, and the scene
: description language is interpreted. I believe it dynamically allocates
: the objects and variables (using pre-allocated memory for speed) as it
: parses them, doesn't it?

  I think that we are talking about different things here.

  You can't make a list structure with the povray script language. Arrays
are a bad substitute since you can't change their size after creation.

  I think that 'new' and 'delete' along with pointers may be a good idea
for the next povray version (perhaps pov4?).
  Something like:

#declare MyObject =
  sphere
  { 0,1 pigment { rgb 1 }
    MyObject* next;
  }

#declare ObjectList = null;

#declare Ind=0;
#while(Ind<100)
  #declare Obj = new MyObject;
  #declare Obj.next = ObjectList;
  #declare ObjectList = Obj;
  #declare Ind=Ind+1;
#end

#declare Obj = ObjectList;
#while(Obj != null)
  object { Obj translate x*Ind }
  #declare Obj = Obj.next;
#end


  It shouldn't be very difficult to achieve...

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Sparse Data
Date: 9 Jul 1999 05:25:00
Message: <3785C0FC.9CEFE22E@compuserve.com>
>I think that we are talking about different things here.<

I think so too...


>You can't make a list structure with the povray script language. Arrays

are a bad substitute since you can't change their size after creation.<

True, I was talking about implementing a "list" or "tree" data structure
like an array. But you can change the size of an array by copying the
data to a temporary array, redefining the original to be the new size,
then copying the data back. A macro for this woud be useful, and will be
added to the next version of my macro collection.


>I think that 'new' and 'delete' along with pointers may be a good idea
for the next povray version (perhaps pov4?).<
Maybe, but I don't know what use they would be in this kind of a
language, or even if it would be possible to implement them easily.
Perhaps after the rewrite for 4.0.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Sparse Data
Date: 9 Jul 1999 06:15:29
Message: <3785cbc1@news.povray.org>
Chris Huff <Chr### [at] compuservecom> wrote:
: Maybe, but I don't know what use they would be in this kind of a
: language, or even if it would be possible to implement them easily.

  They would be very useful in some cases. For example, if the amount of
objects may change at parse time (perhaps depending on the clock value and
the rand() function, for example).
  Suppose that I have cubical tube pattern and I create a 3D array of these
patterns with each unit rotated by a random amount of 90 degrees in each
axis. The result is a very complex set of long tubes (I have done this, it's
pretty weird; I can post an image if you want).
  Now suppose that for faster rendering I would like to optimize the scene.
If there are two contiguous cylinders, I could substitute them with one
longer cylinder. If there are two contiguous quarter-toruses I could
substitute them with a half-torus, etc.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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