Commit 0d096679 authored by Laurent Belcour's avatar Laurent Belcour Committed by Ludovic Courtès

[Doc] Correction of the incorrect filenames in the first tutorial.

parent 242a265a
......@@ -2,7 +2,7 @@
<alta>
<action name="data2brdf">
<!-- Input and output arguments of the action -->
<input name="./sources/tests/Kirby2.dat" />
<input name="Kirby2.dat" />
<output name="Kriby2.brdf" />
<!-- Define the function to use -->
......@@ -16,9 +16,9 @@
<action name="brdf2gnuplot">
<!-- Input and output arguments of the action -->
<input name="Kriby2.brdf" />
<output name="Kirby2.dat" />
<output name="Kirby2-export.dat" />
<!-- Take the data file abscissa and apply the function to it -->
<parameter name="data-file" value="./sources/tests/Kirby2.dat" />
<parameter name="data-file" value="Kirby2.dat" />
</action>
</alta>
\ No newline at end of file
......@@ -44,7 +44,7 @@ And Python scripts using:
\page simple-tutorial1 A simple 1D rational fitting
In this tutorial, we will see how to use \ref commands "commands" from the command line to approximate a 1D function described by a set of points. For this, we will use the <a href="http://www.itl.nist.gov/div898/strd/nls/data/kirby2.shtml">rational-example-012</a> dataset from the US National Institute of Standards and Technology. There are certified values for a rational approximation of this dataset:
In this tutorial, we will see how to use \ref commands "commands" from the command line to approximate a 1D function described by a set of points. For this, we will use the <a href="http://www.itl.nist.gov/div898/strd/nls/data/kirby2.shtml">Kirby2</a> dataset from the US National Institute of Standards and Technology. There are certified values for a rational approximation of this dataset:
<center>
\f$
......@@ -56,27 +56,27 @@ where \f$ b_1 \simeq 1.67, \; b_2 \simeq -1.39e^{-1}, \; b_3 \simeq 2.59e^{-3},
The \ref data2brdf allows to perform a fitting procedure by converting a \ref data object into an approximate \ref function object.
First, we need to download the rational-example-012 dataset in ALTA format: <a href="http://alta.gforge.inria.fr/data/rational-example-012.dat">rational-example-012.dat</a>. Save this file in <tt>$ALTA/data/1d/NIST/rational-example-012</tt>.
First, we need to download the Kirby2 dataset in ALTA format: <a href="http://alta.gforge.inria.fr/data/Kirby2.dat">Kirby2.dat</a>. Save this file in <tt>$ALTA/Kirby2.dat</tt>.
$ data2brdf --input ../data/1d/NIST/rational-example-012/rational-example-012.dat --output rational-example-01.brdf --fitter rational_fitter_eigen
$ data2brdf --input Kirby2.dat --output Kirby2.brdf --fitter rational_fitter_eigen
The result can be exported using the \a brdf2data commands.
$ brdf2data --input rational-example-01.brdf --output rational-example-01.dat --data-file ../data/1d/NIST/rational-example-012/rational-example-012.dat
$ brdf2data --input Kirby2.brdf --output rational-example-01.dat --data-file Kirby2.dat
The \ref brdf2data allows you to export a function into a data file. If no data plugin is specified, the ALTA format is used which is gnuplot compliant. The position of evaluation for the function are taken from a specified data file (here the original rational-example-012 file).
The \ref brdf2data allows you to export a function into a data file. If no data plugin is specified, the ALTA format is used which is gnuplot compliant. The position of evaluation for the function are taken from a specified data file (here the original Kirby2 file).
Using gnuplot for example it is possible to visualize the resulting function approximation. Here is a plot of the original data and exported data:
@htmlonly
<center>
<img src="rational-example-012.png" alt="rational-example-012" height="512px"/>
<img src="Kirby2.png" alt="Kirby2" height="512px"/>
</center>
@endhtmlonly
To convert this brdf file to be used in another software (here matlab), you will need the following command:
$ brdf2brdf --input rational-example-01.brdf --output rational-example-01.m --export matlab
$ brdf2brdf --input Kirby2.brdf --output Kirby2.m --export matlab
\ref brdf2brdf converts an ALTA brdf file into another format such as Matlab m file, C++ code, or BRDF Explorer shader. Note that this tool cannot convert to another ALTA file (e.g., converting a Blinn lobe to a Beckmann distribution).
......@@ -87,7 +87,7 @@ Here we provide the resulting BRDF file and the XML script used to generate it:
<table style="border-spacing: 20px 0px;">
<tr>
<td><a href="Kirby2.brdf"><img src="brdf.png" alt="BRDF file" height="80px" /></a></td>
<td><a href="rational-example-012.xml"><img src="xml.png" alt="BRDF file" height="80px" /></a></td>
<td><a href="Kirby2.xml"><img src="xml.png" alt="BRDF file" height="80px" /></a></td>
</tr>
</table>
</center>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment