[pstricks] Automate a line drawing routine

Michael Sharpe msharpe at ucsd.edu
Wed Dec 31 00:00:22 CET 2008


I think there's a problem here that goes back to the code for  
\psIntersectionPoint, which gives a Postscript division by 0  error  
where the lines are parallel. This makes your macro fail when the line  
is either horizontal or vertical. (Try \psSlope(-4,2)(4,2).)

I think there needs to be a test in the code for the case where the  
absolute value of the determinant of dX1 dY1//dX2 dY2 is small--say, <. 
01 times the area of ABCD, and in this case, the intersection could be  
declared to be 100 times the larger of (dX1,dY1), (dX2,dY2) plus the  
basepoint. The current code tests only for dX1 or dX2 small, which is  
not sufficient to prevent PostScript errors.


More information about the PSTricks mailing list