|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> Changing the rotate command to take radians would make povray consistent.
...but less intuitive for those with poor math backgrounds.
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote:
> Warp wrote:
>
> > Changing the rotate command to take radians would make povray consistent.
>
> ...but less intuitive for those with poor math backgrounds.
... and let's not forget the rewriting of the couple of old scenes that used the
rotate command, silly them, they should have known better ;-)
G.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 04 Jun 2000 19:04:29 -0400, John VanSickle
<van### [at] erolscom> wrote:
>Xplo Eristotle wrote:
>>
>> I don't WANT to rotate an object by 1/6th pi. I don't *NEED* to rotate
>> an object by 1/6th pi.
>
>Me neither. I always do it this way:
>
> matrix <1,0,0, 0,sqrt(.75),.5, 0,-.5,sqrt(.75), 0,0,0>
Yes but there can be only One who can control the Matrix so your point
has not been taken into account :))
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Peter J. Holzer" wrote:
>
> On Sun, 04 Jun 2000 02:43:37 +0100, Thorsten Froehlich wrote:
> >The trigonometric functions use radians which is clearly stated in the
> >documentation.
>
> A short history question: Was there a reason for using degrees with
> rotate and radians with the trigonometric functions, or did just happen
> that way?
While radians are a matter of trigonometry, degrees are more logical
when dealing with geometry.
Fabien.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
// From my own macros
// (not made public because they are either very simple or quite esoteric)
// (but I post them whenever someone might need them)
// Povingly,
// Philippe Debar
// Tired of degrees/radians conversions? try these!
#macro sind(A)
(sin(radians(A)))
#end
#macro cosd(A)
(cos(radians(A)))
#end
#macro tand(A)
(tan(radians(A)))
#end
#macro asind(A)
(degrees(asin(A)))
#end
#macro acosd(A)
(degrees(acos(A)))
#end
#macro atan2d(A,B)
(degrees(atan2(A,B)))
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Philippe Debar" wrote:
> // Tired of degrees/radians conversions? try these!
Nice and simple!
As an addition I just made the ones below.
They're not tested, but they should work.
#macro rotater(A)
rotate <degrees(A.x),degrees(A.y),degrees(A.z)>
#end
#macro vrotater(A,B)
vrotate(A,<degrees(B.x),degrees(B.y),degrees(B.z)>)
#end
#macro vaxis_rotater(A,B,C)
vaxis_rotate(A,B,degrees(C))
#end
Greetings,
Rune
---
Updated April 25: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
>
> #macro rotater(A)
> rotate <degrees(A.x),degrees(A.y),degrees(A.z)>
> #end
>
I usually add explicit vector promotion to such macros:
#macro rotater(A)
#local An = A + <0,0,0>;
rotate <degrees(An.x),degrees(An.y),degrees(An.z)>
#end
This is so you can use a float parameter like in regular rotate.
--
Margus Ramst
Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <slr### [at] tealhhjpat>,
hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:
> >(In the spirit of offering a solution, how about a "trig_units" keyword
> >in the global_settings, where a user could specify "degrees" or
> >"radians"?)
>
> Not good. That would break existing include files. A pragma which
> affects only the source file it is in, but not any included files might
> be safer, but I'm not too sure about that. The only way I can see which
> wouldn't break compatibility would be a second set of functions (e.g.,
> dsin, dcos, ...) which uses degrees instead of radians.
It should be pretty easy to implement an "#angle_unit" keyword that
behaves like #version, you could get the current unit and save it,
switch to your preferred unit inside your include file, and switch back
without the user of the include knowing about it. Or you could use one
unit in some places and another in others, depending on what you are
doing. It could support degrees, radians, and whatever else you want, as
well as a "standard" setting(degrees for rotate, radians for trig).
Most calculators allow you to do this, why not POV?
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 23 Jun 2000 13:23:38 -0500, Chris Huff wrote:
>It should be pretty easy to implement an "#angle_unit" keyword that
>behaves like #version, you could get the current unit and save it,
>switch to your preferred unit inside your include file, and switch back
>without the user of the include knowing about it. Or you could use one
>unit in some places and another in others, depending on what you are
>doing. It could support degrees, radians, and whatever else you want, as
>well as a "standard" setting(degrees for rotate, radians for trig).
>
>Most calculators allow you to do this, why not POV?
Because we've heard of "locality of reference?" Specifically, if I see
you taking the sine of an angle, how do I know which units you're in
without reading the whole file up to that point? Better to use macros
that make your intention clear.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <slr### [at] linuxparkerrfwicom>,
ron### [at] povrayorg wrote:
> Because we've heard of "locality of reference?" Specifically, if I see
> you taking the sine of an angle, how do I know which units you're in
> without reading the whole file up to that point? Better to use macros
> that make your intention clear.
True...it might make writing the files slightly easier, but it
definitely wouldn't be of any help in reading them.
Macros or functions with different names would be the best solution.
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|