Function tri2rad(fn,P,F)
tri2rad(fn,P,F,frmt)
tri2rad(fn,P,Fs)
tri2rad(fn,P,Fs,frmt)
writes a Radiance .rad file describing the given
triangular mesh.
String fn gives the path, name and extension of the file
to write to.
Matrix P has 3 columns which contain the x,y,z
coordinates, respectively. Each row represents a vertex in
the mesh.
Matrix F has 3 columns which contain 3 row indices to P.
Each row represents a triangle in the mesh.
Cell-array Fs has 3 columns {F,matid,triangleid}, where
matid and triangleid are strings for the material and
triangle identifiers.
In fact, if the third input argument is matrix F, then
this call to the function is equivalent to a call with
input argument Fs with the value
{F,"buiten_mat","driehoek"}.
String frmt contains the sprintf template for conversion
of reals to strings. At default, "%g" is assumed.
The validity of the input is not checked!
(c) 2026 fabien van mook
2026.08.20 release of this file within package "fvm-geometry" under GNU GPLv3+