POV-Ray : Newsgroups : povray.newusers : Basic question Server Time
31 Oct 2024 10:23:55 EDT (-0400)
  Basic question (Message 1 to 8 of 8)  
From: joost 1972
Subject: Basic question
Date: 30 Sep 2008 11:30:01
Message: <web.48e24578b1b0190e2a36ae330@news.povray.org>
Hi,

I was wondering if anybody could help me with two basic questions:
1) I really like the coloring in the editor window, but can't seem to turn it on
for a few of my files (I assume its called "Color Syntax Highlighting", but that
option seems to be on everywhere, even in files that only have black&white
text.)
2) Is there the possibility to show the results of functions you use in macro's.
I've made a macro which involves rotating a triangle by the result of the
function (atan2), but it doesn't render as I expected it to. I would like to
see the plain number result of the function, in stead of just the final render,
because there could be numerous reasons why my triangle is not ending up where I
expected it to (for all I know it could be rotating 20 full circles and ending
up in nearly the same position it started in...)


Thanks, Joost


Post a reply to this message

From: Kyle
Subject: Re: Basic question
Date: 30 Sep 2008 11:41:29
Message: <qrh4e4p4mjvlrrkclbmvhvqand213api9h@4ax.com>
On Tue, 30 Sep 2008 11:27:52 EDT, "joost_1972" <joo### [at] hotmailcom> wrote:

>1) I really like the coloring in the editor window, but can't seem to turn it on
>for a few of my files (I assume its called "Color Syntax Highlighting", but that
>option seems to be on everywhere, even in files that only have black&white
>text.)

Do the files that are in black and white have a "pov" or "inc" extension?  Search for
"syntax highlighting" in the help file.

>2) Is there the possibility to show the results of functions you use in macro's.
>I've made a macro which involves rotating a triangle by the result of the
>function (atan2), but it doesn't render as I expected it to. I would like to
>see the plain number result of the function, in stead of just the final render,
>because there could be numerous reasons why my triangle is not ending up where I
>expected it to (for all I know it could be rotating 20 full circles and ending
>up in nearly the same position it started in...)

Look into the #debug statement.


Post a reply to this message

From: Warp
Subject: Re: Basic question
Date: 30 Sep 2008 11:42:20
Message: <48e248db@news.povray.org>
joost_1972 <joo### [at] hotmailcom> wrote:
> 2) Is there the possibility to show the results of functions you use in macro's.
> I've made a macro which involves rotating a triangle by the result of the
> function (atan2), but it doesn't render as I expected it to. I would like to
> see the plain number result of the function, in stead of just the final render,
> because there could be numerous reasons why my triangle is not ending up where I
> expected it to (for all I know it could be rotating 20 full circles and ending
> up in nearly the same position it started in...)

#debug concat("The value is: ", str(atan2(5), 0, -1), "\n")

-- 
                                                          - Warp


Post a reply to this message

From: joost 1972
Subject: Re: Basic question
Date: 30 Sep 2008 14:00:00
Message: <web.48e268619ccf92ac2a36ae330@news.povray.org>
Thanks for the quick replies; debug and string was what I was looking for. By
the way, I couldn't get concat to work with the function atan2, but it did work
using the identifier. I figured out the value outcome of atan2 is in radians,
and not in degrees, which clarified my triangle hardly rotating :-)

I had already found syntax highlighting in the help file, but turning it on and
off didn't do anything. But the debug solution is the more important one for
me, because it was stopping my progress.

Thanks, Joost


Post a reply to this message

From: Tim Attwood
Subject: Re: Basic question
Date: 30 Sep 2008 18:27:23
Message: <48e2a7cb$1@news.povray.org>
> 1) I really like the coloring in the editor window, but can't seem to turn 
> it on
> for a few of my files (I assume its called "Color Syntax Highlighting", 
> but that
> option seems to be on everywhere, even in files that only have black&white
> text.)

In the windows version this happens sometimes...
You can turn it on by

Right-click, editor preferences (or alt-enter) |
click the language/tabs tab |
select POV-Ray from the language drop box |
click apply


Post a reply to this message

From: alphaQuad
Subject: Re: Basic question
Date: 30 Sep 2008 20:35:01
Message: <web.48e2c58a9ccf92ace2914abb0@news.povray.org>
> #debug concat("The value is: ", str(atan2(5), 0, -1), "\n")

I saw something like that and thought, I am not typing all that every time I
want to see a val.


#macro echo(Str)
  #if (1)
      #debug Str
  #end
#end
#macro echof(f)
  echo(str(f,2,5))
#end
#macro echov(V)
  echo(concat("<",str(V.x,2,5),",",str(V.y,2,5),",",str(V.z,2,5),">"))
#end
#macro echov2(V)
  echo(concat("<",str(V.x,2,5),",",str(V.y,2,5),">"))
#end

echof(a)
echo("\n") // always follows or delayed in echoing


Post a reply to this message

From: alphaQuad
Subject: Re: Basic question
Date: 30 Sep 2008 21:35:01
Message: <web.48e2d31f9ccf92ace2914abb0@news.povray.org>
#macro cr()
  echo("\n")
#end


Post a reply to this message

From: joost 1972
Subject: Re: Basic question
Date: 1 Oct 2008 08:40:01
Message: <web.48e36f909ccf92ac2a36ae330@news.povray.org>
The language option solved my highlight problems.
Thanks, also for the debug macro!

Joost


Post a reply to this message

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