Path: FormationFlying/Utility
% Compute the 4 points of a regular tetrahedron, the surface area and volume. The first point is at the origin by default. Setting centroid=1 will put the centroid of the first 3 points at the origin. Call with no outputs to see a picture in 3D. Since version 7. -------------------------------------------------------------------------- Usage: [p,a,v] = Tetrahedron( d, eul, centroid ) -------------------------------------------------------------------------- ------ Inputs ------ d (1) Length of each side [length] eul (1,3) Euler angles defining orientation centroid (1) Flag. If 1, puts the centroid of the first 3 points at the origin. Otherwise (default) the first point is at the origin. ------- Outputs ------- p (3,4) [x;y;z] coordinates of the four corners a (1) Surface area [length^2] v (1) Volume [length^3] --------------------------------------------------------------------------
Common: Quaternion/QForm Common: Transform/Eul2Q
Back to the FormationFlying Module page