Click here to Skip to main content
15,912,756 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Magics of 4 Pin
Maximilien26-Jul-07 9:27
Maximilien26-Jul-07 9:27 
AnswerRe: Magics of 4 Pin
David Crow26-Jul-07 10:50
David Crow26-Jul-07 10:50 
AnswerRe: Magics of 4 Pin
CPallini26-Jul-07 12:18
mveCPallini26-Jul-07 12:18 
AnswerRe: Magics of 4 Pin
cp987626-Jul-07 13:32
cp987626-Jul-07 13:32 
GeneralRe: Magics of 4 Pin
shiraztk27-Jul-07 4:00
shiraztk27-Jul-07 4:00 
GeneralRe: Magics of 4 Pin
Paul Conrad27-Jul-07 19:50
professionalPaul Conrad27-Jul-07 19:50 
QuestionLinear line Pin
flippydeflippydebop25-Jul-07 9:15
flippydeflippydebop25-Jul-07 9:15 
AnswerRe: Linear line Pin
Dan Neely25-Jul-07 9:35
Dan Neely25-Jul-07 9:35 
EDIT: Not sure if this is needed or not: if the slope between x_1,y_1 and x_5,y_5 is greater than 1, swap the x and y values for each coordinate pair. This swap is needed to keep the delta value in the next step smaller than 1.

Create a function for the line y = f(x) using points 1 and 5. Then of each of the 3 points in the middle calculate f(x_n), if ABS(f(x_n) - y_n) < 1, then x_n,y_n is on on the line (give or take the rounding error from forcing integral values).





--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

GeneralRe: Linear line Pin
Luc Pattyn25-Jul-07 11:14
sitebuilderLuc Pattyn25-Jul-07 11:14 
GeneralRe: Linear line Pin
flippydeflippydebop25-Jul-07 20:30
flippydeflippydebop25-Jul-07 20:30 
GeneralRe: Linear line Pin
flippydeflippydebop25-Jul-07 20:26
flippydeflippydebop25-Jul-07 20:26 
GeneralRe: Linear line Pin
Dan Neely26-Jul-07 2:19
Dan Neely26-Jul-07 2:19 
GeneralRe: Linear line Pin
flippydeflippydebop26-Jul-07 2:25
flippydeflippydebop26-Jul-07 2:25 
AnswerRe: Linear line Pin
CPallini25-Jul-07 11:12
mveCPallini25-Jul-07 11:12 
GeneralRe: Linear line Pin
Luc Pattyn25-Jul-07 11:16
sitebuilderLuc Pattyn25-Jul-07 11:16 
GeneralRe: Linear line Pin
CPallini25-Jul-07 11:24
mveCPallini25-Jul-07 11:24 
AnswerRe: Linear line Pin
Habib Ahmed Bhutto30-Jul-07 13:24
Habib Ahmed Bhutto30-Jul-07 13:24 
AnswerRe: Linear line Pin
Habib Ahmed Bhutto30-Jul-07 13:32
Habib Ahmed Bhutto30-Jul-07 13:32 
GeneralRe: Linear line Pin
Dan Neely31-Jul-07 2:09
Dan Neely31-Jul-07 2:09 
AnswerRe: Linear line Pin
Russell'3-Aug-07 4:19
Russell'3-Aug-07 4:19 
GeneralRe: Linear line Pin
Russell'3-Aug-07 4:20
Russell'3-Aug-07 4:20 
AnswerRe: Linear line Pin
stevepqr7-Aug-07 6:02
stevepqr7-Aug-07 6:02 
Questionimages Pin
zainab ibrahim24-Jul-07 22:47
zainab ibrahim24-Jul-07 22:47 
AnswerRe: images Pin
shiraztk26-Jul-07 9:24
shiraztk26-Jul-07 9:24 
QuestionFinding a point on a circle [modified] Pin
max2929720-Jul-07 12:36
max2929720-Jul-07 12:36 

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.