|
|
"Samuel B." <stb### [at] hotmailcom> wrote:
> "Mike Miller" <mil### [at] gmailcom> wrote:
> > "Samuel B." <stb### [at] hotmailcom> wrote:
> > > "Samuel B." <stb### [at] hotmailcom> wrote:
> > > > You know, I think the solution might be quite easy since those values seem to
be
> > > > angles in radians. Try converting the last three values to degrees like so:
> > > >
> > > > #declare Rotation = rota...
> > >
> > > Oops, that should read as:
> > > #declare Rotation = <0.707107, 0.707107, 3.141593> / pi * 180;
> >
> > Thanks, I'll give that a shot. [...]
>
> Don't bother... it looks like was wrong. Check out this page:
> https://edutechwiki.unige.ch/en/X3D_grouping_and_transforms
>
> Here's the relevant bit:
>
> "3.2 Rotations
>
> Rotations are more difficult to understand, since it is possible to define any
> arbitrary rotation axis.
>
> rotation = 'x y z angle'
> x y z defines the rotation axis, angle is the amount of roation in radians
> (i.e. 180 degrees = Pi)"
>
> So, the first three numbers are the axis of rotation, and the fourth is the
> amount of rotation in radians. The docs go on to give some tips but, if I'm not
> mistaken, I think you can just plug the numbers directly into the
> Axis_Rotate_Trans() macro in transforms.inc, making sure to do a radian->degree
> conversion for the 4th value.
>
> Sam
>> Axis_Rotate_Trans() macro in transforms.inc, making sure to do a radian->degree
conversion for the 4th value.
I'll give that a try...thanks so much!
Mike.
Post a reply to this message
|
|