[pstricks] Automate a line drawing routine

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Dec 31 00:09:07 CET 2008


Michael Sharpe schrieb:

> 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).)

Michael,
this is not the problem with my example \psSlope(2,2)(4,1)
it is the negative slope, which needs the nodes sorted in another
order.

Herbert


> 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