Member_2_2394978
asked on
Drawing 'linked' circles
Hi All,
At the moment I am using http://www.mathworks.com/matlabcentral/fileexchange/2876 to draw many circles on one figure. The circles belong to many different classes, lets say 5, so i'm drawing each circle in a colour defining which class it comes from (see image before, just two classes here, so two colours).
What I want to do is some how link where they overlap, such like in image after. So where they overlap to remove the overlapping bits, but not if overlapped! Hopefully this will simply by, at current, very complicated plot!
Any suggestions?
Cheers
James
before.png
after.png
At the moment I am using http://www.mathworks.com/matlabcentral/fileexchange/2876 to draw many circles on one figure. The circles belong to many different classes, lets say 5, so i'm drawing each circle in a colour defining which class it comes from (see image before, just two classes here, so two colours).
What I want to do is some how link where they overlap, such like in image after. So where they overlap to remove the overlapping bits, but not if overlapped! Hopefully this will simply by, at current, very complicated plot!
Any suggestions?
Cheers
James
before.png
after.png
It seems to me that you could use
CreateEllipticRgn
http://msdn.microsoft.com/ en-us/libr ary/dd1834 96(VS.85). aspx
for each circle, then use Region API functions as CombineRgn
Region Functions
http://msdn.microsoft.com/ en-us/libr ary/dd1629 15(VS.85). aspx
or GDI+ Region functions such as Region::Intersect
Region Class
http://msdn.microsoft.com/ en-us/libr ary/ms5345 01(VS.85). aspx
to do the heavy lifting.
CreateEllipticRgn
http://msdn.microsoft.com/
for each circle, then use Region API functions as CombineRgn
Region Functions
http://msdn.microsoft.com/
or GDI+ Region functions such as Region::Intersect
Region Class
http://msdn.microsoft.com/
to do the heavy lifting.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Original file names were with underscores, not dashes. It get changed after upload. EE bug? Rename dashes to upderscores, especially for the function file.
ASKER
Thanks, I shall have a look at all suggestions and get back to you today :)
ASKER
Wonderful thank you.
If you are using the CIRCLE function to draw the circles, I suppose you still have variables like radius, centers coordinates, axes handles, right? Please confirm and I will send you a code.