.. _recipe_simple_prism:

Simple prism model in Cartesian coordinates
===========================================

The ``simple_prism.sh`` script calculates
the gravitational potential, gravitational attraction,
and gravity gradient tensor due to a simple prism model
in Cartesian coordinates:

.. include:: ../../cookbook/simple_prism/simple_prism.sh
    :literal:

The model file looks like this:

.. include:: ../../cookbook/simple_prism/model.txt
    :literal:

The result should look like the :ref:`following <simpleprism>`
("column" means the column of the output file).

.. _simpleprism:

.. figure:: ../../cookbook/simple_prism/simple_prism.png
    :align: center
    :width: 600px

    Plot of the columns of ``output.txt`` generated by ``simple_prism.sh``.
    The x and y axis are longitude and latitude, respectively.
