POV-Ray : Newsgroups : povray.pov4.discussion.general : Scale Postfixes Server Time
13 Oct 2024 06:40:52 EDT (-0400)
  Scale Postfixes (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Scale Postfixes
Date: 5 Aug 2009 10:15:01
Message: <4a7993e5@news.povray.org>
Chambers schrieb:
> clipka wrote:
>> They're perfectly counter-intuitive for use in "rotate" though:
>
> True, they're meant for conversion rather than designation.
>
... which makes my point, because I'd love to have some means of 
designation ;-)


Post a reply to this message

From: David H  Burns
Subject: Re: Scale Postfixes
Date: 5 Aug 2009 10:27:22
Message: <4a7996ca$1@news.povray.org>
Chambers wrote:
> David H. Burns wrote:
>> "Rad" and "deg" for angles and rotation *would* be useful.
> 
> They're already implemented.
> 
> // Declares the variable rad to be 45 degrees converted into radians.
> #declare rad = radians(45);
> 
> // Declares the variable deg to be 0.3 radians converted into degrees.
> #declare deg = degrees(0.3);
> 

I had forgotten that.


Post a reply to this message

From: David H  Burns
Subject: Re: Scale Postfixes
Date: 5 Aug 2009 10:30:36
Message: <4a79978c$1@news.povray.org>
clipka wrote:
> Chambers schrieb:
>> David H. Burns wrote:
>>> "Rad" and "deg" for angles and rotation *would* be useful.
>>
>> They're already implemented.
>>
>> // Declares the variable rad to be 45 degrees converted into radians.
>> #declare rad = radians(45);
>>
>> // Declares the variable deg to be 0.3 radians converted into degrees.
>> #declare deg = degrees(0.3);
>>
> They're perfectly counter-intuitive for use in "rotate" though:
> 
>    // trying to express that I intend to rotate by 45 degrees,
>    // with the effect of rotating by 45 radians instead
>    rotate x * degrees(45)
> 
>    // trying to express that I intend to rotate by 0.3 radians,
>    // with the effect of rotating by something particularly useless
>    rotate y * radians(0.3)
True too. "Built in" unit definitions would be useful, maybe with a 
default that could
be set as in calculators?


Post a reply to this message

From: Warp
Subject: Re: Scale Postfixes
Date: 6 Aug 2009 12:49:11
Message: <4a7b0986@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> They're perfectly counter-intuitive for use in "rotate" though:

>     // trying to express that I intend to rotate by 45 degrees,
>     // with the effect of rotating by 45 radians instead
>     rotate x * degrees(45)

>     // trying to express that I intend to rotate by 0.3 radians,
>     // with the effect of rotating by something particularly useless
>     rotate y * radians(0.3)

#declare deg = 1;
#declare rad = radians(1);

rotate x * 45*deg
rotate y * 0.3*rad

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Scale Postfixes
Date: 6 Aug 2009 13:14:15
Message: <4a7b0f67$1@news.povray.org>
Warp schrieb:
> clipka <ano### [at] anonymousorg> wrote:
>> They're perfectly counter-intuitive for use in "rotate" though:
> 
>>     // trying to express that I intend to rotate by 45 degrees,
>>     // with the effect of rotating by 45 radians instead
>>     rotate x * degrees(45)
> 
>>     // trying to express that I intend to rotate by 0.3 radians,
>>     // with the effect of rotating by something particularly useless
>>     rotate y * radians(0.3)
> 
> #declare deg = 1;
> #declare rad = radians(1);
> 
> rotate x * 45*deg
> rotate y * 0.3*rad

#declare Foo = sin(45*deg);
#declare Bar = cos(0.3*rad);

FAIL.

Which is to say: POV-Ray's current system for representing angles is 
inconsistent, and a genuine built-in mechanism for specifying values as 
either degree or radians would be helpful to mend this.

Note that this isn't about "how powerful is the language", but "how easy 
is it to learn and use". Otherwise, we could simply refer to the 
Turing-completeness of the language and be done with it.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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