Changeset a811a0 for molecuilder/src/boundary.cpp
- Timestamp:
- Jul 7, 2009, 9:12:54 AM (16 years ago)
- Children:
- 30212a8
- Parents:
- d98327
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
rd98327 ra811a0 2708 2708 // check if we only have one unique point yet ... 2709 2709 if (a != Candidate) { 2710 // Calculate center of the circle with radius RADIUS through points a and Candidate2710 // Calculate center of the circle with radius RADIUS through points a and Candidate 2711 2711 Vector OrthogonalizedOben, a_Candidate, Center; 2712 2712 double distance, scaleFactor; … … 2714 2714 OrthogonalizedOben.CopyVector(&Oben); 2715 2715 a_Candidate.CopyVector(&(a->x)); 2716 a_Candidate.SubtractVector(&(Candidate->x));2717 OrthogonalizedOben.ProjectOntoPlane(&a_Candidate);2718 OrthogonalizedOben.Normalize();2719 distance = 0.5 * a_Candidate.Norm();2720 scaleFactor = sqrt(((RADIUS * RADIUS) - (distance * distance)));2721 OrthogonalizedOben.Scale(scaleFactor);2716 a_Candidate.SubtractVector(&(Candidate->x)); 2717 OrthogonalizedOben.ProjectOntoPlane(&a_Candidate); 2718 OrthogonalizedOben.Normalize(); 2719 distance = 0.5 * a_Candidate.Norm(); 2720 scaleFactor = sqrt(((RADIUS * RADIUS) - (distance * distance))); 2721 OrthogonalizedOben.Scale(scaleFactor); 2722 2722 2723 2723 Center.CopyVector(&(Candidate->x)); 2724 Center.AddVector(&(a->x));2725 Center.Scale(0.5);2726 Center.AddVector(&OrthogonalizedOben);2724 Center.AddVector(&(a->x)); 2725 Center.Scale(0.5); 2726 Center.AddVector(&OrthogonalizedOben); 2727 2727 2728 2728 AngleCheck.CopyVector(&Center); … … 2730 2730 norm = a_Candidate.Norm(); 2731 2731 // second point shall have smallest angle with respect to Oben vector 2732 if (norm < RADIUS ) {2732 if (norm < RADIUS*2.) { 2733 2733 angle = AngleCheck.Angle(&Oben); 2734 2734 if (angle < Storage[0]) { … … 2749 2749 } 2750 2750 } else { 2751 cout << "Linked cell list is empty." << endl;2751 cout << "Linked cell list is empty." << endl; 2752 2752 } 2753 2753 }
Note:
See TracChangeset
for help on using the changeset viewer.