Comments (8)
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.
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.
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.
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.
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.
Transform3D is my favorite option at the moment. I don't think there is value in being more technical.
from euclid.
I also (independently) came to a conclusion (in #159 (comment)) that Transform3D
is the way, together with Point/Vector separation.
from euclid.
@nical @kvark @pcwalton @glennw Let's do this before the quarter finishes.
from euclid.
Related Issues (20)
- (breaking change) self vs &self and non-copy scalars HOT 5
- Fails to compile with --no-default-features HOT 2
- Vector missing the Sum trait HOT 3
- Support for numeric casts through `az` crate HOT 2
- Constructors: splat, one HOT 3
- Component-wise multiplication for Vector2 HOT 2
- Component-wise division for Vector2 HOT 2
- Support for bytemuck Pod and Zeroable HOT 2
- Distinguish between orientation and rotation.
- missing `AddAssign` impl for `SideOffsets2D` HOT 1
- Add tags for releases on crates.io HOT 1
- Implement more `num-traits` (e.g. checked arithmetic) HOT 2
- Poor accuracy in Vector2D::angle_from_x_axis HOT 1
- Scale `mod`, `div` by scalar HOT 3
- Unresolved Import `num_traits::Euclid` HOT 3
- Box inclusive contains HOT 7
- Point2D/Point3D missing Add<Point2D<T, U>> impl HOT 1
- Add splat function for SideOffsets2D HOT 1
- The `from_points` for `Box2D` and `Box3D` does not work quite as advertised. HOT 2
- Documentation of Transform2D does not reflect the actual calculation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from euclid.