Re: intersection and ExoticaX

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeff,

if the line and side are parallel, or even identical, the case can be
ignored, because the entry and exit points will be obtained as
intersections with the adjacent sides.

BTW, Jeff, I would like to have a look at your solution, unfortunately
Lewis' note with it was truncated.

jiri

----- Original Message -----
From: "Jeffrey Fielding" <jjprog at earthlink.net>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, 7 July 2001 06:15
Subject: Re: intersection and ExoticaX


>
>
> On 2001.07.06 07:52 Jiri Babor wrote:
> <snip>
> >         if D then                       -- if line and side not
> > parallel
> >             c2 = -a2*x1 - b2*y1
> >             x = (b1*c2 - b2*c1)/D
> >             y = (a2*c1 - a1*c2)/D
> >             if b2 then                  -- if side not vertical
> >                 if (x >= x1 and x <= x2) or (x <= x1 and x >= x2)
then
> >                     s = append(s, {x,y})
> >                 end if
> >             else                        -- vertical side
> >                 if (y >= y1 and y <= y2) or (y <= y1 and y >= y2)
then
> >                     s = append(s, {x, y})
> >                 end if
> >             end if
> >         end if
> </snip>
>
> Nice. But what if the line and side are parallel?
>
> Jeff
>
>
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu