POV-Ray : Newsgroups : povray.programming : POV Debugging Server Time
23 Dec 2024 21:34:34 EST (-0500)
  POV Debugging (Message 1 to 8 of 8)  
From: pcb
Subject: POV Debugging
Date: 9 Mar 2002 13:17:52
Message: <3c8a51d0$1@news.povray.org>
There has got to be a way (doesn't there?) of debugging POV scene files
(particularly the complicated, convoluted and disorganized macros I write).
You know, things like monitoring variables values, breakpoints, etc.  All I
have to do is find out where some kind soul has written down how to do so.
Suggestions anyone?
I haven't downloaded POV 3.5 yet so if that's the answer -   rats!


Post a reply to this message

From: Ken
Subject: Re: POV Debugging
Date: 9 Mar 2002 13:35:47
Message: <3C8A5646.AD77C803@pacbell.net>
pcb wrote:
> 
> There has got to be a way (doesn't there?) of debugging POV scene files

Docs -> #debug -> read docs.

-- 
Ken Tyler


Post a reply to this message

From: pcb
Subject: Re: POV Debugging
Date: 10 Mar 2002 11:39:40
Message: <3c8b8c4c$1@news.povray.org>
OK docs -> # debug -> read docs done (fu).
 Now (because I'm stupid) maybe you can tell me how to monitor a variable
and insert a break point plus maybe skip a procedure?




"Ken" <tyl### [at] pacbellnet> wrote in message
news:3C8A5646.AD77C803@pacbell.net...
>
>
> pcb wrote:
> >
> > There has got to be a way (doesn't there?) of debugging POV scene files
>
> Docs -> #debug -> read docs.
>
> --
> Ken Tyler


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: POV Debugging
Date: 10 Mar 2002 12:13:28
Message: <3c8b9438@news.povray.org>
In article <3c8b8c4c$1@news.povray.org> , "pcb" <pcb### [at] hotmailcom> wrote:

>  Now (because I'm stupid) maybe you can tell me how to monitor a variable

Now, maybe you should check the manual of your IDE?  In Microsoft Visual
Studio, the default compiler for POV-Ray you should have a tool palette you
can open for this...

If you are asking how to get the output of a variable declared in a POV-Ray
scene file (a question for this is the complete wrong group btw), you do it
like this:

  #declare foo = 1;
  #debug str(foo, 0, 0) // prints value of "foo"

Of course, this example expects that you have not turned the output of the
debug stream off.

> and insert a break point plus maybe skip a procedure?

I am not really sure what you are talking about.  I am not aware of any
"procedure" in POV-Ray.  Assuming you are referring to macros, here is an
example how to use both, straight from the docs:

  // Define the macro.  Parameters are:
  //   T:  Middle value of time
  //   T1: Initial time
  //   T2: Final time
  //   P1: Initial position (may be float, vector or color)
  //   P2: Final position (may be float, vector or color)
  //   Result is a value between P1 and P2 in the same proportion
  //    as T is between T1 and T2.
  #macro Interpolate(T,T1,T2,P1,P2)
     (P1+(T1+T/(T2-T1))*(P2-P1))
  #end

  sphere{
    Interpolate(I,0,15,<2,3,4>,<9,8,7>),  //center location is vector
    Interpolate(I,0,15,3.0,5.5)           //radius is float
    pigment {
      color Interpolate(I,0,15,rgb<1,1,0>,rgb<0,1,1>)
    }
  }

As for "break point", I am not really sure what break points have to do with
the POV-Ray scene description language and I don't get what you are up to.


If all this did not help you, I would recommend to post in povray.newusers and
maybe include a small example (in the body of the message, _not_ as
attachment) showing your problem.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: pcb
Subject: Re: POV Debugging
Date: 10 Mar 2002 19:24:14
Message: <3c8bf92e$1@news.povray.org>
OK got the variable business and, yes, by "procedures" I had meant macros.

I didn't mean to be totally snarky in my reply message but the write-up
under #debug is by no means clear (in fact #debug is not even listed as a
help topic in my version of POVRay 3.1g) and it ticked me a little to have
the instant (and erroneous) assumption made that I had not read the
documentation..

I also had failed to note the povray.newusers group which, I guess, is where
one should ask for help.

It might help if some people understood that there are a few of us (well me
anyway) who are not IT experts and consequently have to go running off to
look up even simple little things like "IDE".

Having said all that, I also need to add that POVRay has provided me with
hours of amusement.  I do appreciate the incredible amount of very high
quality work done by the POVRay team and, the fact that such a program is
free! is incredible.  I certainly do not wish to denigrate their work in any
way.

Thanks,


"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3c8b9438@news.povray.org...
> In article <3c8b8c4c$1@news.povray.org> , "pcb" <pcb### [at] hotmailcom> wrote:
>
> >  Now (because I'm stupid) maybe you can tell me how to monitor a
variable
>
> Now, maybe you should check the manual of your IDE?  In Microsoft Visual
> Studio, the default compiler for POV-Ray you should have a tool palette
you
> can open for this...
>
> If you are asking how to get the output of a variable declared in a
POV-Ray
> scene file (a question for this is the complete wrong group btw), you do
it
> like this:
>
>   #declare foo = 1;
>   #debug str(foo, 0, 0) // prints value of "foo"
>
> Of course, this example expects that you have not turned the output of the
> debug stream off.
>
> > and insert a break point plus maybe skip a procedure?
>
> I am not really sure what you are talking about.  I am not aware of any
> "procedure" in POV-Ray.  Assuming you are referring to macros, here is an
> example how to use both, straight from the docs:
>
>   // Define the macro.  Parameters are:
>   //   T:  Middle value of time
>   //   T1: Initial time
>   //   T2: Final time
>   //   P1: Initial position (may be float, vector or color)
>   //   P2: Final position (may be float, vector or color)
>   //   Result is a value between P1 and P2 in the same proportion
>   //    as T is between T1 and T2.
>   #macro Interpolate(T,T1,T2,P1,P2)
>      (P1+(T1+T/(T2-T1))*(P2-P1))
>   #end
>
>   sphere{
>     Interpolate(I,0,15,<2,3,4>,<9,8,7>),  //center location is vector
>     Interpolate(I,0,15,3.0,5.5)           //radius is float
>     pigment {
>       color Interpolate(I,0,15,rgb<1,1,0>,rgb<0,1,1>)
>     }
>   }
>
> As for "break point", I am not really sure what break points have to do
with
> the POV-Ray scene description language and I don't get what you are up to.
>
>
> If all this did not help you, I would recommend to post in povray.newusers
and
> maybe include a small example (in the body of the message, _not_ as
> attachment) showing your problem.
>
>     Thorsten
>
> ____________________________________________________
> Thorsten Froehlich
> e-mail: mac### [at] povrayorg
>
> I am a member of the POV-Ray Team.
> Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Ron Parker
Subject: Re: POV Debugging
Date: 11 Mar 2002 15:27:56
Message: <slrna8q4qf.9dp.ron.parker@fwi.com>
On Mon, 11 Mar 2002 16:25:32 -0800, pcb wrote:
> I also had failed to note the povray.newusers group which, I guess, is where
> one should ask for help.

Not necessarily.  But the point of Thorsten's post, which I think he perhaps
didn't make as clearly as he might have, is that the source code to the
POV-Ray renderer itself (in the C language) is available, and this newsgroup
is intended to be a place to discuss that.  This is not the newsgroup for
questions about actually using POV; it's for the people who want to modify
POV itself.

Questions about actually using POV should be directed to one of the groups
intended for that: povray.newusers, povray.general, or povray.advanced-users,
as appropriate.

The distinctions between groups can be found in the "Welcome to the POV
Newsgroups" post in the povray.frequently-asked-questions newsgroup (or 
something like that; I can't look it up right now.)

As for your question, there are no debugging facilities built in to the 
parser, except for the ability to output strings to the debug stream.  This
means you can't do breakpoints or single-stepping or any of the things you
might be used to in other languages.

Finally, please don't top-post, and please edit the posts to which you're
replying to the bare minimum necessary to keep the context you need for
your comments.  More information on newsgroup etiquette can be found in the
frequently-asked-questions group.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: pcb
Subject: Re: POV Debugging
Date: 11 Mar 2002 21:44:13
Message: <3c8d6b7d@news.povray.org>
.> This is not the newsgroup for
> questions about actually using POV; it's for the people who want to modify
> POV itself.

> Questions about actually using POV should be directed to one of the groups
> intended for that: povray.newusers, povray.general, or
povray.advanced-users,
> as appropriate.

 OK

> As for your question, there are no debugging facilities built in to the
> parser, except for the ability to output strings to the debug stream.
This
> means you can't do breakpoints or single-stepping or any of the things you
> might be used to in other languages.

OK - in that case I want to modify POV itself --------------

 >Finally, please don't top-post,

Haven't a clue what that it but I won't do it anyway

>and please edit the posts to which you're
> replying to

OK


Post a reply to this message

From: Ron Parker
Subject: Re: POV Debugging
Date: 12 Mar 2002 09:21:40
Message: <slrna8s3nl.cfb.ron.parker@fwi.com>
On Tue, 12 Mar 2002 18:45:34 -0800, pcb wrote:
>> As for your question, there are no debugging facilities built in to the
>> parser, except for the ability to output strings to the debug stream.
> This
>> means you can't do breakpoints or single-stepping or any of the things you
>> might be used to in other languages.
> 
> OK - in that case I want to modify POV itself --------------

Well, understand that adding such functionality would be a fairly difficult
operation, as these things go.  The parser is a tricky, tricky beast, and
to make matters worse it has to be absolutely portable.  So if you want to
add that sort of thing, the first thing you'll have to do is learn how the
parser works.  Once you've done that, you have to come up with a reasonable
way to add hooks into the cross-platform parser code that platform-specific
debugger code can interface with.  In that way, you can have a full-featured
GUI debugger on, say, Windows or Mac, or a command-line debugger on Linux, 
or whatever else comes to mind.

Such functionality wouldn't be hard for someone who understands the parser
to add (though it might be harder to do it the right way...) but if you're
not familiar with the code, you should probably start by getting a handle
on the code in tokenize.h, tokenize.c, and the various parse*.* files.  In
particular, you'll want to pay attention to the tokenizer, since that's 
likely to be where your debugging takes place.

I'm curious: how would you specify where a breakpoint is to be set, short 
of clicking in the editor window and saying you want a breakpoint there?
That is, the editor is an add-on part of POV for Windows, so the link between
editor and renderer is purposefully somewhat tenuous.  If you can't use the
editor, can you come up with another way of specifying the breakpoint
location?   Line number, perhaps?

> >Finally, please don't top-post,
> 
> Haven't a clue what that it but I won't do it anyway

That's where you follow up to someone's post by putting the reply at the
top and the quoted material at the bottom.  It's usually accompanied by
the full text of the original post including the signature.  The post I'm
replying to has done it right, so you've got the general idea. 

>>and please edit the posts to which you're
>> replying to

I could use a little editing myself if that's what I wrote. :)

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

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