![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TheMightyZog <Chr### [at] hotpop com> wrote:
> Thank you Marc, but I tried that the following
> rotate<atan(1/2),0,0>
> should be the same as
> rotate<30,0,0>
It shouldn't because atan() returns radians while rotate takes degrees.
Besides, you should really use atan2().
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Trevor G Quayle schrieb:
>
> Better to use atan2(a,o). Handles situation where o is zero.
> Also note the results of these is in radians to convert to degrees use
> degrees(A) in POV (or A*180/pi by hand).
>
> -tgq
>
You are right with regrad to POV, I explained it more the mathematical
way ...
Marc
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks tgq, but
rotate<(degrees(atan2(1,2))),0,0>
is not exactly the same as
rotate<30,0,0>
- it is a little off as I suspect it is using the arc of a radian circle
instead of straight lines
"Trevor G Quayle" <Tin### [at] hotmail com> wrote in message
news:web.46703ec3f87630f4c150d4c10@news.povray.org...
> Marc Schimmler <mar### [at] web de> wrote:
> > TheMightyZog schrieb:
> > > I'm ashamed to have to ask this, but I just can not remember how to
> > > calculate an angle in degrees if I know the opposite and adjacent side
of a
> > > right-angled triangle.
> > >
> > > My only excuse is that I'm an OAP and school was just years ago and
then
> > > radians were not taught!
> > >
> > > Help!
> > >
> > > Thanks
> > > Zog
> > >
> > >
> >
> > If it looks like this
> >
> > alpha
> > /|
> > h /=|
> > / | o
> > / .|
> > -----
> > a
> >
> > alpha = atan (a/o)
> > alpha = acot (o/a)
> > alpha = asin (a/h)
> >
> >
> > Is this what you wanted ... POVCODE?
> >
> > Marc
>
> Better to use atan2(a,o). Handles situation where o is zero.
> Also note the results of these is in radians to convert to degrees use
> degrees(A) in POV (or A*180/pi by hand).
>
> -tgq
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks Warp, but
rotate<(degrees(atan2(1,2))),0,0>
or
rotate<(atan2(1,2)),0,0>
is not the same as
rotate<30,0,0>
- 'tis a real puzzle!
"Warp" <war### [at] tag povray org> wrote in message
news:4670424a@news.povray.org...
> TheMightyZog <Chr### [at] hotpop com> wrote:
> > Thank you Marc, but I tried that the following
> > rotate<atan(1/2),0,0>
> > should be the same as
> > rotate<30,0,0>
>
> It shouldn't because atan() returns radians while rotate takes degrees.
>
> Besides, you should really use atan2().
>
> --
> - Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"TheMightyZog" <Chr### [at] HotPOP com> wrote:
> Thanks tgq, but
> rotate<(degrees(atan2(1,2))),0,0>
> is not exactly the same as
> rotate<30,0,0>
> - it is a little off as I suspect it is using the arc of a radian circle
> instead of straight lines
Of course this isn't the same. the arctan of 1/2 is ~28.6 degrees not 30.
I.e., the tan of 30 is not 1/2, it's 0.577, you are thinking of sin(30)
which is O/H not O/A:
rotate<(degrees(asin(1/2))),0,0> = rotate<30,0,0>
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TheMightyZog <Chr### [at] hotpop com> wrote:
> - it is a little off as I suspect it is using the arc of a radian circle
> instead of straight lines
What does that even mean?
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TheMightyZog wrote:
> Thanks Warp, but
> rotate<(degrees(atan2(1,2))),0,0>
> or
> rotate<(atan2(1,2)),0,0>
> is not the same as
> rotate<30,0,0>
>
> - 'tis a real puzzle!
>
the tangent of 30 degrees is NOT 1/2
degrees(atan2(1,2))= 26.56 degrees
degrees(atan2(sqrt(3),1))= 30 degrees
*
* *
sqrt(3) *30 * 2
* *
*90 60*
**********
1
sin(30)=1/2 cos(60)=1/2
cos(30)=sqrt(3)/2 sin(60)=sqrt(3)/2
tan(30)=1/sqrt(3) tan(60)=sqrt(3)/1
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Apologies for the trouble you have all been put through by my 'senior
moment'
I see the silly mistake now
And thank you Alan and Tim for your alternative suggestions
Zog
"Leroy" <lrw### [at] joplin com> wrote in message
news:467### [at] joplin com...
> TheMightyZog wrote:
> > Thanks Warp, but
> > rotate<(degrees(atan2(1,2))),0,0>
> > or
> > rotate<(atan2(1,2)),0,0>
> > is not the same as
> > rotate<30,0,0>
> >
> > - 'tis a real puzzle!
> >
> the tangent of 30 degrees is NOT 1/2
> degrees(atan2(1,2))= 26.56 degrees
> degrees(atan2(sqrt(3),1))= 30 degrees
> *
> * *
> sqrt(3) *30 * 2
> * *
> *90 60*
> **********
> 1
> sin(30)=1/2 cos(60)=1/2
> cos(30)=sqrt(3)/2 sin(60)=sqrt(3)/2
> tan(30)=1/sqrt(3) tan(60)=sqrt(3)/1
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"TheMightyZog" <Chr### [at] HotPOP com> wrote:
> Apologies for the trouble you have all been put through by my 'senior
> moment'
> I see the silly mistake now
> And thank you Alan and Tim for your alternative suggestions
> Zog
>
triangle to remind me. That might be one of the reasons I use a modeler.
Stephen
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
news:web.46703502695d64ebff6e04e90@news.povray.org...
> I'm ashamed to have to ask this, but I just can not remember how to
> calculate an angle in degrees if I know the opposite and adjacent side of
a
> right-angled triangle.
>
> My only excuse is that I'm an OAP and school was just years ago and then
> radians were not taught!
>
> Help!
>
> Thanks
> Zog
>
>
degrees(atan2(A,B))
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |