Comments (4)
Can you share some code that shows the error behavior?
from mathnet-spatial.
Here is the test. The matrices are the same, although the CSY was rotated twice around the Y axis.
`CoordinateSystem testCSY = new CoordinateSystem(new Point3D(400, 500, 600), new UnitVector3D(1, 0, 0), new UnitVector3D(0, 1, 0), new UnitVector3D(0, 0, 1));
Angle alpha = new Angle(90, new Degrees());
//Rotates around Y
testCSY = CoordinateSystem.Pitch(alpha);
Matrix rotMatrix1st = CoordinateSystem.GetRotationSubMatrix(testCSY);
//Rotates around Y again
testCSY = CoordinateSystem.Pitch(alpha);
Matrix rotMatrix2nd = CoordinateSystem.GetRotationSubMatrix(testCSY);
bool eq = false;
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
eq = rotMatrix1st.Storage.At(i, j) == rotMatrix2nd.Storage.At(i, j);
Assert.IsTrue(eq, "Matrices are equal");`
from mathnet-spatial.
@zorandragan
Not sure if I entirely understand your intention but I think you are using it wrong (at least from how the API is designed now). Pitch is a static method which returns a new immutable coordinate system each time. So in order to Pitch it 2 times alpha you would want to do CoordinateSystem.Pitch(alpha * 2) for the second coordinatesystem. If you want multiple rotations (yaw, pitch roll) you can use CoordinateSystem.Rotation(yaw, pitch, roll).
from mathnet-spatial.
@ErikWahlstrom
I see now that I was using it wrong. I need a CSY that can have a "state", but for that I guess I would need to create my own wrapper class. Thanks very much for the support.
from mathnet-spatial.
Related Issues (20)
- Plane created from three points returns different result for Equals depending on the order of the points HOT 5
- Readme's Docs link broken
- LineSegment3D.TryShortestLineTo throws when segments intersect HOT 1
- Circle2D.FromPoints gives incorrect results for special cases.
- LineSegment2D - TryIntersect - should this return the intersection of lines or line segments? HOT 3
- Rotation(yaw, pitch, roll) uses extrinsic rotations
- Support for Matrix4D HOT 1
- Suggestion: Plane.TryFromPoints() HOT 3
- Checking for equal input points in Plane.FromPoints() is redundant? HOT 2
- I would like to contribute to the project HOT 5
- Website copyright date is not current
- Vector2D.SignedAngleTo returns bad angle result (fix described)
- Cross product error checks are different depending on whether you pass it a UnitVector3D or a Vector3D HOT 3
- CoordinateSystem: System.TypeInitializationException HOT 1
- Question: still active?
- The API on the official website is down
- Version 0.7.0 not available on Nuget HOT 7
- Why let the X, Y, Z readonly? HOT 2
- MathNet.Spatial.Euclidean.Line3D retruns UnExpected NULL HOT 5
- Get X and Y values for Point2D? HOT 8
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 mathnet-spatial.