Click here to Skip to main content
15,887,350 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Detecting Analog (A/D) Pulses using Software Pin
JohnnyG13-Sep-08 0:27
JohnnyG13-Sep-08 0:27 
GeneralRe: Detecting Analog (A/D) Pulses using Software Pin
cp987613-Sep-08 2:40
cp987613-Sep-08 2:40 
GeneralRe: Detecting Analog (A/D) Pulses using Software Pin
JohnnyG13-Sep-08 5:36
JohnnyG13-Sep-08 5:36 
AnswerRe: Detecting Analog (A/D) Pulses using Software Pin
Leslie Sanford13-Sep-08 12:04
Leslie Sanford13-Sep-08 12:04 
GeneralRe: Detecting Analog (A/D) Pulses using Software Pin
73Zeppelin18-Sep-08 0:02
73Zeppelin18-Sep-08 0:02 
GeneralRe: Detecting Analog (A/D) Pulses using Software Pin
cp987618-Sep-08 13:30
cp987618-Sep-08 13:30 
Generalhelp regarding the flood fill algorithm Pin
niconicx11-Sep-08 13:30
niconicx11-Sep-08 13:30 
GeneralRe: help regarding the flood fill algorithm Pin
Chris Losinger11-Sep-08 14:54
professionalChris Losinger11-Sep-08 14:54 
here's the general algorithm, in pseudo-code:

startpoint = start point of fill
startcolor = color of pixel at startpoint

fill(startpoint, fillcolor, startcolor);

fill(point p, color fillcolor, color startcolor)
{
  if (p.color != startcolor)
  {
     p.color = fillcolor;

     // fill the surrounding four pixels
     fill(point(p.x+1, p.y), fillcolor, startcolor);
     fill(point(p.x+1, p.y+1), fillcolor, startcolor);
     fill(point(p.x-1, p.y), fillcolor, startcolor);
     fill(point(p.x-1, p.y-1), fillcolor, startcolor);
  }
}


pro-tip:
this is recursive, which can be a problem for large fills. but you can eliminate the recursion using a stack.


GeneralRe: help regarding the flood fill algorithm Pin
niconicx11-Sep-08 18:15
niconicx11-Sep-08 18:15 
Questionresearching Pin
nelsonpaixao9-Sep-08 14:53
nelsonpaixao9-Sep-08 14:53 
AnswerRe: researching Pin
Paul Conrad10-Sep-08 15:19
professionalPaul Conrad10-Sep-08 15:19 
GeneralRe: researching Pin
nelsonpaixao11-Sep-08 14:19
nelsonpaixao11-Sep-08 14:19 
Questionhigh-contrast color array generation Pin
followait4-Sep-08 23:25
followait4-Sep-08 23:25 
AnswerRe: high-contrast color array generation Pin
Alan Balkany8-Sep-08 5:51
Alan Balkany8-Sep-08 5:51 
GeneralRe: high-contrast color array generation Pin
uusheikh10-Sep-08 15:00
uusheikh10-Sep-08 15:00 
AnswerRe: high-contrast color array generation Pin
Russell'12-Sep-08 1:23
Russell'12-Sep-08 1:23 
QuestionSetting up a shared key logon to a website Pin
1stfreedom3-Sep-08 6:55
1stfreedom3-Sep-08 6:55 
AnswerRe: Setting up a shared key logon to a website Pin
Alan Balkany8-Sep-08 6:02
Alan Balkany8-Sep-08 6:02 
QuestionEstimating time of completion of a data migration process Pin
tufkap1-Sep-08 1:22
tufkap1-Sep-08 1:22 
AnswerRe: Estimating time of completion of a data migration process Pin
Tim Craig1-Sep-08 19:27
Tim Craig1-Sep-08 19:27 
GeneralRe: Estimating time of completion of a data migration process Pin
tufkap2-Sep-08 4:54
tufkap2-Sep-08 4:54 
AnswerRe: Estimating time of completion of a data migration process Pin
Alan Balkany8-Sep-08 6:07
Alan Balkany8-Sep-08 6:07 
GeneralRe: Estimating time of completion of a data migration process Pin
tufkap9-Sep-08 0:31
tufkap9-Sep-08 0:31 
QuestionEuqtion of spline thru n points Pin
raesa31-Aug-08 23:13
raesa31-Aug-08 23:13 
AnswerRe: Euqtion of spline thru n points Pin
Tim Craig1-Sep-08 19:56
Tim Craig1-Sep-08 19:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.