Git Product home page Git Product logo

Comments (8)

metajack avatar metajack commented on May 30, 2024

Why don't we name it Matrix4 and Matrix3 and drop the D entirely?

On Friday, August 19, 2016, Nicolas Silva [email protected] wrote:

Matrix4D is a 4 by 4 matrix for 3D transformations.
The "4D" in the name apparently comes from the 4 by 4 matrix layout, but
besides that Matrix2D is a 2 by 3 matrix for 2D transformations.

In the pull request #151 #151 I
am removing Point4D, leaving us with Matrix4D as the only 4D-labelled thing
in euclid.

I am proposing that we rename Matrix4D into Matrix3D, so that the name
reflects what type of operations we are doing, rather than the internal
layout of the matrix.

There are also suggestions such as:

  • AffineTransform3D (I am not a fan of this one)
  • Transform3D

Thoughts? This is really just about the name, not the implementation.
Since I am pushing a series of breaking changes, now is a good time to
bikeshed about aesthetics (I wouldn't want to go through all of servo just
to fix names).

cc @nox https://github.com/nox @peterjoel https://github.com/peterjoel


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#160, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABuxdyznn1rR5N-GqCfgZFngsulxUY-ks5qhZWFgaJpZM4JoZI6
.

from euclid.

nical avatar nical commented on May 30, 2024

Matrix3 would be the 2x3 matrix?
Would that mean Rename Point2D in Point2 (etc.) as well ?

I have a preference towards naming things after what they do (2d vs 3d transformations) rather than what they look like in memory, but if we decide to do the latter (which is also a sensible thing to do) I would prefer to make in unambiguous and consistent: Matrix2x3 (or is Matrix3x2), Matrix4x4, Point2, Vector2, Point3, Vector3, etc.

from euclid.

metajack avatar metajack commented on May 30, 2024

I was under the incorrect impression that Matrix2D was 3x3. My suggestion makes less sense with that info.

I think I'm fine with Matrix4D renamed to Matrix3D in that case.

Out of curiosity, why is Matrix2D a 3x2?

from euclid.

nical avatar nical commented on May 30, 2024

Matrix2D is 3x2 because a 2x2 matrices can not represent translations. It could be 3x3 but the extra components would not help expressing any transformation we care about (there's no perspective and other funky projections that make sense in 2D).

from euclid.

Manishearth avatar Manishearth commented on May 30, 2024

I like Transform3D better. Or Tensor3D if you want to get technical.

Matrix is the representation, and is 4D. It could have been represented in other ways too. But what it is is a 3D transform (technically, a rank-2 tensor in a 3d vector space), represented in some way.

from euclid.

nical avatar nical commented on May 30, 2024

Transform3D is my favorite option at the moment. I don't think there is value in being more technical.

from euclid.

kvark avatar kvark commented on May 30, 2024

I also (independently) came to a conclusion (in #159 (comment)) that Transform3D is the way, together with Point/Vector separation.

from euclid.

nox avatar nox commented on May 30, 2024

@nical @kvark @pcwalton @glennw Let's do this before the quarter finishes.

from euclid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.