Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to figure algorithm to draw and paint polygons
#5
(08-13-2023, 08:16 PM)CharlieJV Wrote:
(08-13-2023, 07:22 PM)mnrvovrfc Wrote:
(08-12-2023, 08:33 AM)RhoSigma Wrote: As old Amiga user still until today I can tell your workaround is good for drawing the shape of a polygon.

However, the AREA statements were not to draw a shape but a filled polygon using the "Blitter" (abrev. for "Block image transferer") which was at that time (late 80s) blazingly fast processing upto 80 million pixels per second. So to emulate that you would also need a PSET anywere into the drawn shape and then do a PAINT. I tried that once too, but often had problems that PAINT was leaking over the shape and flooding the whole screen, so I was looking for an alternative.

The alternative I found was this http://alienryderflex.com/polygon_fill/

From the theory and sample described there I created my polygon.bm library which is part of my "Libraries Collection" here https://qb64phoenix.com/forum/showthread.php?tid=1033

The algorithm talked about in this post looks like it works well. In the least you should download RhoSigma's "QBLibrary" and study how he implemented it.

Oooo, that's good stuff.

I was just going with best-case scenario polygons because I could not fathom the worst case senarios.

That's good reading.

Simply go to Daryl's Main Tutorial index, scroll a bit down to the "Geometry/Math" entries and study.
http://alienryderflex.com/tutorials.shtml

It's all there, how to figure a point inside a polygon, filling, hatchline filling, shortest path, perimeter etc.
Reply


Messages In This Thread
RE: Trying to figure algorithm to draw and paint polygons - by RhoSigma - 08-13-2023, 08:32 PM



Users browsing this thread: 4 Guest(s)