Geometry Types

<< Previous: Rotation Model Types

Next: Sensor Catalog >>

Geometry Property

The geometry property defines the shape that the program uses to visualize an object:
"geometry": {
   "type": "Cosmographia geometry type",
   ... type-dependent geometry attributes ...
},
The geometry types described below are supported by Cosmographia ([4.1+] indicates features available in Cosmographia 4.1 or later.):

Mesh

The Mesh geometry type (“type“: “Mesh“) directs Cosmographia to use a 3D model provided in a separate 3D model file. This type is frequently used  for spacecraft and smaller natural bodies for which 3D shape models are available. This is an example of a Mesh type geometry definition for ISS:
"geometry": {
   "type": "Mesh",
   "size": 0.1,
   "meshOffset": [ -1.4, 0, 0.75 ],
   "meshRotation": [ 1, 0, 0, 0 ],
   "source": "models/iss/iss.cmod"
}
The source attribute specifies the absolute or relative path name of a 3D model file. The relative path must be relative to the directory in which the catalog file resides. Supported 3D model file formats are 3DS and CMOD.
The size attribute specifies the radius of the sphere to which the model should be scaled, in km. Alternatively the scale attribute (not shown above) can be used to specify the factor by which the the model should be scaled. If both size and scale are present, scale is ignored. If both are omitted, no scaling is done and the model is displayed with its native dimensions.
The meshOffset attribute specifies a translational body-fixed offset, as a fraction of the bounding sphere radius in each of the three coordinates, by which the model should be shifted with respect to the position computed using the trajectory property. If not specified, the offset defaults to [0,0,0]. This offset is useful when the mesh geometry isn’t centered at the desired point and needs to be repositioned without editing the mesh file..
The meshRotation attribute specifies a rotational offset given by a SPICE-style quaternion, by which the model needs to be rotated  in order to align it with the body-fixed fame. If not specified, the quaternion defaults to [1,0,0,0]. This offset is useful when the mesh geometry isn’t aligned with body-fixed axes and needs to be rotated without editing the mesh file.
The license attribute (not shown in the example) can be included if needed to specify license information pertinent to the 3D model file. The attribute value can be any string such as a URL.

SPICE DSK

[4.1+] The SPICE Digital Shape Kernel (DSK) geometry type (“type“: “DSK“) directs Cosmographia to use a 3D model provided in a separate SPICE Type 2 (triangular plate) DSK file. This type is frequently used  for natural bodies for which 3D shape models in the DSK format are available from a flight project or Planetary Data System (PDS). This is an example of a DSK type geometry definition for asteroid Lutetia using a DSK file included in the Rosetta SPICE PDS archive:
"geometry": {
   "type": "DSK",
   "kernel": "ROS_LU_K380_OSPCLAM_N_V1.BDS",
   "body": 2000021,
   "surface": 1008,
   "opacity": 1,
   "color": [ 0.7, 0.7, 0.7 ]
}
The kernel attribute specifies the absolute or relative path name of a SPICE Type 2 DSK file. The relative path must be relative to the directory in which the catalog file resides. The program will load the triangular plate shape data from a single DSK segment from this file, either the first segment in the file if both body and surface attributes are omitted, or the first segment that matches the specified body attribute if only the surface attribute is omitted, or the first segment that matches the specified body/surface attribute combination.
The optional body and surface attributes specify the SPICE names or IDs of the body and surface for which to load data from the DSK file.
The optional color and opacity attributes specify the color and opacity with which to render the model.
The optional size, scale, meshOffset, and meshRotation attributes can be used in the same way as for the Mesh type models to scale the model, to offset it from the object center, and/or to additionally rotate it.

Globe

The Globe geometry type (“type“: “Globe“) directs Cosmographia to visualize the object as a sphere or an ellipsoid. This type is frequently used for larger natural bodies with shapes close to spherical. This is a very simple example of a Globe type geometry definition for Io:
"geometry": {
   "type": "Globe",
   "radii": [ 1829.4, 1819.4, 1815.7 ],
   "baseMap": "textures/io.dds"
}
The radii attribute specifies the three ellipsoid radii, in km. Alternatively, to model the object as a sphere, the radius attribute with a single value in km can be specified instead of radii.
The baseMap attribute specifies the absolute or relative path name of an image file containing the image of the map that should be wrapped around the surface. The relative path must be relative to the directory in which the catalog file resides. Supported image file formats include JPEG, PNG, and DDS. If omitted, the globe is visualized in grey color.
The geometry property allows a more complex baseMap definition (as a property rather than a single attribute) as well as many other attributes and properties such as normalMap, cloudMap, atmosphere, emissive, specularPower, and specularColor. These attributes are not discussed in this User’s Guide. For their examples, see geometry Globe definitions in the following catalogs included in the Cosmographia package
earth-spice.json
venus-spice.json
mars-spice.json
sun-spice.json

Rings

The Rings geometry type (“type“: “Rings“) directs Cosmographia to visualize the object as a ring. This type is used  for planetary rings. This is an example of a Rings type geometry definition for Saturn’s rings:
"geometry": {
   "type": "Rings",
   "innerRadius": 74660,
   "outerRadius": 140220,
   "texture": "textures/saturn-rings.png"
}
The innerRadius and outerRadius attributes specify the inner and outer radii of the ring, in km.
The texture attribute specifies the absolute or relative path name of an image file containing the image that should be shown on the ring surface. The relative path must be relative to the directory in which the catalog file resides. Supported image file formats include JPEG, PNG, and DDS. If omitted, the ring is visualized in grey color.

ParticleSystem

The ParticleSystem geometry type (“type“: “ParticleSystem“) is used to visualize a wide range of phenomena such as rocket engine exhaust, smoke, explosions, volcanoes and geysers, and aurora. This geometry type is not discussed in this User’s Guide. For its examples, see ParticleSystem definitions in the following catalogs included in the Cosmographia package:
dawn.json
addons/2008TC3.json
addons/aurora.json
addons/enceladus-jets.json
addons/tvashtar.json

KeplerianSwarm

The KeplerianSwarm geometry type (“type“: “KeplerianSwarm“) is used to visualize large numbers of points in Keplerian orbits. This geometry type is not discussed in this User’s Guide. For its examples, see KeplerianSwarm definitions in the following catalogs included in the Cosmographia package:
addons/allasteroids.json
addons/asteroids.json
addons/debris.json
addons/hildas.json
The only data file format currently supported as the source data for this type is astorb, which is used for Ted Bowell’s minor planet catalogs and described completely at http://www.naic.edu/~nolan/astorb.html.

TimeSwitched

The TimeSwitched geometry type (“type“: “TimeSwitched“) allows using different shapes at different times to visualize an object. This is an example of a TimeSwitched type geometry definition for the MSL back shield:
"geometry": {
   "type": "TimeSwitched",
   "sequence": [
      {
         "startTime": "2011-11-26 15:52:13",
         "geometry": {
            "type": "Mesh",
            "source": "models/msl-backshell.cmod", 
            "size": 0.003
         }
      },
      {
         "startTime" : "2012-08-06 05:19:04"
      }
   ]
}
Each of the individual geometry property blocks together with the startTime attribute within the sequence construct defines the start of the time interval and a shape that should be used to visualize the  object during that interval.
The startTime attributes set the boundaries of the intervals, with the startTime of the next interval used as the end time of this interval.
Any geometry types can used in the individual blocks within the sequence or geometry property can be omitted altogether, in which case the program will show nothing for the object.