Re: Polygon bug?

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

Colin Taylor writes:
> I have noticed that Euphoria's polygon routine has
> two small anomalies:

Thanks for sending me the example program.
I can see the two effects that you are referring to.

> 1. an unfilled polygon is often slightly different than the
> same polygon outlined using the draw_line routine.

I'm not worried about this one. It seems to be clearly a case
where two different algorithms have been used to
compute the same thing, but in a few isolated instances the
numbers round off differently, and you see
a pixel plotted one position off from where it was plotted
with the other algorithm.

> 2. a complex filled polygon with a high number of vertices
> often produces some spurious horizontal lines.

This one is a bit harder to explain. Sometimes there's
a short line segment of several pixels that doesn't match
with the other algorithm. Maybe one algorithm, polygon(),
draws very sharp vertices as "invisible", while the other,
draw_line(), always draws a line segment. I'm not sure.
Anyway, thanks for reporting it. I don't think it will
cause a problem for the average person using polygon()
or draw_line().

Euphoria uses a different method for draw_line() than
it does for polygon(). Euphoria calls a WATCOM line-draw
routine for *each* draw_line() segment, but for polygon(),
it makes a single call to WATCOM's polygon routine.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu