1369
Comment:

← Revision 16 as of 20160724 06:36:12 ⇥
10878

Deletions are marked like this.  Additions are marked like this. 
Line 2:  Line 2: 
Compiled by KD 

Line 7:  Line 5: 
The information listed here goes in more depth about SHAPE.TXT than that listed in [[SHAPEFILES]].  This text file is the shape model that SPC uses. '''SHAPE.TXT''' is output by [[densify]]. 
Line 9:  Line 7: 
SHAPE.TXT is an output from ...  The shape is in the ICQ format, which is basically a 6sided cube. Q size (resolution) values are between 8 and 512 in increments of factors of 2: 8, 16, 32, 64, 128, 256, 512. 
Line 11:  Line 9: 
SHAPE.TXT is the shape model SPC uses where the first line is the Q size (between 8 and 512 in factor of 2 increments: 8, 16, 32, 64, 128, 256, 512). The shape is in the ICQ format, which is basically a 6 sided cube.  [[densify]] generates this file, usually by taking an existing shape model, increasing the scale of the vertices by a factor of two and calculating the height of the average maplet the passes through that vector. The program [[dumber]] will downscale the shape model to a lower resolution. === ICQ Format Description === The global topography models (GTM) are presented here in an implicitly connected quadrilateral (ICQ) format. The vertices are labeled as though they were grid points on the faces of a cube {{{ 0  I  Q 0 . . . . . . . . .  . . . . . . . . .  . . . . . . . . .  . . . . . . . . . J . . . . F. . . . .  . . . . . . . . .  . . . . . . . . .  . . . . . . . . . Q . . . . . . . . . 
Line 13:  Line 32: 
First line is Q (resolution). This gives the number of nodes for i and j. Multiple it by 6 coordinate vector spaces to fill out the entire region. Note: Q*Q*6 is the total number of nodes, and line entries in this file. A Q of 512 is the largest that we represent. It contains 1.5 million vertices and 56 MB uncompressed.  }}} so that each of the six faces (F) contains (Q+1)^2 vertices v(I,J,F) (I=0,Q; J=0,Q) and Q^2 facets f(I,J,F) (I=0,Q1; J=0,Q1). 
Line 15:  Line 37: 
Second line and following: The location of a vertex in i, j, k space (Cartesian coordinates).  The facet f(I,J,F) implicitly has the vertices v(I,J,F), v(I,J+1,F), v(I+1,J+1,F), v(I+1,J,F). If the cube is unfolded, the six faces are arranged as {{{     1           5  4  3  2           6     }}} At each of the 12 edges of the cube, faces share common vertices so that, for example, the last row of face 1 has the same vertices as the first row of face 2. The common edge vertices are, with I=(0,Q), {{{ v(I,Q,6)=v(QI,Q,4) v(I,0,6)=v(I,Q,2) v(I,0,5)=v(Q,QI,1) v(I,0,4)=v(Qi,0,1) v(I,0,3)=v(0,I,1) v(I,0,2)=v(I,Q,1) v(q,I,6)=v(I,Q,5) v(q,I,5)=v(0,I,4) v(q,I,4)=v(0,I,3) v(q,I,3)=v(0,I,2) v(0,I,6)=v(QI,Q,3) v(0,I,5)=v(Q,I,2) }}} and the eight corners share vertices from three faces: {{{ v(0,0,1) = v(0,0,3) = v(Q,0,4) v(0,Q,1) = v(0,0,2) = v(Q,0,3) v(Q,0,1) = v(0,0,4) = v(Q,0,5) v(Q,Q,1) = v(0,0,5) = v(Q,0,2) v(0,0,6) = v(0,Q,2) = v(Q,Q,3) v(0,Q,6) = v(0,Q,3) = v(Q,Q,4) v(Q,0,6) = v(0,Q,5) = v(Q,Q,2) v(Q,Q,6) = v(0,Q,4) = v(Q,Q,5) 
Line 18:  Line 95: 
== Example of SHAPE.TXT == {{{ 
}}} Thus of the 6(Q+1)^2 labeled vertices, only 6Q^2+2 are independent. === File Structure === The file structure is quite simple. The first line contains the value of Q, and is followed by 6(Q+1)^2 lines containing the vertices. A piece of Fortran code for reading the file would look like: {{{ READ(10,*) Q DO F=1,6 DO J=0,Q DO I=0,Q READ(10,*) (V(K,I,J,F), K=1,3) ENDDO ENDDO ENDDO }}} Here the vertices are represented by threevectors. In some cases extra components are added representing albedo, color, surface gravity, or other surface characteristics. Since the labeling scheme implicitly contains the connectivity, no facet table is necessary. The quadrilateral facets in the model are not necessarily flat, since there is no guarantee that the four vertices are coplanar. The facet normals are defined by the cross product of their diagonals. This approximation presents no real difficulty because the spacings of the vertices are very small compared to the size of the body. The standard form (Q=512) has 1.57 million vertices. Although it is not necessary, it is convenient to take Q to be a power of 2. Because of this choice, it is easy to 'dumb down' a model by increasing the spacing by factors of 2. Vertices of the form v(2I,2J,F) are retained and the others discarded. Because of the quadrilateral facet structure, the models can also be 'densified' through bilinear interpolation. === Example === 
Line 22:  Line 142: 
Here is a sample '''SHAPE.TXT''' file:  
Line 23:  Line 144: 
{{{  
Line 38:  Line 160: 
}}}  
Line 39:  Line 162: 
}}}  === Q Value ===  Q  Vertices   4  151   8  487   16  1735   32  6534   64  25351   128  99846   256  396294   512  1579014  The output values are: '''Line 1'''  Q (resolution). This gives the number of nodes for i and j. Multiple Q by 6 coordinate vector spaces to fill out the entire region. . (!) Q*Q*6 is the total number of nodes, and line entries in this file. . (!) A Q of 512 is the largest that we represent. It contains 1.5 million vertices and is 56 MB uncompressed. '''Lines 2 and following'''  The location of a vertex in i, j, k space (Cartesian coordinates).  ''(Compiled by KD)'' === References === Gaskell, R.W., O. BarnouinJha, and D. Scheeres, Modeling Eros with Stereophotoclinometry, Abstract #1333, 38th LPSC, Houston, TX, 2007. [GASKELLETAL2007] Gaskell R.W., Landmark navigation and target characterization in a simulated Itokawa encounter, AAS paper 05289, AAS/AIAA Astrodynamics Specialists Conf., Lake Tahoe, CA, 2005. [GASKELL2005] CategoryFiles CategoryOutputFiles 
SHAPE.TXT
Description
This text file is the shape model that SPC uses. SHAPE.TXT is output by densify.
The shape is in the ICQ format, which is basically a 6sided cube. Q size (resolution) values are between 8 and 512 in increments of factors of 2: 8, 16, 32, 64, 128, 256, 512.
densify generates this file, usually by taking an existing shape model, increasing the scale of the vertices by a factor of two and calculating the height of the average maplet the passes through that vector. The program dumber will downscale the shape model to a lower resolution.
ICQ Format Description
The global topography models (GTM) are presented here in an implicitly connected quadrilateral (ICQ) format. The vertices are labeled as though they were grid points on the faces of a cube
0  I  Q 0 . . . . . . . . .  . . . . . . . . .  . . . . . . . . .  . . . . . . . . . J . . . . F. . . . .  . . . . . . . . .  . . . . . . . . .  . . . . . . . . . Q . . . . . . . . .
so that each of the six faces (F) contains (Q+1)^2 vertices v(I,J,F) (I=0,Q; J=0,Q) and Q^2 facets f(I,J,F) (I=0,Q1; J=0,Q1).
The facet f(I,J,F) implicitly has the vertices v(I,J,F), v(I,J+1,F), v(I+1,J+1,F), v(I+1,J,F).
If the cube is unfolded, the six faces are arranged as
    1           5  4  3  2           6    
