Click here to Skip to main content
15,885,278 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Angle Algorithm Pin
CPallini4-Apr-07 1:46
mveCPallini4-Apr-07 1:46 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 2:06
cp98764-Apr-07 2:06 
GeneralRe: Angle Algorithm Pin
Dan Neely4-Apr-07 2:11
Dan Neely4-Apr-07 2:11 
GeneralRe: Angle Algorithm Pin
CPallini4-Apr-07 4:04
mveCPallini4-Apr-07 4:04 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 18:09
cp98764-Apr-07 18:09 
GeneralRe: Angle Algorithm Pin
CPallini4-Apr-07 21:05
mveCPallini4-Apr-07 21:05 
GeneralRe: Angle Algorithm Pin
cp98764-Apr-07 21:53
cp98764-Apr-07 21:53 
QuestionColor generation algorithm Pin
roel_v3-Apr-07 22:20
roel_v3-Apr-07 22:20 
Here's my problem: I want to display a pie chart (using the awesome Zedgraph library available on CodeProject), but I don't know in advance how many slices it will have. It can be 5, it can be 25. Of course, I could define a hundred or so color constants, but that is not very elegant.

I've searched on Google for a color generation algorithm that would generate a random set of reasonably contrasting colors, but I can't find anything.

Anybody has seen anything like this? If you have or know of some source code, in any language, that would be great, C# preferred. For an example of how it should work, see Excel, no matter how many slices you add (within reason), it generates different colors for each slice.

Thanks,

Roel
AnswerRe: Color generation algorithm Pin
Nathan Addy6-Apr-07 1:45
Nathan Addy6-Apr-07 1:45 
GeneralRe: Color generation algorithm Pin
roel_v7-Apr-07 6:56
roel_v7-Apr-07 6:56 
QuestionReading text file problem with casting to double Pin
kelvinic3-Apr-07 18:28
kelvinic3-Apr-07 18:28 
AnswerRe: Reading text file problem with casting to double Pin
cp98763-Apr-07 18:58
cp98763-Apr-07 18:58 
AnswerRe: Reading text file problem with casting to double Pin
cjengler4-Apr-07 2:09
cjengler4-Apr-07 2:09 
GeneralRe: Reading text file problem with casting to double Pin
kelvinic4-Apr-07 2:17
kelvinic4-Apr-07 2:17 
GeneralRe: Reading text file problem with casting to double Pin
cjengler4-Apr-07 2:36
cjengler4-Apr-07 2:36 
QuestionPermutations of an election result Pin
Colin Angus Mackay31-Mar-07 10:32
Colin Angus Mackay31-Mar-07 10:32 
AnswerRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 11:05
sitebuilderLuc Pattyn31-Mar-07 11:05 
GeneralRe: Permutations of an election result Pin
Colin Angus Mackay31-Mar-07 11:27
Colin Angus Mackay31-Mar-07 11:27 
GeneralRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 11:47
sitebuilderLuc Pattyn31-Mar-07 11:47 
GeneralRe: Permutations of an election result Pin
Colin Angus Mackay31-Mar-07 23:03
Colin Angus Mackay31-Mar-07 23:03 
GeneralRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 23:33
sitebuilderLuc Pattyn31-Mar-07 23:33 
GeneralRe: Permutations of an election result Pin
Luc Pattyn31-Mar-07 12:55
sitebuilderLuc Pattyn31-Mar-07 12:55 
QuestionRe: Permutations of an election result Pin
David Crow4-Apr-07 4:11
David Crow4-Apr-07 4:11 
Questionmatlab a function in m-file Pin
akira3231-Mar-07 2:13
akira3231-Mar-07 2:13 
AnswerRe: matlab a function in m-file Pin
rbuchana31-Mar-07 9:48
rbuchana31-Mar-07 9:48 

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.