Object on a Slope
=================
This is an example which will show the usage of :class:`paramcomparison.readers.UserFunctionReader`.
Let's say we have a simple physics problem: we have an object which is put on a slope. What is the
time it takes for the object to slide down to the ground, given the following 4 parameters:
- the angle of the slope :math:`\theta`,
- the coefficient of friction :math:`\mu`,
- the initial height of the object :math:`h`,
- the gravitational acceleration :math:`g` (we may not be on the Earth).
This is a rather simple problem, and the time can be computed using the following formula:
.. math::
t = \sqrt{2h/[g \sin \theta (\sin \theta - \mu \cos \theta)]}
If :math:`t` is an imaginary number (in other words, the result in the square root is negative),
then it means the object would not slide down.
Here, we will use ParamComparison to generate tables to display the relation of the parameters with
the actual time it takes to fall down.
We create a python script to generate the tables using
:class:`paramcomparison.readers.UserFunctionReader`:
.. literalinclude:: gen_tables.py
You can download :download:`the script ` and view :doc:`the output of this example