POV-Ray : Newsgroups : povray.newusers : debbug Server Time
29 Jul 2024 12:27:45 EDT (-0400)
  debbug (Message 1 to 7 of 7)  
From: shimon a10
Subject: debbug
Date: 21 Jan 2006 12:15:00
Message: <web.43d26b0828974d5c5a8ded0@news.povray.org>
Hi, for everybody.

1. As anew user in the PovRay, I want to know how can i debbug my plan, and
   where can i see the results of any step in the plan.
2. How can i enter PovRay from matlab a height map. or a height map that is
   composed of lots of boxes.
3. How can i use the trace function. i need a simple example to know how to
   use it.
4. As new user, I need a detailed enplanation.
5. lots of thanks.

shimon


Post a reply to this message

From: Oleguer Vilella
Subject: Re: debbug
Date: 21 Jan 2006 14:28:52
Message: <43d28b74@news.povray.org>
About the third point you can have a look at trace exemple in 
scenes/languages.

Oleguer




news:web.43d26b0828974d5c5a8ded0@news.povray.org...
> Hi, for everybody.
>
> 1. As anew user in the PovRay, I want to know how can i debbug my plan, 
> and
>   where can i see the results of any step in the plan.
> 2. How can i enter PovRay from matlab a height map. or a height map that 
> is
>   composed of lots of boxes.
> 3. How can i use the trace function. i need a simple example to know how 
> to
>   use it.
> 4. As new user, I need a detailed enplanation.
> 5. lots of thanks.
>
> shimon
>
>
>
>


Post a reply to this message

From: Brian Elliott
Subject: Re: debbug
Date: 21 Jan 2006 20:41:27
Message: <43d2e2c7@news.povray.org>
"shimon_a10" <shi### [at] wallacoil> wrote in message 
news:web.43d26b0828974d5c5a8ded0@news.povray.org...
> Hi, for everybody.
>
> 1. As anew user in the PovRay, I want to know how can i debbug my plan, 
> and
>   where can i see the results of any step in the plan.

Hi Shimon

For an explanation and example of how to do this, see manual section 
3.2.2.7:  "User Message Directives".  It tells how to print and format 
messages from your POV script, and you'll be most likely to use the #debug 
directive.  If you are using PoV for Windows, the text appears in the 
messages window.  If you are using Linux or other *NIX then the text prints 
on your terminal output.  Can be redirected to a file.

Also you likely want to build your messages from variables and their values. 
The functions concat() and str() will do this.  Manual section 3.2.1.7.3: 
"String Functions"

Brian


Post a reply to this message

From: Thomas de Groot
Subject: Re: debbug
Date: 22 Jan 2006 04:31:00
Message: <43d350d4$1@news.povray.org>
"shimon_a10" <shi### [at] wallacoil> schreef in bericht
news:web.43d26b0828974d5c5a8ded0@news.povray.org...
> 2. How can i enter PovRay from matlab a height map. or a height map that
is
>    composed of lots of boxes.

I am not sure if I understand correctly your question, but if you want to
make a height_field from data generated by Matlab, first look at section
2.3.3.2. of the docs, if you can find your answer there. I don't know if
Matlab can generate an image_map to do the job, though. Otherwise, the
height_field can be generated by a function.

Thomas


Post a reply to this message

From: shimon a10
Subject: Re: debbug
Date: 22 Jan 2006 15:30:00
Message: <web.43d3ea6da7a603e5a8ded0@news.povray.org>
"Brian Elliott" <NotForSpam@AskIfUWant> wrote:
> "shimon_a10" <shi### [at] wallacoil> wrote in message
> news:web.43d26b0828974d5c5a8ded0@news.povray.org...
> > Hi, for everybody.
> >
> > 1. As anew user in the PovRay, I want to know how can i debbug my plan,
> > and
> >   where can i see the results of any step in the plan.
>
> Hi Shimon
>
> For an explanation and example of how to do this, see manual section
> 3.2.2.7:  "User Message Directives".  It tells how to print and format
> messages from your POV script, and you'll be most likely to use the #debug
> directive.  If you are using PoV for Windows, the text appears in the
> messages window.  If you are using Linux or other *NIX then the text prints
> on your terminal output.  Can be redirected to a file.
>
> Also you likely want to build your messages from variables and their values.
> The functions concat() and str() will do this.  Manual section 3.2.1.7.3:
> "String Functions"
>
> Brian

Hi, Brian and thanks for your help.

1. I want to know how or where can i see the valus or results of variables,
   like in matlab as i want to follow or debug my plan.
