Skip to content

[geometry-1] TYPO? 2.1(6) should be pre-multiply ,not post-multiply. #294

Closed

Description

@fuchsia

Step 6 of Section 2.1 Transforming a point with a matrix, says

Set pointVector to pointVector post-multiplied by matrix.

pointVector was defined as a column vector in the previous step. And the definition of post-multiply is:

Term A post-multiplied by term B is equal to A · B.

So that's pointVector · matrix; i.e. columnVector · matrix

That's not mathematically possible. Matrix multiplication produces a new matrix whose elements are the inner products of the left-hand matrix's rows with the right-hand's columns; so for C = A · B

A 4-element column vector multiplied by a 4x4 matrix means calculating the dot product of a 1-element row with a 4-element column. There's no way to do it.

The text should say

Set pointVector to pointVector pre-multiplied by matrix.

or

Set pointVector to matrix post-multiplied by pointVector.

or it should construct pointVector as a row vector and post-multiply by the transpose of the matrix.

I've read and re-read the spec, and I can't see I've got this wrong this time. But I've not done a PR in case my eyes have swizzled the words again.

Activity

  1. dirkschulze commented on Dec 12, 2018

    @dirkschulze
    Contributor

    @fuchsia That seems to be an issue, yes.

  2. bzbarsky commented on Jul 23, 2019

    @bzbarsky

    So what happens in browsers seems to be matrix * columnVector, as far as I can tell.

  3. kdashg commented on Feb 17, 2021

    @kdashg
    Contributor

    Yes that's what happens: https://jsfiddle.net/zpw1kxjb/4/

  4. kdashg commented on Feb 17, 2021

    @kdashg
    Contributor

    I just ran into this because without this clarification, transformPoint isn't a usable API. (that is, I can't look up the spec and see what's supposed to happen)
    I'll put up a PR.

  5. added a commit that references this issue on Feb 17, 2021
    e07beef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions