POV-Ray : Newsgroups : povray.unofficial.patches : Patch enhancement request - Trace keyword Server Time
2 Sep 2024 06:15:18 EDT (-0400)
  Patch enhancement request - Trace keyword (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Ron Parker
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:30:58
Message: <slrn8lq1i5.1u8.ron.parker@linux.parkerr.fwi.com>
On Fri, 30 Jun 2000 13:10:02 -0700, SamuelT wrote:
>Okay, I tried it, but there are memory issues. It seems the memory
>consumption increases exponentially with every sphere that is added. Too many
>spheres and I crash. Here is my code:

Interesting.  Does the behaviour persist if you use #declare instead of
#local?

>#object{Obj}

What does #object do?

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Chris Huff
Subject: Re: Stacking spheres - was Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:41:46
Message: <chrishuff-336AFB.15415230062000@news.povray.org>
In article <395D0070.5525367B@aol.com>, STB### [at] aolcom wrote:

> Okay, I tried the idea, and it works, but pov crashes if I go through 
> 200 or more loops. Here is my code:

It might work better if you added the objects to an array intead of 
using a deeply nested union.
Oh, and why did you use "#object"?

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Ron Parker
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:42:14
Message: <slrn8lq27a.1u8.ron.parker@linux.parkerr.fwi.com>
On 30 Jun 2000 16:30:58 -0400, Ron Parker wrote:
>On Fri, 30 Jun 2000 13:10:02 -0700, SamuelT wrote:
>>Okay, I tried it, but there are memory issues. It seems the memory
>>consumption increases exponentially with every sphere that is added. Too many
>>spheres and I crash. Here is my code:
>
>Interesting.  Does the behaviour persist if you use #declare instead of
>#local?

By the way, I don't get this behavior when I run your code on MegaPOV 0.3.
It uses 160K per 100 iterations of the loop, plus about 80K standing still,
I ran it for 1000 spheres with no problem; memory usage was 1670616 bytes.
It might be a bug in recent MegaPOVs.  I don't have one to test with.
-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Chris Huff
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:47:28
Message: <chrishuff-A5F4F3.15473430062000@news.povray.org>
In article <slr### [at] linuxparkerrfwicom>, 
ron### [at] povrayorg wrote:

> What does #object do?

It acts the same as "object" as far as I can tell...things like "#box" 
also work. It works in the official version too, I guess it is just a 
strange parser bug.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Ron Parker
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:54:50
Message: <slrn8lq2uu.1vi.ron.parker@linux.parkerr.fwi.com>
On Fri, 30 Jun 2000 15:47:34 -0500, Chris Huff wrote:
>In article <slr### [at] linuxparkerrfwicom>, 
>ron### [at] povrayorg wrote:
>
>> What does #object do?
>
>It acts the same as "object" as far as I can tell...things like "#box" 
>also work. It works in the official version too, I guess it is just a 
>strange parser bug.

I looked it up.  The tokenizer just ungets anything that doesn't belong
after a # without raising any eyebrows.  You can even say

#declare #foo = 12;
#declare #bar = foo;

without any problems.  Nice for obfuscation, but not guaranteed to stay
that way.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: SamuelT
Subject: Re: Stacking spheres - was Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:56:13
Message: <395D0A4D.CE2A08A7@aol.com>
Chris Huff wrote:

> It might work better if you added the objects to an array intead of
> using a deeply nested union.

Darn, haven't learned arrays yet. What would I do with the array?


> Oh, and why did you use "#object"?

I thought I had to encase Obj inside it....

~Samuel


Post a reply to this message

From: Ron Parker
Subject: Re: Stacking spheres - was Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 16:59:48
Message: <slrn8lq388.1vi.ron.parker@linux.parkerr.fwi.com>
On Fri, 30 Jun 2000 13:59:58 -0700, SamuelT wrote:
>Chris Huff wrote:
>
>> It might work better if you added the objects to an array intead of
>> using a deeply nested union.
>
>Darn, haven't learned arrays yet. What would I do with the array?

Put your spheres in it and loop over the ones you have so far looking for
a hit with trace().  Then take the closest hit you found.  The nested unions
are probably faster, if you can get them to work.

>> Oh, and why did you use "#object"?
>
>I thought I had to encase Obj inside it....

You're looking for "object" rather than "#object".  "#object" is bad syntax,
but the parser treats it like "object" for now.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: SamuelT
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 17:04:24
Message: <395D0C38.B878F3E4@aol.com>
Worse, the whole system freezes. I'm currently using a Macintosh for this.

Ron Parker wrote:

> Interesting.  Does the behaviour persist if you use #declare instead of
> #local?


Post a reply to this message

From: SamuelT
Subject: Re: Stacking spheres - was Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 17:09:42
Message: <395D0D75.71EB3702@aol.com>
Ron Parker wrote:

> Put your spheres in it and loop over the ones you have so far looking for
> a hit with trace().  Then take the closest hit you found.  The nested unions
> are probably faster, if you can get them to work.

Then I'll try using union when I get home, since that computer is a PC.


> >> Oh, and why did you use "#object"?
> >
> >I thought I had to encase Obj inside it....
>
> You're looking for "object" rather than "#object".  "#object" is bad syntax,
> but the parser treats it like "object" for now.

Okay.

~Samuel


Post a reply to this message

From: Bob Hughes
Subject: Re: Patch enhancement request - Trace keyword
Date: 30 Jun 2000 20:24:21
Message: <395d3a35@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] linuxparkerrfwicom...
| >
| >> What does #object do?
| >
| >It acts the same as "object" as far as I can tell...things like "#box"
| >also work. It works in the official version too, I guess it is just a
| >strange parser bug.
|
| I looked it up.  The tokenizer just ungets anything that doesn't belong
| after a # without raising any eyebrows.  You can even say
|
| #declare #foo = 12;
| #declare #bar = foo;
|
| without any problems.  Nice for obfuscation, but not guaranteed to stay
| that way.

Neither here nor there but... CodeMax syntax highlighting sees keywords
without the "#" and yet POV-Ray doesn't parse them okay; as expected of
course.

Bob


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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