Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble filling in a closed vector shape
#1
UPDATE: figured this out, the final program is here! But I'm tired... In the words of c3p0, "no more adventures!" Tongue 


Hi everyone... over the weekend I did some work on the "van halen" screensaver, playing around with vector graphics, and added the band logo moving across the screen and getting bigger for a 3D effect.

It works good drawn as just an outline, even with 10 or 20 of them going at once (for that see attached "VanHalenizer2-05-17.multi vectors.bas"). 
(Hey @BPlus, check out "VanHalenizer2-05-17b.multi vectors.PSYCHEDELIC!.bas"! Big Grin ) 
BUT then I wanted to make them solid (filled in), and that's where I ran into trouble. 

At first I tried filling in the logo itself which is 2 closed shapes, but was having trouble determining a point inside each shape. That version runs pretty fast and looks good... when the flood fill is working (about half the time) - for that see attached "VanHalenizer2-05-17i.multi vectors.PAINT FILL.bas"). Maybe fixing this version is the ticket? 

So I changed tactics to fill around the shape with black and then use _ClearColor to get rid of the black, and voila, solid shape. Which brings us to the last version ("VanHalenizer2-05-23.bas"). It reliably produces the solid shapes, but is SLOOOOW (search "USE FLOOD FILL" to go right to the problem section).

I tried a couple of different flood fill methods which haven't made a difference, which is surprising, because back around May we had a thread about fast ways to do flood fill, and came up with some pretty good ones (this program compares the various methods).

If anyone has any suggestions that don't involve completely rewriting the program & vector logic (which took a long time to get right!), a 2nd set of eyes would be much appreciated...

Thanks...


Attached Files
.bas   VanHalenizer2-05-17.multi vectors.bas (Size: 172.33 KB / Downloads: 17)
.bas   VanHalenizer2-05-23.bas (Size: 190.75 KB / Downloads: 18)
.bas   VanHalenizer2-05-17b.multi vectors.PSYCHEDELIC!.bas (Size: 174.63 KB / Downloads: 15)
.bas   VanHalenizer2-05-17i.multi vectors.PAINT FILL.bas (Size: 185.94 KB / Downloads: 21)
Reply


Messages In This Thread
trouble filling in a closed vector shape - by madscijr - 11-06-2025, 08:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  simple 3d starfield & wireframe or vector graphics revisited madscijr 5 263 01-31-2026, 09:41 PM
Last Post: Pete
  trouble building ansiprint by a740g hsiangch_ong 2 578 01-09-2025, 12:57 AM
Last Post: hsiangch_ong
  Having trouble Windows command line SORT via SHELL GTC 19 4,367 08-26-2023, 04:19 AM
Last Post: GTC
  How do I paint a shape? PhilOfPerth 21 3,921 06-28-2023, 10:09 PM
Last Post: TempodiBasic
Photo Ellipse trouble james2464 14 2,998 08-25-2022, 10:52 PM
Last Post: james2464

Forum Jump:


Users browsing this thread: 1 Guest(s)