Click here to Skip to main content
15,907,687 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why does notifyicon disappear when stop a service Pin
Colin Angus Mackay13-Jan-07 9:22
Colin Angus Mackay13-Jan-07 9:22 
GeneralRe: Why does notifyicon disappear when stop a service Pin
l.m.k13-Jan-07 22:12
l.m.k13-Jan-07 22:12 
QuestionHow to access .hlp file in C#.Net [modified] Pin
sjs4u12-Jan-07 23:07
sjs4u12-Jan-07 23:07 
AnswerRe: How to access .hlp file in C#.Net Pin
Stefan Troschuetz12-Jan-07 23:52
Stefan Troschuetz12-Jan-07 23:52 
Questionemerging cross circles Pin
hamadam2112-Jan-07 21:48
hamadam2112-Jan-07 21:48 
AnswerRe: emerging cross circles Pin
Christian Graus12-Jan-07 22:11
protectorChristian Graus12-Jan-07 22:11 
AnswerRe: emerging cross circles Pin
jk chan13-Jan-07 0:57
jk chan13-Jan-07 0:57 
AnswerRe: emerging cross circles Pin
Luc Pattyn13-Jan-07 9:19
sitebuilderLuc Pattyn13-Jan-07 9:19 
Two ideas:

1)
point is inside circle if (deltaX)^2 + (deltaY)&2 < radius^2
(deltaX is x difference between point and center of circle)

Similarly two circles intersect if (deltaX)^2+(deltaY)^2 < (rad1+rad2)^2
which is the cheapest way of saying distance between both centers is less than sum of both
radii.

In both cases there is no need to calculate a square root, which is rather expensive.

2)
I am not sure what you want to achieve exactly.
Maybe you want a white background, and N circles, each filled with its own color.
Areas covered by multiple circles would remain white.

If so, and performance not too important, you might create two nested for loops
(over x and y) so traversing all points, and test whether pixel is inside zero, one or more
circles (using first idea).

A first optimization would be to have only one for loop (varying y, so calculating one
"scanline" at a time), and for each scanline calculate the intersection points of that
line with each of the circles, sort these, then determine again inside zero, one or
more but now for each line segment.

Hope this is helpful

Smile | :)




Luc Pattyn

GeneralRe: emerging cross circles Pin
hamadam2114-Jan-07 10:36
hamadam2114-Jan-07 10:36 
GeneralRe: emerging cross circles Pin
Luc Pattyn14-Jan-07 13:00
sitebuilderLuc Pattyn14-Jan-07 13:00 
Questioni Want to create a virtual network for testing a Network monitoring system Pin
Junaid Kazi12-Jan-07 20:29
Junaid Kazi12-Jan-07 20:29 
AnswerRe: i Want to create a virtual network for testing a Network monitoring system Pin
JimmiKorn12-Jan-07 22:05
JimmiKorn12-Jan-07 22:05 
GeneralRe: i Want to create a virtual network for testing a Network monitoring system Pin
Junaid Kazi13-Jan-07 1:00
Junaid Kazi13-Jan-07 1:00 
AnswerRe: i Want to create a virtual network for testing a Network monitoring system Pin
Dave Kreskowiak13-Jan-07 5:40
mveDave Kreskowiak13-Jan-07 5:40 
Questionmasked textbox Pin
mnordesigner12-Jan-07 20:23
mnordesigner12-Jan-07 20:23 
AnswerRe: masked textbox Pin
Luc Pattyn12-Jan-07 20:57
sitebuilderLuc Pattyn12-Jan-07 20:57 
QuestionCustom user control for drawing chart Pin
cocoonwls12-Jan-07 18:06
cocoonwls12-Jan-07 18:06 
AnswerRe: Custom user control for drawing chart Pin
il_masacratore15-Jan-07 21:41
il_masacratore15-Jan-07 21:41 
GeneralRe: Custom user control for drawing chart Pin
cocoonwls17-Jan-07 23:25
cocoonwls17-Jan-07 23:25 
GeneralRe: Custom user control for drawing chart Pin
il_masacratore17-Jan-07 23:33
il_masacratore17-Jan-07 23:33 
QuestionHow do I detect a handler for a control? Pin
JoeRip12-Jan-07 17:28
JoeRip12-Jan-07 17:28 
AnswerRe: How do I detect a handler for a control? Pin
Luc Pattyn12-Jan-07 17:44
sitebuilderLuc Pattyn12-Jan-07 17:44 
GeneralRe: How do I detect a handler for a control? Pin
JoeRip12-Jan-07 17:54
JoeRip12-Jan-07 17:54 
GeneralRe: How do I detect a handler for a control? Pin
Luc Pattyn12-Jan-07 18:20
sitebuilderLuc Pattyn12-Jan-07 18:20 
AnswerRe: How do I detect a handler for a control? Pin
Mike Hankey12-Jan-07 19:17
mveMike Hankey12-Jan-07 19:17 

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.