POV-Ray : Newsgroups : povray.general : 2^3*4^4: quick what is it? Server Time
8 Aug 2024 20:21:03 EDT (-0400)
  2^3*4^4: quick what is it? (Message 14 to 23 of 33)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Ken
Subject: Re: 2^3*4^4: quick what is it?
Date: 29 Nov 2000 22:38:26
Message: <3A25CC61.96232DF0@pacbell.net>
"Greg M. Johnson" wrote:
> 
> Ron Parker wrote:
> 
> > It's worth noting that this is not a question for .general.
> 
> Okeleeedoke.  I expected a criticsm for not putting this in povray.advanced-users,
> since it's a math question, but then again povray.new-users since it's a stupidly
> simply one, or even povray.off-topic, but the experts like Ron aren't subscribed
> to that anymore,  AND I didn't realize that the ^ was inoperative for general
> declarations in 3.1g.

Don't let it upset you too much. I think Ron is just having a bad hair day.

*BUT* he does bring up a valid point. Whenever an inconsistency arises
in one of the unofficial versions of the program they should indeed be
discussed in the unofficial patches group. That fact you were using
MegaPov when the problem occured should have been your first clue on
where to post the message. A good reason for this is when someone like
Ron, a member of the POV-Team, sees a question like this arise he may
be tempted to spend time looking at the source code for POV-Ray and try
to understand where the inconstancy lies. If he wastes his time looking
in the official source code, for problems that don't apply to it, he may
not be so generous next time trying to be of help. It is a matter of
courtesy to him, and the other Team members who monitor and maintain
these groups, to try to help keep them organized and on topic.

-- 
Ken Tyler


Post a reply to this message

From: Ron Parker
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 00:38:01
Message: <slrn92bptt.kl9.ron.parker@fwi.com>
On Wed, 29 Nov 2000 19:41:21 -0800, Ken wrote:
>Don't let it upset you too much. I think Ron is just having a bad hair day.

Well, yes... annual performance reviews at work and all.  The good news
is, I still have a job. :)

>Ron, a member of the POV-Team, sees a question like this arise he may
>be tempted to spend time looking at the source code for POV-Ray and try
>to understand where the inconstancy lies. If he wastes his time looking

And that's exactly what I did; I spent several minutes grepping for 
HAT_TOKEN and not finding anything.  It's just as well, though: the
new functionality has been merged into 3.5, so it needs to be fixed 
there.

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


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 08:56:13
Message: <3A265B2C.5ED7B4D@my-dejanews.com>
Ron Parker wrote:

> >Ron, a member of the POV-Team, sees a question like this arise he may
> >be tempted to spend time looking at the source code for POV-Ray and try
> >to understand where the inconstancy lies. If he wastes his time looking
>
> And that's exactly what I did; I spent several minutes grepping for
> HAT_TOKEN and not finding anything.  It's just as well, though: the
> new functionality has been merged into 3.5, so it needs to be fixed
> there.

Sorry mons.

I guess I thought the introduction of ^ was so cool and so necessary [as opposed
to pow(a,b)] that I forgot it wasn't in 3.1g.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 08:59:12
Message: <3A265BDF.F9D1FC88@my-dejanews.com>
Matt Giwer wrote:

>         When in doubt use parenthesis. They rule.

I was going so wacky with parens that I was second-guessing myself and adding
2 or 3 extra pairs to every equation.


Post a reply to this message

From: Ken
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 11:03:29
Message: <3A267B03.70722769@pacbell.net>
"Greg M. Johnson" wrote:
> 
> It is interesting that when I do a #debug for a variable which I have
> declared as  [ #declare angie=2^3*4^4;]
> povray tells me it is 1084576,  when I paste this text (2^3*4^4) into
> Lotus1-2-3, the result is 2048.

Just out of curiosity if you know the answer is 2048 why don't you
just put 2048 in as your declared value ? Sure would make your
code more readable.

<duck>


Post a reply to this message

From: Matt Giwer
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 16:53:47
Message: <3A26CC6B.E60B569B@ij.net>
"Greg M. Johnson" wrote:
> 
> Matt Giwer wrote:
> 
> >         When in doubt use parenthesis. They rule.
> 
> I was going so wacky with parens that I was second-guessing myself and adding
> 2 or 3 extra pairs to every equation.

	It is worth it to remove all doubt and certainly faster than working
through the evaluation hierarchy if it isn't second nature to you. 

-- 
I would rather hide behind freedom of speech than
behind maudlin self-righteousness. 
	-- Cabell W. Johnson, 7


Post a reply to this message

From: Warp
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 17:54:26
Message: <3a26daa2@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: Just out of curiosity if you know the answer is 2048 why don't you
: just put 2048 in as your declared value ? Sure would make your
: code more readable.

  Sometimes putting the result is less readable than putting the calculation
used to get the result.

  For example, I bet that this:

sphere { <1,2,3>*.25, 10*.25 }

tells you more about what is happening than this:

sphere { <.25, .5, .75>, 2.5 }

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 18:24:08
Message: <3A26E24A.69548DA1@pacbell.net>
Warp wrote:

>   For example, I bet that this:
> 
> sphere { <1,2,3>*.25, 10*.25 }
> 
> tells you more about what is happening than this:
> 
> sphere { <.25, .5, .75>, 2.5 }

That is an absurd presumption. Why should I have to sit here and
mentally calculate values when absolutes are instantly readable ?

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ron Parker
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 18:29:57
Message: <slrn92dono.l61.ron.parker@fwi.com>
On Thu, 30 Nov 2000 15:27:06 -0800, Ken wrote:
>
>
>Warp wrote:
>
>>   For example, I bet that this:
>> 
>> sphere { <1,2,3>*.25, 10*.25 }
>> 
>> tells you more about what is happening than this:
>> 
>> sphere { <.25, .5, .75>, 2.5 }
>
>That is an absurd presumption. Why should I have to sit here and
>mentally calculate values when absolutes are instantly readable ?

Which is more readable and conveys my intent better?

color_map {
  [ 1/7 color red 1 ]
  [ 1/7 color red 1 green .5]
  [ 2/7 color red 1 green .5]
  [ 2/7 color red 1 green 1]
  ...
}

or

color_map {
  [ 0.14285714 color red 1]
  [ 0.14285714 color red 1 green .5]
  [ 0.28571428 color red 1 green .5]
  [ 0.28571428 color red 1 green 1]
  ...
}

-- 
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: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 19:08:31
Message: <chrishuff-B442D7.19090830112000@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
wrote:

> Which is more readable and conveys my intent better?

Not to mention:
2*pi vs. 6.283185

sqrt(2) vs. 1.414213

pow(A, B) or A^B where either A or B (or both) is a variable.

Then there is anything using sin(), cos(), etc...

sin(45) is much more readable than 0.707106, or even sqrt(2)/2, and so 
on...not to mention the precision you gain from having POV calculate it.

And what if you need something to vary with a loop? Sure, you *could* 
calculate each object manually...but that definitely wouldn't be more 
readable.

Also, expressions like <...>*SomeValue can be very useful for making 
quick adjustments, I often use them when positioning my camera...why 
should I do the math myself if I can just tell POV to do it? If I want 
to keep the same angle to the origin but change the distance, I just 
multiply the location by a scaling value, that way I only have to mess 
with one number instead of doing the multiplication of the three vector 
components.
It would be absurd to say that raw numbers are always easier to read 
than simple expressions.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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