all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Richard Copley <rcopley@gmail.com>
Cc: Alp Aker <alptekin.aker@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
	Alan Third <alan@idiocy.org>,
	Emacs Development <emacs-devel@gnu.org>
Subject: Re: Image transformations
Date: Fri, 14 Jun 2019 20:45:37 +0900	[thread overview]
Message-ID: <wlwohotmou.wl-mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <CAPM58ojmB8ZREQARGqqdechs9pbtJDwkYXo=cPQH5T6vqgjDRQ@mail.gmail.com>

On Fri, 14 Jun 2019 19:55:49 +0900,
Richard Copley wrote:
> 
> On Fri, 14 Jun 2019 at 11:45, Alp Aker <alptekin.aker@gmail.com> wrote:
> 
> > On Thu, Jun 13, 2019 at 3:01 PM Richard Copley <rcopley@gmail.com> wrote:
> >
> > >     Yes, but our transformation includes translation, rotation, and
> > >     another translation.  Not just one translation.  IOW, it isn't the
> > >     transformation matrix that is given; it's the operation on the image.
> >
> > There's a miscommunication here.  I was speaking to Alan's question about
> > how
> > to geometrically interpret the components of a transformation matrix.
> >
> > If the question is what translations to use in order to generate a rotation
> > around an arbitrary point p, then there's no question: the sequence of
> > operations is translation by -p, then rotation, then translation by p.
> >
> > > The origin is at the top left so a pure rotation clockwise about the
> > origin
> > > through angle a goes like this:
> > >
> > > [cos(a)  -sin(a)  0] [X]   [cos(a) * X - sin(a) * Y]
> > > [sin(a)   cos(a)  0] [Y] = [sin(a) * X + cos(a) * Y]
> > > [     0        0  1] [1]   [                      1]
> >
> > That is a counter-clockwise rotation.
> >
> 
> Are you sure?
> This matrix takes (1, 0) to (cos(a), sin(a)), which is roughly (1, a) for
> small a.
> I think that's clockwise, if a is positive. (Remember the y axis points
> down.)

Other than the direction of the Y axis, there are several sources of
confusion:

1. Some people (mathematicians?) prefer operating on column vectors
   with matrix multiplication from left, others (computer graphics
   people?) prefer operating on row vectors with matrix multiplication
   from right.  Conversion between them involves transposition.

2. At least on cairo, there are "current transformation matrix", which
   is from user space to device space, and "pattern's transformation
   matrix" which is from user space to pattern space.  Here's a quote
   from the document of cairo_pattern_set_matrix telling caveats about
   the latter one:

     Important: Please note that the direction of this transformation
     matrix is from user space to pattern space. This means that if
     you imagine the flow from a pattern to user space (and on to
     device space), then coordinates in that flow will be transformed
     by the inverse of the pattern matrix.

   The matrix constructed in image.c is of the latter type, which is
   more-or-less directly usable on XRender and cairo.  But NS only has
   the former type of transformations.  That's why the NS code
   involves matrix inversion (not transposition).

