INTERFACE Refine; (* This interface contain essentially procedures for support the programs of refinement of tetrahedra. *) IMPORT Triangulation; FROM Triangulation IMPORT Pair; TYPE PAIR = ARRAY OF Pair; TRI = ARRAY [0..2] OF Pair; Free = RECORD tetra : REF ARRAY OF PAIR; octah : REF ARRAY OF PAIR; END; Side = RECORD upper : REF PAIR; lower : REF PAIR; END; Corner = RECORD right : REF PAIR; left : REF PAIR; front : REF PAIR; back : REF PAIR; END; Pack = RECORD side : Side; corner: Corner; END; PROCEDURE MakeTetra(order: CARDINAL; net: BOOLEAN := FALSE): Corner; (* This procedure implements the order-refinement of a topological tetrahedra. See: Relatorio FAPESP numero 5, secao 4.1. The number of new tetrahedra can be compute by the following formula: T(order) = 5/3 order**{3} - 2/3 order, order>= 1. *) PROCEDURE MakeTriang(order: CARDINAL): REF ARRAY OF TRI; PROCEDURE MakeLevTe(order: CARDINAL) : Pack; PROCEDURE MakeRowTe(order: CARDINAL) : Free; PROCEDURE MakeRowTriang(order: CARDINAL) : REF ARRAY OF TRI; PROCEDURE MakeGluea(order: CARDINAL) : Pair; (* Realizes the gluing ca.right <----> cb.left *) PROCEDURE MakeGlueb(order: CARDINAL) : Pair; (* Realizes the gluing ca.left <----> cb.right *) PROCEDURE MakeGluec(order: CARDINAL) : Pair; (* Realizes the gluing ca.front <----> cb.back *) PROCEDURE MakeGlued(order: CARDINAL) : Pair; (* Realizes the gluing ca.back <----> cb.front *) PROCEDURE MakeMaximalGlue(order: CARDINAL) : Pair; (* Realizes the maximal glue of a refined tetrahedron *) PROCEDURE PairsOnFrontier( READONLY co: Corner; cnum, order : CARDINAL; ) : REF PAIR; END Refine. (**************************************************************************) (* *) (* Copyright (C) 2000 Universidade Estadual de Campinas (UNICAMP) *) (* *) (* Authors: *) (* L. P. Lozada & J. Stolfi - UNICAMP *) (* *) (* This file can be freely used, distributed, and modified, provided that *) (* this copyright and authorship notice is included in every copy or *) (* derived version. *) (* *) (* DISCLAIMER: This software is offered ``as is'', without any guarantee *) (* as to fitness for any particular purpose. Neither the copyright *) (* holder nor the authors or their employers can be held responsible *) (* for any damages that may result from its use. *) (* *) (* Last edited on 2001-05-21 01:39:06 by stolfi *) (**************************************************************************)