Results 1 to 4 of 4

Thread: grass fire algorithm

  1. #1
    Member Newbie
    Join Date
    Mar 2002
    Location
    singapore
    Posts
    32

    grass fire algorithm

    can some one tell me how a grass fire algorithm works and how to use it for selecting neighboring pixels of a chosen pixel in an image ???

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: grass fire algorithm

    Essentially you start by selecting one pixel in the image. Then for each neighbouring pixel (up to eight) you test if that pixel is the same as the one selected. If so you also select that pixel and repeat the test on the new pixel's neighbours. You repeat this for each new pixel selected until there are no more selectable pixels. You can use this for exact colour matches, or you can use a tolerance level that selects pixels that only differ slightly to the one selected.

  3. #3
    Member Newbie
    Join Date
    Mar 2002
    Location
    singapore
    Posts
    32

    Re: grass fire algorithm

    thats what i exactly need for my project now... i gotto select a pixel and then set a tolerance level to select all the neghboring pixels of a similar(not same) color value.
    can u give me a typical code for the algorithm,pls ???

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: grass fire algorithm

    I know the theory but never tried to code it. Hopefully someone else can help. If not try google again.

Similar Threads

  1. Grass shader
    By someRand in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-27-2018, 11:28 AM
  2. 3D grass decal shader
    By rks___ in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-19-2017, 01:50 AM
  3. Grass animation
    By Satya Ramji in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-20-2012, 10:38 AM
  4. Grass Rendering.
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-14-2004, 12:49 AM
  5. grass rendering tutorials anyone?
    By Jnz86 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-06-2004, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean