Index Page
cspice_wnunid
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_WNUNID places the union of two double precision 
   windows into a third  window.

   For important details concerning this module's function, please refer to
   the CSPICE routine wnunid_c.

I/O

   
   Given:

      a,
      b   scalar, double precision windows, each of 
          which contains zero or more intervals. 

          The user must create 'a' and 'b' using 
          cspice_celld.

   the call:

      cspice_wnunid, a, b, c

   returns:

     c   the scalar, double precision output window, containing 
         the union of 'a' and 'b'---every point contained 
         in 'a', or in 'b', or in both.
     
         The user must create 'c' using cspice_celld.

         'c' must be distinct from 'a' and 'b'. 

Examples


   Any 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.

      ;; 
      ;; Create two cells each containing a double precision
      ;; 8-vector.
      ;;
      win1 = cspice_celld( 8 )
      win2 = cspice_celld( 8 )
      win3 = cspice_celld( 8 )

      ;;
      ;; Define two windows with three intervals.
      ;;
      darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ]

      ;;
      ;; Add the window data to the cell.
      ;;
      for i=0, 2 do begin

         cspice_wninsd, darray[0,i], darray[1,i], win1

     endfor

      darray2 = [ [ 2.d, 6.0], [ 8.0, 10.0], [16.0, 18.0] ]

      ;;
      ;; Add the window data to the cell.
      ;;
      for i=0, 2 do begin

         cspice_wninsd, darray2[0,i], darray2[1,i], win2

     endfor

      ;;
      ;; Do the union. 
      ;;
      cspice_wnunid, win1, win2, win3
       
      ;;
      ;; Calculate the number of intervals in the
      ;; return window 'win1'.
      ;;
      no_intervals = cspice_wncard(win3)

      ;;
      ;; Output the intervals.
      ;;
      for i= 0, (no_intervals -1 ) do begin

         cspice_wnfetd, win3, i, left, right
         print, left, right

     endfor

   IDL outputs:

      1.0000000       6.0000000
      7.0000000       11.000000
      16.000000       18.000000
      23.000000       27.000000

Particulars


   The user must create any needed window structures with
   cspice_celld prior to use regardless of whether the routine
   uses the window as input or returns it as output.

Required Reading


   ICY.REQ
   CELLS.REQ
   WINDOWS.REQ

Version


   -Icy Version 1.0.2, 26-NOV-2007, EDW (JPL)

      Implemented use of cspice_wncard function to return 
      window cardinality.

   -Icy Version 1.0.1, 12-SEP-2006, EDW (JPL)

      Correct Required Reading citation CELL.REQ to CELLS.REQ.

   -Icy Version 1.0.0, 08-AUG-2004, EDW (JPL)

Index_Entries

 
   union two d.p. windows 
 



Wed Apr  5 17:58:05 2017