POV-Ray : Newsgroups : povray.general : 2^3*4^4: quick what is it? Server Time
8 Aug 2024 20:30:19 EDT (-0400)
  2^3*4^4: quick what is it? (Message 21 to 30 of 33)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
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

From: Warp
Subject: Re: 2^3*4^4: quick what is it?
Date: 30 Nov 2000 19:36:40
Message: <3a26f298@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: That is an absurd presumption. Why should I have to sit here and
: mentally calculate values when absolutes are instantly readable ?

  You don't need to calculate the result. You only need to understand where
does the expression come from.
  For example, if a cylinder is located at <1,2,3> and another cylinder is
located at <7,8,9>, putting a sphere exactly half-way in the middle of them
is easier to do and understand by writing (<1,2,3>+<7,8,9>)/2 than writing
the result. The result will probably not tell you anything (perhaps you
could guess that it's somewhere between the two cylinders, but you couldn't
be sure without making that calculation anyways).

  3/7 is a lot more clear than 0.4285714285

-- 
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 20:49:31
Message: <3A27045E.54A995D9@pacbell.net>
Warp wrote:
> 
> Ken <tyl### [at] pacbellnet> wrote:
> : That is an absurd presumption. Why should I have to sit here and
> : mentally calculate values when absolutes are instantly readable ?
> 
>   You don't need to calculate the result. You only need to understand where
> does the expression come from.

I won't concede my point of view nor will I argue it with you.

-- 
Ken Tyler


Post a reply to this message

From: Warp
Subject: Re: 2^3*4^4: quick what is it?
Date: 1 Dec 2000 07:59:16
Message: <3a27a0a3@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: I won't concede my point of view nor will I argue it with you.

  Could you please tell me how did I calculate this number?

  12.1243556529821410546921241

-- 
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: Greg M  Johnson
Subject: 2 applications for not typing in every friggin number.
Date: 1 Dec 2000 08:34:37
Message: <3A27A791.7BD9B44F@my-dejanews.com>
Ken 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.
> <duck>

I)
For my fractal animation ("Warp's Julia Island Forest in Winter,")  I
explored 11.85 orders of magnitude in camera angle. My variable for the
camera angle went something like (roughly from memory):
   #declare angie=1.2*10^(1-11.85*clock);
Then I could set up a zooming animation, just debugging out the value of
angie with each frame.

II)
Another application involved using the cells pigment in an isosurface to
make a city.  The max gradient value has a huge effect on the "quality" of
the image (the diffuse==0 problem for step functions in isosurfaces).  I
set up an animation with a variable  for max gradient called
   #declare maxie=1.2^(33*clock+1);
and added a text object to the animation  (roughly from memory)
   text_object{"timrom.ttf",str(maxie,3,1),1,0         //blahblahblah
The result was my own tutorial showing me the effect of the max gradient on
the quality of the image.

Oops--this should have gone in p.u.p.  :-|








:)


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 2^3*4^4: quick what is it?
Date: 1 Dec 2000 08:40:01
Message: <3A27A8E0.9D415530@my-dejanews.com>
Matt Giwer wrote:

>         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.

The point was that the evaluation hierarchy in not correct in MP0.5a.  For a while
I was fearing that the pov-team and/or the creators of the C language  knew of some
kind of "smarter-persons'-hierarchy-they-only-teach-you-in-computer-science."


Post a reply to this message

From: Margus Ramst
Subject: Re: 2^3*4^4: quick what is it?
Date: 1 Dec 2000 08:40:51
Message: <3A27AACA.89BDFE9F@peak.edu.ee>
Warp wrote:
> 
>   Could you please tell me how did I calculate this number?
> 
>   12.1243556529821410546921241
> 

Perhaps the same way I got this number?
18.646427654437621998744

But you've already lost the debate to Ken's superior tactics :)

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Ken
Subject: Re: 2^3*4^4: quick what is it?
Date: 1 Dec 2000 10:10:22
Message: <3A27C016.79229C24@pacbell.net>
Margus Ramst wrote:
> 
> Warp wrote:
> >
> >   Could you please tell me how did I calculate this number?
> >
> >   12.1243556529821410546921241
> >
> 
> Perhaps the same way I got this number?
> 18.646427654437621998744

This one is easy. It was calculated with an electronic calculating
device.
 
> But you've already lost the debate to Ken's superior tactics :)

:)

-- 
Ken Tyler


Post a reply to this message

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

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