| 
      		
    
           | 
       
      
			Chapter: 1. Source code download, 
						2. Test results, 3. Test item and method, 
						4. Test code
  
      1. Source code download 
      =>
           IntersectionPts.zip
       
			
  
      2. Test resultsreturn=>page top 
      
        
          
             
               | 
           
          
             Figure1 Results of the intersection points calculation between two
            curves 
              | 
           
        
       
       
       : Similar test => DrawTop test command 
      
      
  
      3. Test item and method
			return=>page top 
      Intersection points between two curves are calculated by the 
			Curve2DUtil.getIntersectionPts method. 
      The reliability and the processing speed of the
      above method are tested. The test is performed under the severe condition
      in which either curve nearly contacts with another curve.
      Such a severe condition may be created by translating either curve repeatedly. 
        
      public static CrossCurvePT[] get IntersectionPts(Curve2D curve1, Curve2D curve2) 
      Parameters: 
      curve1 - The Curve2D object of the first (parametric) curve. 
      curve2 - The Curve2D object of the second (parametric) curve. 
      Returns: 
      The array of the CrossCurvePT objects which represents the intersection points of the curve1 and curve2. If there is no intersection, then returns the array of 0-length. 
      
  
			
			
      4. Test code
			return=>page top 
			
  
	
			4.1 Classes Overview
      
        
          
            | 
             Class 
             | 
            
             Description 
             | 
           
          
            | 
              IntersectionPt 
             | 
            
             public class IntersectionPts extends JFrame 
            Creates and assembles the objects of the Jframe, JScrollPane, JViewport
            and the Panel. 
             | 
           
          
            | IntersectionPtsPanel | 
            
             public class  IntersectionPtsPanel extends JPanel 
            Draws curves and intersection points on this panel. 
             | 
           
          
            | TestCase | 
            
							public class TestCase 
							  
							=> TestCase of the RegionHitTest.
             | 
           
          
            | TestCurve | 
            
							public class TestCurve 
							  
							=> TestCurve of the RegionHitTest.
             | 
           
          
            | Parametric Curves | 
            
              Segment2D, 
							Curve2D, 
							Rectangle2DE, 
							RoundRectangle2DE, 
							Ellipse2DE, 
							Line2DE, 
							Polyline2DE,  
              CubicCurve2DE, 
							GeneralCurve2DE, 
							FergusonCurve2D  | 
           
          
            | Geometric library | 
            
              Curve2DUtil.getIntersectionPts,  
							CrossCurvePT, 
							Matrix, 
							Matrix2D 
             | 
           
        
       
      
  
			4.2 Specifications
			return=>page top 
      4.2.1 public class IntersectionPTsPanel extends JPanel 
      
        
          
            | 
             Method 
             | 
            
             Description 
             | 
           
          
            | createTestCase | 
            
             public void createTestCase() 
            Creates TastCase objects. 
             | 
           
          
            | paint | 
            
             public void paint(Graphics g) 
            Draws the curves specified by the TestCase objects and the intersection points on this panel. 
            Intersection points between two curves are calculated by the 
						Curve2DUtil.getIntersectionPts 
						method and they are output as the array of 
						CrossCurvePT objects.
             | 
           
        
       
       
       
       |