Re: Rotations with Quaternions

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAL-8oAie+Hc3=-zVLy87nGADoe=c1sArK+vgJY29TA_BOgw-HA@mail.gmail.com>
That program is only doing orthographic projections. In effect this is a
focal length of infinity and the resulting projections are affine which
Cairo already supports. I think when people talk about 3D projections, they
expect perspective with vanishing points.

Although such a projection from an input plane to an output quad can be
represented by a 3x3 matrix, that does not provide enough information to do
a rotation. If the camera is perpendicular to a plane, you get the same
image if the plane is very close to the camera and it has a wide angle of
view, as if it is far from the camera and the angle of view is narrower,
and you get the same 3x3 matrix. However if you rotate the plane about the
vertical axis by some amount, the resulting image is different for the
close-up wide-angle plane than for the far-away narrow-angle plane (there
will be much more perspective for the close-up one). This shows that a 3x3
matrix does not have enough information to perform a 3d rotation.

On Mon, Jan 22, 2018 at 3:41 PM, <[email protected]> wrote:

>
> Hi Bill,
>
> I took a look at your drawings of the checker pattern. They can be drawn
> with 3d rotations using quaternions. The rotations use a cairo transform so
> the drawing doesn't change how fonts are drawn. Nothing is changed
> internally in Cairo.
>
> If you get a chance could you take a look at the following
>
> https://github.com/cecashon/OrderedSetVelociRaptor/blob/
> master/Misc/cairo_drawings/rotation2.c
>
> I have had some trouble getting the rotations to follow the "aircraft"
> spec but it is more a matter of how the axis are labelled for that. The
> drawing has a few squares that are rotated and their perspective changes
> along with the rotation. Similar to your checker board drawings.
>
> Appreciate any comments.
>
> Eric
>
>

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.