Computes the area projected perpendicularly to a given direction
CL_stela_area(desc, "tumb", nbp [, opts]) CL_stela_area(desc, "spin", direction, axis, nbp [, opts]) CL_stela_area(desc, "fix", direction [, opts]) CL_stela_area(desc, "fixr", direction, rotdesc [, opts])
CL_stela_area computes the projected area of an object perpendicularly to a given direction.
Three modes are possible: "tumb" (tumbling mode), "spin" (spinning mode) and "fix" (fixed direction). In "fixed" mode, additional rotations of one or more sub-parts can be defined via the rotdesc input parameter
The rotdesc input parameter allowing the definition of rotations of sub-parts rotations is a list of structures, each structure containing the following fields:
- id: (string) Name of sub-part.
- axis: Rotation axis in object's frame. (3xN or 3x1)
- ang: Rotation angle (rad). (1xN or 3x1)
- rcen: (optional) Rotation center in sub-part's frame. (origin of frame = reference position of sub-part). Default = [0;0;0]. (3xN or 3x1)
The opt structure contains the (optional) following fields:
- resol: (integer, optional) Resolution (total number of "pixels"). Default is 10000. (1x1)
- savePrefix: (string, optional) Begining of path of saved XML files. Default is "" (no file saved). (1x1)
(string or struct) Path of XML file or object description in Scilab form.
Projection direction in object frame. (3xN or 3x1)
(integer) Number of projection planes for tumbling or spinning modes. (1x1)
Rotation axis (for spinning mode). (3xN or 3x1)
(list) List of structures describing rotations of sub-parts.
(struct) Option structure.
CNES - DCT/SB
// XML description desc = fullfile(CLx_setting_get("STELA_ROOT"), "examples/example_shap.xml"); opts = struct("resol", 10000); // Example 1 (no rotations of sub-parts) alpha = linspace(0, 2*%pi, 10); direction = [cos(alpha); zeros(alpha); sin(alpha)]; area = CL_stela_area(desc, "fix", direction, opts); // Example 2 (with rotations of sub-parts) alpha = linspace(0, 2*%pi, 10); direction = [0;0;1]; rotdesc = list(struct("id", "GS +Y1", "axis", [0;1;0], "ang", alpha)); area = CL_stela_area(desc, "fixr", direction, rotdesc, opts); // Example 3 (argument = object structure) alpha = linspace(0, 2*%pi, 10); direction = [cos(alpha); zeros(alpha); sin(alpha)]; obj = CL_stela_objLoad(desc); area = CL_stela_area(obj, "fix", direction, opts); |