cspice_inrypl |
|||

## AbstractCSPICE_INRYPL finds the intersection of a ray and a plane. ## I/OGiven: vertex the position of a ray vertex. [3,1] = size(normal); double = class(normal) dir the direction of a ray from 'vertex'. [3,1] = size(normal); double = class(normal) plane a structure describing a SPICE plane. [1,1] = size(plane); struct = class(plane) The structure has the fields: normal: [3,1] = size(normal); double = class(normal) constant: [1,1] = size(constant); double = class(constant) the call: [ nxpts, xpt ] = ## ExamplesAny numerical results shown for this example may differ between platforms as the results depend on the SPICE kernels used as input and the machine specific arithmetic implementation. Use the meta-kernel shown below to load the required SPICE kernels. KPL/MK This meta-kernel is intended to support operation of SPICE example programs. The kernels shown here should not be assumed to contain adequate or correct versions of data required by SPICE-based user applications. In order for an application to use this meta-kernel, the kernels referenced here must be present in the user's current working directory. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents --------- -------- de421.bsp Planetary ephemeris pck00009.tpc Planet orientation and radii naif0009.tls Leapseconds \begindata KERNELS_TO_LOAD = ( '/kernels/gen/lsk/naif0009.tls' '/kernels/gen/spk/de421.bsp' '/kernels/gen/pck/pck00009.tpc' ) \begintext % % Determine the intersection between the Saturn ring plane and % a look direction as seen from a position in the Saturn % body-fixed frame. For this extremely simplistic example, % we take the equatorial plane as the ring plane. % % % Load the standard kernel set. % cspice_furnsh( 'standard.tm' ) % % Retrieve the triaxial radii of Saturn (699) % radii = cspice_bodvrd( 'SATURN', 'RADII', 3 ); % % Define a position in the IAU_SATURN frame at three equatorial % radius out along the x axis, a half radius above the % equatorial plane. For this example, we'll assume 'vertex' % represents the light-time corrected position of a vehicle % to the Saturn ring plane. % vertex = [ 3.0 * radii(1), 0.0, radii(3) *.50 ]'; % % Define a look vector in the y-z plane from 'vertex'. % % 'vertex' % *______ y % /|\ % / | \ 30 degrees % / | \ % x -z 'dir' % dir = [ 0., cos( 30. *cspice_rpd() ), -sin( 30. *cspice_rpd() ) ]; % % Define the equatorial plane as a SPICE plane. The Z % axis is normal to the plane, the origin lies in the % plane. % normal = [ 0., 0., 1.]'; point = [ 0., 0., 0.]'; plane = cspice_nvp2pl( normal, point ); % % Determine the intersection point of 'dir' and 'plane', if % such an intersection exists. % [ nxpts, xpt ] = ## ParticularsThe intersection of a ray and plane in three-dimensional space can be a the empty set, a single point, or the ray itself. ## Required ReadingFor important details concerning this module's function, please refer to the CSPICE routine inrypl_c. MICE.REQ PLANES.REQ ## Version-Mice Version 1.0.0, 27-AUG-2012, EDW (JPL) ## Index_Entriesintersection of ray and plane |

Wed Apr 5 18:00:33 2017