pltexp_c |

Table of contents## Procedurepltexp_c ( Plate expander ) void pltexp_c ( ConstSpiceDouble iverts[3][3], SpiceDouble delta, SpiceDouble overts[3][3] ) ## AbstractExpand a triangular plate by a specified amount. The expanded plate is co-planar with, and has the same orientation as, the original. The centroids of the two plates coincide. ## Required_ReadingDSK ## KeywordsGEOMETRY MATH TOPOGRAPHY ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- iverts I Vertices of the plate to be expanded. delta I Fraction by which the plate is to be expanded. overts O Vertices of the expanded plate. ## Detailed_Inputiverts is an array containing three vertices of a triangular plate. Each vertex is a three-dimensional vector. The elements iverts[i][j], j = 0 ... 2 are, respectively, the X, Y, and Z components of the ith vertex. delta is a fraction by which the plate is to be scaled. Scaling is done so that the scaled plate has the following properties: - it is co-planar with the input plate - its centroid coincides with that of the input plate - its sides remain parallel to the corresponding sides of the input plate - the distance of each vertex from the centroid is (1+delta) times the corresponding distance for the input plate ## Detailed_Outputoverts is an array containing three vertices of the triangular plate resulting from scaling the input plate. If `ctroid' is the centroid (the average of the vertices) of the input plate, then the ith vertex of `overts' overts[i][j], j = 0 ... 2 is equal to ctroid[j] + (1+delta)*( iverts[i][j] - ctroid[j] ), j = 0 ... 2 ## ParametersNone. ## ExceptionsError free. ## FilesNone. ## ParticularsThis routine supports "greedy" ray-plate intercept algorithms. Such algorithms attempt to ensure that false negatives---in which an intersection is not found due to round-off error---do not occur. In such an algorithm, the plate of interest is expanded slightly before the intersection test is performed. ## ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input (if any), the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) Expand an equilateral triangle that lies in the plane { (x,y,z) : z = 7 } Use an expansion fraction of 1.0; this doubles the size of the plate. Example code begins here. /. Program pltexp_ex1 ./ #include <stdio.h> #include <math.h> #include "SpiceUsr.h" int main() { /. Local variables ./ SpiceDouble delta; SpiceDouble iverts[3][3]; SpiceDouble overts[3][3]; SpiceDouble s; s = sqrt( 3.0 ) / 2.0; vpack_c ( s, -0.5, 7.0, iverts[0] ); vpack_c ( 0.0, 1.0, 7.0, iverts[1] ); vpack_c ( -s, -0.5, 7.0, iverts[2] ); delta = 1.0; ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) ## Version-CSPICE Version 1.0.1, 13-JUL-2021 (JDR) Edited the header to comply with NAIF standard. Changed code example output format. -CSPICE Version 1.0.0, 29-FEB-2016 (NJB) ## Index_Entriesexpand triangular plate |

Fri Dec 31 18:41:10 2021