At each of the 12 edges of the cube, faces share common vertices so that, for example, the last row of face 1 has the same vertices as the first row of face 2. The common edge vertices are, with I=(0,Q),
v(I,Q,6)=v(QI,Q,4) v(I,0,6)=v(I,Q,2) v(I,0,5)=v(Q,QI,1) v(I,0,4)=v(Qi,0,1) v(I,0,3)=v(0,I,1) v(I,0,2)=v(I,Q,1) v(q,I,6)=v(I,Q,5) v(q,I,5)=v(0,I,4) v(q,I,4)=v(0,I,3) v(q,I,3)=v(0,I,2) v(0,I,6)=v(QI,Q,3) v(0,I,5)=v(Q,I,2)
and the eight corners share vertices from three faces:
v(0,0,1) = v(0,0,3) = v(Q,0,4) v(0,Q,1) = v(0,0,2) = v(Q,0,3) v(Q,0,1) = v(0,0,4) = v(Q,0,5) v(Q,Q,1) = v(0,0,5) = v(Q,0,2) v(0,0,6) = v(0,Q,2) = v(Q,Q,3) v(0,Q,6) = v(0,Q,3) = v(Q,Q,4) v(Q,0,6) = v(0,Q,5) = v(Q,Q,2) v(Q,Q,6) = v(0,Q,4) = v(Q,Q,5)
Thus of the 6(Q+1)^{2 labeled vertices, only 6Q}2+2 are independent.
File Structure
The file structure is quite simple. The first line contains the value of Q, and is followed by 6(Q+1)^2 lines containing the vertices. A piece of Fortran code for reading the file would look like:
READ(10,*) Q DO F=1,6 DO J=0,Q DO I=0,Q READ(10,*) (V(K,I,J,F), K=1,3) ENDDO ENDDO ENDDO
Here the vertices are represented by threevectors. In some cases extra components are added representing albedo, color, surface gravity, or other surface characteristics. Since the labeling scheme implicitly contains the connectivity, no facet table is necessary.
The quadrilateral facets in the model are not necessarily flat, since there is no guarantee that the four vertices are coplanar. The facet normals are defined by the cross product of their diagonals. This approximation presents no real difficulty because the spacings of the vertices are very small compared to the size of the body. The standard form (Q=512) has 1.57 million vertices.
Although it is not necessary, it is convenient to take Q to be a power of 2. Because of this choice, it is easy to 'dumb down' a model by increasing the spacing by factors of 2. Vertices of the form v(2I,2J,F) are retained and the others discarded. Because of the quadrilateral facet structure, the models can also be 'densified' through bilinear interpolation.
Example
Here is a sample SHAPE.TXT file:
128 218.72182 8.78589 136.89489 217.94953 6.10207 138.09736 217.59664 3.46244 139.74751 216.83911 0.75086 140.98874 216.04842 1.95086 142.19411 215.34667 4.53459 143.49143 214.06968 7.13078 144.16124 212.35048 9.69145 144.34511 210.62577 12.23122 144.54863 209.47201 14.69014 145.33889 208.85169 17.21845 146.67393 208.58685 19.86090 148.37467 .....
Q Value
Q 
Vertices 
4 
151 
8 
487 
16 
1735 
32 
6534 
64 
25351 
128 
99846 
256 
396294 
512 
1579014 
The output values are:
Line 1  Q (resolution). This gives the number of nodes for i and j. Multiple Q by 6 coordinate vector spaces to fill out the entire region.
Q*Q*6 is the total number of nodes, and line entries in this file.
A Q of 512 is the largest that we represent. It contains 1.5 million vertices and is 56 MB uncompressed.
Lines 2 and following  The location of a vertex in i, j, k space (Cartesian coordinates).
(Compiled by KD)
References
Gaskell, R.W., O. BarnouinJha, and D. Scheeres, Modeling Eros with Stereophotoclinometry, Abstract #1333, 38th LPSC, Houston, TX, 2007. [GASKELLETAL2007]
Gaskell R.W., Landmark navigation and target characterization in a simulated Itokawa encounter, AAS paper 05289, AAS/AIAA Astrodynamics Specialists Conf., Lake Tahoe, CA, 2005. [GASKELL2005]