1. fill function

Story-time kiddos:

Alright.  So I teach one of my goofy C friends how to use virtual
screens (that whole #A0000 thing with a memcopy).  Anyways, he keeps
having algorithm problems like, that he needs multiple virtual screens
if he has static background with moving foreground, etc.  But he can't
read to/from windows bmps, so he has to make his own routines to create
pictures for his virtual screens (even tho I wrote him a prog that
converts .bmp to his format and back).  But he's really stubborn, and
insists on using his own routines, which are horrible.  So I created a
good line algorithm which he translated into C (looked like Sanskrit to
me), and I gave him an algorithm for a good circle (untested), but I'm
totally stumped on a good fill algorithm.  He's got this awful recursive
thing that causes "stack overflow" (?) on occasion.  Anyone know a good
fill algorithm that I could help the ingrate out with?

snortboy

new topic     » topic index » view message » categorize

2. Re: fill function

On Sun, 20 Sep 1998, Noah Smith wrote:
> Story-time kiddos:
>
> Alright.  So I teach one of my goofy C friends how to use virtual
> screens (that whole #A0000 thing with a memcopy).  Anyways, he keeps
> having algorithm problems like, that he needs multiple virtual screens
> if he has static background with moving foreground, etc.  But he can't
> read to/from windows bmps, so he has to make his own routines to create
> pictures for his virtual screens (even tho I wrote him a prog that
> converts .bmp to his format and back).  But he's really stubborn, and
> insists on using his own routines, which are horrible.  So I created a
> good line algorithm which he translated into C (looked like Sanskrit to
> me), and I gave him an algorithm for a good circle (untested), but I'm
> totally stumped on a good fill algorithm.  He's got this awful recursive
> thing that causes "stack overflow" (?) on occasion.  Anyone know a good
> fill algorithm that I could help the ingrate out with?
>
> snortboy
>
I wrote a non recursive fill algorithm and a recursive one.  The
recursive one was a litte faster but they were both REALLY SLOW (about 9
seconds to fill the whole screen)

If you want the slow non-recursive one (ha) I'll post it.

later,

-Humberto Yeverino Jr.

"I kick ass for the Lord."

***********************************************************
Home Page:
  http://www.engr.csufresno.edu/~humberto/Home.html

Ti Page:
  http://www.engr.csufresno.edu/~humberto/tex.html

z80 Source Page:
  http://www.engr.csufresno.edu/~humberto/z80source.html

Official Tyrant Home Page:
  http://www.engr.csufresno.edu/~humberto/tyrant.html

E-mail:
  humberto at engr.csufresno.edu
***********************************************************

new topic     » goto parent     » topic index » view message » categorize

3. Re: fill function

That would be great.  I've been thinking about how to do it non-recursively
(my C friend says the recursion tends to cause the stack overflow).

thanks
noah

>
>
>
> I wrote a non recursive fill algorithm and a recursive one.  The
> recursive one was a litte faster but they were both REALLY SLOW (about 9
> seconds to fill the whole screen)
>
> If you want the slow non-recursive one (ha) I'll post it.
>
> later,
>
> -Humberto Yeverino Jr.
>
> "I kick ass for the Lord."
>
> ***********************************************************
> Home Page:
>   http://www.engr.csufresno.edu/~humberto/Home.html
>
> Ti Page:
>   http://www.engr.csufresno.edu/~humberto/tex.html
>
> z80 Source Page:
>   http://www.engr.csufresno.edu/~humberto/z80source.html
>
> Official Tyrant Home Page:
>   http://www.engr.csufresno.edu/~humberto/tyrant.html
>
> E-mail:
>   humberto at engr.csufresno.edu
> ***********************************************************
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu