Click here to Skip to main content
15,890,947 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Finding a point on a circle Pin
Luc Pattyn21-Jul-07 6:06
sitebuilderLuc Pattyn21-Jul-07 6:06 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 6:11
professionalPaul Conrad21-Jul-07 6:11 
GeneralRe: Finding a point on a circle Pin
max2929721-Jul-07 16:31
max2929721-Jul-07 16:31 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 16:53
professionalPaul Conrad21-Jul-07 16:53 
GeneralRe: Finding a point on a circle Pin
max2929721-Jul-07 17:52
max2929721-Jul-07 17:52 
GeneralRe: Finding a point on a circle Pin
Paul Conrad21-Jul-07 18:01
professionalPaul Conrad21-Jul-07 18:01 
QuestionRe: Finding a point on a circle Pin
David Crow26-Jul-07 10:53
David Crow26-Jul-07 10:53 
QuestionColor Ranges Pin
Malcolm Smart20-Jul-07 5:29
Malcolm Smart20-Jul-07 5:29 
Hi
I am monitoring CPU performance and disaplying it in a colour ('cos we don't care about the poor sighted where I work!).

0% = Green.
100% = Red.

and anywhere in between should be a mixed shade of these two. I tried setting the mid point as yellow, so:-

RGB

0% 00,255,00
50% 255,255,00
100% 255,00,00

formula for this was

n < 50 : r = n * 5, g = 255 , b = 0;
n >=50 : r = 255 , g = (255-((n-50) * 5)) , b = 0;

near enough, and I could handle the maths, but the results looked ****. The green was going lighter as it headed towards yellow, not darker (redder?). The type of affect i am after is best shown in Microsoft Word, Gradient fill, where you select two colours, the first green, the second red.

(Now if Luc answers this, he might as well have written the whole class for me!!)

Cheers





"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

AnswerRe: Color Ranges Pin
Luc Pattyn20-Jul-07 5:45
sitebuilderLuc Pattyn20-Jul-07 5:45 
GeneralRe: Color Ranges Pin
Malcolm Smart20-Jul-07 10:37
Malcolm Smart20-Jul-07 10:37 
GeneralRe: Color Ranges Pin
Paul Conrad20-Jul-07 10:40
professionalPaul Conrad20-Jul-07 10:40 
GeneralRe: Color Ranges Pin
Malcolm Smart20-Jul-07 11:22
Malcolm Smart20-Jul-07 11:22 
GeneralRe: Color Ranges Pin
Paul Conrad20-Jul-07 11:27
professionalPaul Conrad20-Jul-07 11:27 
GeneralRe: Color Ranges Pin
Luc Pattyn20-Jul-07 15:42
sitebuilderLuc Pattyn20-Jul-07 15:42 
AnswerRe: Color Ranges Pin
CPallini20-Jul-07 11:33
mveCPallini20-Jul-07 11:33 
GeneralRe: Color Ranges Pin
Luc Pattyn21-Jul-07 3:49
sitebuilderLuc Pattyn21-Jul-07 3:49 
GeneralRe: Color Ranges Pin
Malcolm Smart21-Jul-07 3:58
Malcolm Smart21-Jul-07 3:58 
GeneralRe: Color Ranges Pin
Luc Pattyn21-Jul-07 4:03
sitebuilderLuc Pattyn21-Jul-07 4:03 
GeneralRe: Color Ranges Pin
CPallini21-Jul-07 10:14
mveCPallini21-Jul-07 10:14 
GeneralRe: Color Ranges Pin
Malcolm Smart22-Jul-07 21:20
Malcolm Smart22-Jul-07 21:20 
GeneralRe: Color Ranges Pin
CPallini22-Jul-07 21:28
mveCPallini22-Jul-07 21:28 
GeneralRe: Color Ranges Pin
Malcolm Smart22-Jul-07 23:33
Malcolm Smart22-Jul-07 23:33 
GeneralRe: Color Ranges Pin
CPallini22-Jul-07 23:41
mveCPallini22-Jul-07 23:41 
Questionfinding all recurring elements in an array Pin
Rocky#17-Jul-07 6:40
Rocky#17-Jul-07 6:40 
AnswerRe: finding all recurring elements in an array Pin
El Corazon17-Jul-07 6:56
El Corazon17-Jul-07 6: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.