Ignore:
Timestamp:
Aug 10, 2009, 4:11:47 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
ada6d2
Parents:
0cf171
Message:

New function ConvexizeNonconvexEnvelope() to calculate the volume of a non-convex envelope.

The central idea is that the volume of a convex envelope is easy to determine as a sum of pyramids with respect to a center inside the envelope. Hence, if we can "reduce" the non-convex envelope to a convex one in such a way that we know the added volume, we may determine the volume of a non-convex envelope.
The nice side effect is that we may use our Find_non_convex_border() algorithm to calculate also the convex envelope.

  • We go through all BoundaryPoints and check whether one of its Baselines does not fulfill the ConvexCriterion. If so, we remove it, as it can not be a boundary point on the convex envelope, and re-construct the attached triangles. The added volume is a general tetraeder, whose formula is known.
  • FIX: Find_convex_border() - We check whether AddPoint is successful or not.
  • builder.cpp: case 'o' - changed to use ConvexizeNonconvexEnvelope() instead of Find_convex_border()
  • Tesselation:AddPoint() - now takes second argument which is the index for BPS and always set BPS to either the newly created or the already present point. Return argument discerns between new and already present point.
  • Tesselation::BPS, BLS, BTS are now public not private. We have to access them from ConvexizeNonconvexEnvelope()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.hpp

    r0cf171 r70c4567  
    3939void Find_convex_border(ofstream *out, molecule* mol, class LinkedCell *LCList, const char *filename);
    4040void Find_non_convex_border(ofstream *out, molecule* mol, class LinkedCell *LC, const char *tempbasename, const double RADIUS);
     41double ConvexizeNonconvexEnvelope(ofstream *out, class Tesselation *TesselStruct);
    4142void Find_next_suitable_point(class BoundaryTriangleSet *BaseTriangle, class BoundaryLineSet *BaseLine, atom*& OptCandidate, Vector *OptCandidateCenter, double *ShortestAngle, const double RADIUS, LinkedCell *LC);
    4243Boundaries *GetBoundaryPoints(ofstream *out, molecule *mol);
Note: See TracChangeset for help on using the changeset viewer.