|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |