htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

htrdr-obj.5 (3117B)


      1 .\" Copyright (C) 2018-2019, 2022-2025 Centre National de la Recherche Scientifique
      2 .\" Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux
      3 .\" Copyright (C) 2022-2025 Institut Pierre-Simon Laplace
      4 .\" Copyright (C) 2022-2025 Institut de Physique du Globe de Paris
      5 .\" Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com)
      6 .\" Copyright (C) 2022-2025 Observatoire de Paris
      7 .\" Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne
      8 .\" Copyright (C) 2022-2025 Université de Versaille Saint-Quentin
      9 .\" Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier
     10 .\"
     11 .\" This program is free software: you can redistribute it and/or modify
     12 .\" it under the terms of the GNU General Public License as published by
     13 .\" the Free Software Foundation, either version 3 of the License, or
     14 .\" (at your option) any later version.
     15 .\"
     16 .\" This program is distributed in the hope that it will be useful,
     17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
     18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     19 .\" GNU General Public License for more details.
     20 .\"
     21 .\" You should have received a copy of the GNU General Public License
     22 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
     23 .Dd October 5, 2023
     24 .Dt HTRDR-OBJ 5
     25 .Os
     26 .Sh NAME
     27 .Nm htrdr-obj
     28 .Nd geometric file format
     29 .Sh DESCRIPTION
     30 A
     31 .Nm
     32 file is an ordinary obj file composed solely of triangular meshes.
     33 Its special feature is that each triangle must be included in a material
     34 group as defined by the
     35 .Li usemtl
     36 directive.
     37 And the form of the
     38 .Li usemtl
     39 directive must be as follows:
     40 .Bd -ragged -offset Ds
     41 .Li usemtl Va front_mtl Ns Oo : Ns Va interface_mtl Oc : Ns Va back_mtl
     42 .Ed
     43 .Pp
     44 with
     45 .Va front-mtl ,
     46 .Va interface-mtl
     47 and
     48 .Va back-mtl
     49 the material names of the front, interface and back of the triangles
     50 belonging to the group.
     51 The interface material name is optional: it is used for thin geometries,
     52 i.e. geometries with no thickness.
     53 Material names can be composed of any character, with the exception of
     54 spaces, tabs and the colon character used to separate the
     55 aforementioned names.
     56 Note that, by convention, a side of a triangle is said to be
     57 "front-facing" when its vertices are ordered clockwise.
     58 .Pp
     59 The grammar of a
     60 .Nm htrdr-obj
     61 file is therefore a subset of the obj file format, with only one
     62 specific convention concerning material names.
     63 Consequently, any software supporting the obj file format can be used to
     64 create or view a
     65 .Nm
     66 file.
     67 .Sh EXAMPLES
     68 Define a sheet of paper at the interface between air and concrete:
     69 .Bd -literal -offset Ds
     70 v -1.0  -1.0  0
     71 v -1.0   1.0  0
     72 v  1.0  -1.0  0
     73 v  1.0   1.0  0
     74 
     75 usemtl air:paper:concrete
     76 f 1 2 3
     77 f 3 2 4
     78 .Ed
     79 .Pp
     80 Define a wooden cube whose faces along the Z axis are against a brick.
     81 The other faces are in contact with the air:
     82 .Bd -literal -offset Ds
     83 v 0 0 0
     84 v 1 0 0
     85 v 0 1 0
     86 v 1 1 0
     87 v 0 0 1
     88 v 1 0 1
     89 v 0 1 1
     90 v 1 1 1
     91 
     92 usemtl wood:air
     93 f 1 3 2
     94 f 2 3 4
     95 f 1 5 3
     96 f 3 5 7
     97 f 5 6 7
     98 f 7 6 8
     99 f 4 8 2
    100 f 2 8 6
    101 
    102 usemtl wood:brick
    103 f 3 7 4
    104 f 4 7 8
    105 f 1 2 5
    106 f 5 2 6
    107 .Ed
    108 .Sh HISTORY
    109 The
    110 .Nm
    111 format was first developed for the
    112 .Xr htrdr 1
    113 program.