2. I'll be glad if you write for me a simple plan that make me understand
   the point.
3. thanks again.
4. bye.

shimon


Post a reply to this message

From: Chris B
Subject: Re: debbug
Date: 22 Jan 2006 18:27:27
Message: <43d414df@news.povray.org>
"shimon_a10" <shi### [at] wallacoil> wrote in message 
news:web.43d3ea6da7a603e5a8ded0@news.povray.org...
> "Brian Elliott" <NotForSpam@AskIfUWant> wrote:
>> "shimon_a10" <shi### [at] wallacoil> wrote in message
>> news:web.43d26b0828974d5c5a8ded0@news.povray.org...
>> > Hi, for everybody.
>> >
>> > 1. As anew user in the PovRay, I want to know how can i debbug my plan,
>> > and
>> >   where can i see the results of any step in the plan.
>>
>> Hi Shimon
>>
>> For an explanation and example of how to do this, see manual section
>> 3.2.2.7:  "User Message Directives".  It tells how to print and format
>> messages from your POV script, and you'll be most likely to use the 
>> #debug
>> directive.  If you are using PoV for Windows, the text appears in the
>> messages window.  If you are using Linux or other *NIX then the text 
>> prints
>> on your terminal output.  Can be redirected to a file.
>>
>> Also you likely want to build your messages from variables and their 
>> values.
>> The functions concat() and str() will do this.  Manual section 3.2.1.7.3:
>> "String Functions"
>>
>> Brian
>
> Hi, Brian and thanks for your help.
>
> 1. I want to know how or where can i see the valus or results of 
> variables,
>   like in matlab as i want to follow or debug my plan.
> 2. I'll be glad if you write for me a simple plan that make me understand
>   the point.
> 3. thanks again.
> 4. bye.
>
> shimon
>

Hi Shimon,

In POV-Ray, rather than use the word 'plan' it is clearer to use the term 
SDL (Scene Description Language) or Scene file.

At most points in a scene file you can add a #debug directive to display a 
line of text. The #debug directive writes the line of text to the debug 
stream, which, by default in the Windows version, writes it into the 
'Messages' window, which is displayed in the far left tab in the Windows 
POV-Ray User Interface.

You can include variables in the text written out using the #debug 
directive, but any non-text variables that you wish to include in the text 
stream will need to be converted to text first. Numeric variables are 
converted to text using the str() function, Vector variables are converted 
to text using the vstr() function.

As Brian mentioned you will often find yourself using the concat() function 
to build something that is easy to read because this concatenates bits of 
text together.
One thing you often need to add to the end of a string is the escape 
sequence '\n' which adds a line feed (newline or carriage return) to the 
text stream.

Here are some examples:
    #debug "Hello World.\n"
    // Just uses text, but can be usefull to help you make sure that a bit 
of SDL is being executed.

    #declare MyString = "Hello World";
    #debug concat(MyString,".\n")
    // Concatenates the contents of the variable 'MyString' with the new 
line character.

    #declare MyNumber = 3.14;
    #debug concat("My number is: ",str(MyNumber,0,0),"\n")
    // Converts the variable 'MyNumber' into a string, prefixes some text 
and appends
    // a new line character.

    #declare MyVector = <1,2,3>;
    #debug concat("My vector is: <",vstr(3,MyVector,",",0,0),">\n")
    // Converts the variable 'MyVector' into a string, prefixes some text 
and a left chevron
    // and appends a right chevron and a new line character.

Hope this helps get you started.

Regards,
Chris B.


Post a reply to this message

From: WellenZillich
Subject: Re: debbug
Date: 23 Mar 2006 10:10:01
Message: <web.4422b78fa7a603e1c71d6360@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "shimon_a10" <shi### [at] wallacoil> wrote in message
> news:web.43d3ea6da7a603e5a8ded0@news.povray.org...
> > "Brian Elliott" <NotForSpam@AskIfUWant> wrote:
> >> "shimon_a10" <shi### [at] wallacoil> wrote in message
> >> news:web.43d26b0828974d5c5a8ded0@news.povray.org...

> I want to know how to debug a scene ...

Try, taking care for the Ampersand:

    xterm -T DEBUGWINDOW -e tail -f ./DEBUG.txt &
    povray +GD ./DEBUG.txt ./INPUT.pov

Lines in INPUT.pov like e.g.:

    #debug concat( "nHALLO CHRIS: ", str(clock,0,0), "n" )

will produce their output in DEBUGWINDOW and, nearly, nothing else. Does
work for pov3.6 on Linux SuSE9.x.

Best regards: WellenZillich


Post a reply to this message

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