[pstricks] Automate a line drawing routine
dwarnold45 at suddenlink.net
Tue Dec 30 21:24:18 CET 2008
Case 1: (-1,-1), (2,4)
This is the case in your code. The line enters on the bottom boundary
and leaves on the top boundary.
Case 2: (-4,-2), (4,2)
The line enters on the left boundary and leaves on the right boundary.
Case 3: (-3,-4), (4,2)
The line enters on the bottom boundary and leaves on the right boundary.
Case 4: (-4,-2), (2,4)
The line enters on the left boundary and leaves on the top boundary.
Now, each of these could be handled as individual cases with the
ideas proposed in your code, but I'd like one set of code that could
be called with a macro such as:
On Dec 30, 2008, at 11:50 AM, Herbert Voss wrote:
> David Arnold schrieb:
> that is no problem.
>> Can Herbert's code be adapted with an if...else something or other to
>> accommodate for the fact that the line might exit on the right or the
>> top boundary and might enter on the left or bottom entry? I can make
>> sure that the first point lies to the left and under the second point
>> in \DaveArnold, ensuring positive slope.
> please, give some example values for such a case
> PSTricks mailing list
> PSTricks at tug.org
More information about the PSTricks