Matlab: 3D Coordinate System Rotations with Vectors
This post describes how to switch/transform between corrdinate systems in Matlab and how this can be represented. There are 3 functions that are crucial here:
- grid3D(startVec, stopVec, varargin) ... Creates an orthogonal grid in 3D depending on start and end point (diagonal of a cube) and draws ticks, labels and MinorGrids.
Rotations can be performed here to show how to transform between Cartesian corrdinate systems. - point3D(startVec, stopVec, varargin) ... Is a function to create 3D vectors based on start and end points. It includes options like naming the points, displaying them as arrows, as well as settings for color and thickness.
- arrow3D(startVec, stopVec, varargin) ... This function creates an arrow in 3D that can be scaled by the options.
The functions including example can be downloaded here:
Matlab-Functions/CartesianCorrdinateTransformation at main · PhysIngo/Matlab-Functions (github.com)
First of all an example where the 1 coordinate system with 2 vectors is rotated 2 times in space:
Kommentare
Kommentar veröffentlichen