Re: Inscribed circle [message #83713 is a reply to message #83702] |
Wed, 27 March 2013 06:40   |
arayamelo.pablo
Messages: 4 Registered: March 2013
|
Junior Member |
|
|
On Wednesday, March 27, 2013 2:34:29 PM UTC+1, rr...@stsci.edu wrote:
> On Wednesday, March 27, 2013 6:32:49 AM UTC-4, arayame...@gmail.com wrote:
>
>> Dear all,
>
>>
>
>>
>
>>
>
>> maybe this has been already posted, but I can not seem to find it.
>
>>
>
>>
>
>>
>
>> I have a contour plot, and I draw a circle on it (region of interest). Is there a way to blank off the area of the square outside of the circle (I though polyfill, but I can just manage squared polygons) or to just make the contour of the circle (region) of interest?
>
>>
>
>>
>
>>
>
>> Thanks!
>
>>
>
>>
>
>>
>
>> PS: the contour data is created through triangulate and trigrid.
>
>
>
> What do you mean "blank off the area?" Is your contour plot made with black lines on a white background and you want to draw a white square? If so, then yes. Polyfill is the easiest way. If you're having trouble, it's almost certainly with either the coordinates you're giving it or their order. Make sure to check the /normal, /data, or /device settings to verify that your data are in the right units. Then check that the order of the polyfill data is correct:
>
>
>
> x=[left,left,right,right]
>
> y=[top,bottom,bottom,top]
>
> polyfill,x,y
>
>
>
> That's a basic idea to draw a rectangle, the trick is to find the right values of top, bottom, right, and left. It shouldn't be too tough, but you have to be aware of the units (device vs. data vs. normal).
>
>
>
> -Russell
Thanks Russell.
What I mean with "blank off the area", I mean to fill it with white color. The problem I get with using polyfill in this particular problem is that I want to fill a "waxing moon" area-shape, and with polyfill I just cover rectangles.
|
|
|