One must clarify the context then talking about transformation matrices.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp



  reply	other threads:[~2019-06-14 11:45 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11  5:10 Image transformations Eli Zaretskii
2019-06-11 20:02 ` Alan Third
2019-06-12 15:30   ` Eli Zaretskii
2019-06-12 22:07     ` Alan Third
2019-06-12 22:15       ` Alan Third
2019-06-13  4:16       ` Alp Aker
2019-06-13  5:41         ` Eli Zaretskii
2019-06-13  9:19           ` Alp Aker
2019-06-13 13:05             ` Eli Zaretskii
2019-06-13 15:57               ` Alp Aker
2019-06-13 16:20                 ` Eli Zaretskii
2019-06-13 19:00                   ` Richard Copley
2019-06-13 19:29                     ` Eli Zaretskii
2019-06-14 10:45                     ` Alp Aker
2019-06-14 10:55                       ` Richard Copley
2019-06-14 11:45                         ` YAMAMOTO Mitsuharu [this message]
2019-06-14 11:59                         ` Alp Aker
2019-06-13 16:12           ` Alan Third
2019-06-13 17:05             ` Eli Zaretskii
2019-06-13 19:35               ` Richard Copley
2019-06-13  5:48       ` Eli Zaretskii
2019-06-13 16:58         ` Alan Third
2019-06-13 17:11           ` Eli Zaretskii
2019-06-13 19:27             ` Alan Third
2019-06-13 19:39               ` Alan Third
2019-06-13 19:47               ` Eli Zaretskii
2019-06-13 22:26                 ` Alan Third
2019-06-14  7:05                   ` Eli Zaretskii
2019-06-14  9:57                     ` Stefan Monnier
2019-06-14 10:57                       ` Eli Zaretskii
2019-06-14 11:21                         ` Richard Copley
2019-06-14 12:06                           ` Eli Zaretskii
2019-06-14 12:49                             ` Richard Copley
2019-06-14 14:16                               ` Yuri Khan
2019-06-14 14:43                               ` Eli Zaretskii
2019-06-14 15:55                                 ` Richard Copley
2019-06-15 11:00                                   ` Alan Third
2019-06-15 11:34                                     ` Eli Zaretskii
2019-06-15 10:42                     ` Alan Third
2019-06-15 11:31                       ` Eli Zaretskii
2019-06-16 15:22                         ` Alan Third
2019-06-16 16:34                           ` Eli Zaretskii
2019-06-17 21:13                             ` Alan Third
2019-06-19 17:56                               ` Eli Zaretskii
2019-06-24 17:54                               ` Eli Zaretskii
2019-06-24 19:50                                 ` Stefan Monnier
2019-06-25  2:33                                   ` Eli Zaretskii
2019-06-25  3:28                                     ` Stefan Monnier
2019-06-25  4:34                                       ` Eli Zaretskii
2019-06-25 14:43                                         ` Stefan Monnier
2019-06-25 15:35                                           ` Eli Zaretskii
2019-06-26  0:28                                             ` YAMAMOTO Mitsuharu
2019-06-26 15:34                                               ` Eli Zaretskii
2019-06-27  3:37                                                 ` YAMAMOTO Mitsuharu
2019-06-27 13:13                                                   ` Eli Zaretskii
2019-06-25 18:33                                 ` Alan Third
2019-06-25 18:57                                   ` Eli Zaretskii
2019-06-27 13:59                                     ` Eli Zaretskii
2019-06-28 18:36                                       ` Alan Third
2019-06-28 19:50                                         ` Eli Zaretskii
2019-06-29 11:55                                           ` Eli Zaretskii
2019-06-29 19:51                                             ` Alan Third
2019-06-29 19:49                                           ` Alan Third
2019-06-29 19:53                                             ` Lars Ingebrigtsen
2019-06-30 14:38                                               ` Alan Third
2019-06-30 15:24                                                 ` Lars Ingebrigtsen
2019-07-25 19:40                                                   ` Lars Ingebrigtsen
2019-07-26  6:10                                                     ` Eli Zaretskii
2019-07-26  6:46                                                       ` Lars Ingebrigtsen
2019-07-26  8:06                                                         ` Eli Zaretskii
2019-07-26  8:23                                                           ` Lars Ingebrigtsen
2019-07-26  8:24                                                             ` Lars Ingebrigtsen
2019-07-26  8:33                                                               ` Eli Zaretskii
2019-07-26  8:58                                                                 ` Lars Ingebrigtsen
2019-07-26  9:13                                                                   ` Eli Zaretskii
2019-07-26 10:23                                                                     ` Lars Ingebrigtsen
2019-07-26 14:08                                                                   ` Stefan Monnier
2019-07-26  8:32                                                             ` Eli Zaretskii
2019-06-29 21:05                                             ` Stefan Monnier
2019-06-30 15:12                                             ` Eli Zaretskii
2019-06-30 19:10                                               ` Alan Third
2019-07-01 14:55                                                 ` Eli Zaretskii
2019-06-18 11:01                       ` Tak Kunihiro
2019-06-13 17:41           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlwohotmou.wl-mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=alan@idiocy.org \
    --cc=alptekin.aker@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rcopley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.