Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit d204e178 by Pierre Kraemer

### amelioration gestion des surfaces a bord

parent 1a289716
 ... @@ -116,16 +116,19 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const typen ... @@ -116,16 +116,19 @@ typename PFP::REAL vertexVoronoiArea(typename PFP::MAP& map, Dart d, const typen Dart it = d ; Dart it = d ; do do { { if(!isTriangleObtuse(map, it, position)) const typename PFP::VEC3& p1 = position[it] ; const typename PFP::VEC3& p2 = position[map.phi1(it)] ; const typename PFP::VEC3& p3 = position[map.phi_1(it)] ; if(!Geom::isTriangleObtuse(p1, p2, p3)) { { typename PFP::REAL a = angle(map, map.phi1(it), map.phi2(it), position) ; typename PFP::REAL a = Geom::angle(p3 - p2, p1 - p2) ; typename PFP::REAL b = angle(map, map.phi_1(it), map.phi2(map.phi1(it)), position) ; typename PFP::REAL b = Geom::angle(p1 - p3, p2 - p3) ; area += (vectorOutOfDart(map, it, position).norm2() / tan(a) + vectorOutOfDart(map, map.phi_1(it), position).norm2() / tan(b)) / 8 ; area += ( (p2 - p1).norm2() / tan(b) + (p3 - p1).norm2() / tan(a) ) / 8 ; } } else else { { typename PFP::REAL tArea = convexFaceArea(map, it, position) ; typename PFP::REAL tArea = Geom::triangleArea(p1, p2, p3) ; if(angle(map, it, map.phi2(map.phi_1(it)), position) > M_PI / 2) if(Geom::angle(p2 - p1, p3 - p1) > M_PI / 2) area += tArea / 2 ; area += tArea / 2 ; else else area += tArea / 4 ; area += tArea / 4 ; ... ...
 ... @@ -40,15 +40,22 @@ ATTR_TYPE computeLaplacianTopoVertex( ... @@ -40,15 +40,22 @@ ATTR_TYPE computeLaplacianTopoVertex( const AttributeHandler& attr) const AttributeHandler& attr) { { ATTR_TYPE l(0) ; ATTR_TYPE l(0) ; unsigned int val = 0 ; ATTR_TYPE value = attr[d] ; unsigned int wSum = 0 ; Dart it = d ; Dart it = d ; do do { { l += attr[map.phi1(it)] - attr[it] ; l += attr[map.phi1(it)] - value ; val++ ; ++wSum ; Dart dboundary = map.phi_1(it) ; if(map.phi2(dboundary) == dboundary) { l += attr[dboundary] - value ; ++wSum ; } it = map.alpha1(it) ; it = map.alpha1(it) ; } while(it != d) ; } while(it != d) ; l /= val ; l /= wSum ; return l ; return l ; } } ... @@ -64,15 +71,23 @@ ATTR_TYPE computeLaplacianCotanVertex( ... @@ -64,15 +71,23 @@ ATTR_TYPE computeLaplacianCotanVertex( ATTR_TYPE l(0) ; ATTR_TYPE l(0) ; Dart it = d ; Dart it = d ; REAL vArea = vertexArea[d] ; REAL vArea = vertexArea[d] ; REAL val = 0 ; ATTR_TYPE value = attr[d] ; REAL wSum = 0 ; do do { { REAL w = edgeWeight[it] / vArea ; REAL w = edgeWeight[it] / vArea ; l += (attr[map.phi1(it)] - attr[it]) * w ; l += (attr[map.phi1(it)] - value) * w ; val += w ; wSum += w ; Dart dboundary = map.phi_1(it) ; if(map.phi2(dboundary) == dboundary) { w = edgeWeight[dboundary] / vArea ; l += (attr[dboundary] - value) * w ; wSum += w ; } it = map.alpha1(it) ; it = map.alpha1(it) ; } while(it != d) ; } while(it != d) ; l /= val ; l /= wSum ; return l ; return l ; } } ... @@ -120,11 +135,17 @@ typename PFP::REAL computeCotanWeightEdge( ... @@ -120,11 +135,17 @@ typename PFP::REAL computeCotanWeightEdge( Dart d, Dart d, const typename PFP::TVEC3& position) const typename PFP::TVEC3& position) { { typename PFP::REAL cot_alpha = 1 / tan(angle(map, map.phi_1(d), map.phi2(map.phi1(d)), position)) ; const typename PFP::VEC3& p1 = position[d] ; const typename PFP::VEC3& p2 = position[map.phi1(d)] ; const typename PFP::VEC3& p3 = position[map.phi_1(d)] ; typename PFP::REAL cot_alpha = 1 / tan(Geom::angle(p1 - p3, p2 - p3)) ; typename PFP::REAL cot_beta = 0 ; typename PFP::REAL cot_beta = 0 ; Dart dd = map.phi2(d) ; Dart dd = map.phi2(d) ; if(dd != d) if(dd != d) cot_beta = 1 / tan(angle(map, map.phi_1(dd), map.phi2(map.phi1(dd)), position)) ; { const typename PFP::VEC3& p4 = position[map.phi_1(map.phi2(d))] ; cot_beta = 1 / tan(Geom::angle(p2 - p4, p1 - p4)) ; } return 0.5 * ( cot_alpha + cot_beta ) ; return 0.5 * ( cot_alpha + cot_beta ) ; } } ... ...
 ... @@ -168,6 +168,9 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart ... @@ -168,6 +168,9 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::VEC3 VEC3 ; Dart dd = map.phi2(d) ; Dart dd = map.phi2(d) ; if(dd == d) return 0 ; const VEC3 n1 = faceNormal(map, d, position) ; const VEC3 n1 = faceNormal(map, d, position) ; const VEC3 n2 = faceNormal(map, dd, position) ; const VEC3 n2 = faceNormal(map, dd, position) ; VEC3 e = position[dd] - position[d] ; VEC3 e = position[dd] - position[d] ; ... ...