help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does command fill exactly return?


From: Ben Abbott
Subject: Re: What does command fill exactly return?
Date: Thu, 24 Jun 2010 07:41:54 -0400

On Jun 23, 2010, at 5:54 AM, sd83 wrote:

> Dear all, 
> 
> I'm working with curves and I have this problem: I have sampled closed
> curves and I want to find the interior part of them. I have done some
> experiments using fill command but I haven't find what I'm looking for. I
> try to explain you the problems that I have find by examples.
> 
> Let 
> t=[0:1/100:2*pi] 
> and
> (cos(t),sin(t)) the unit circle.
> If I run 
> fill(cos(t),sin(t)); 
> it returns the plot of the circle with the interior part colored and it's
> ok, but if I run   
> fill(cos(2*t),sin(2*t)); 
> it returns only the plot of the cicle without the interior part colored.
> Why? For my purpose (cos(t),sin(t)) and (cos(2*t),sin(2*t)) have the same
> interior part. 
> I have noted that if I have a self intersect curve like two circles with no
> empty intersection (but not only a point) command fill returns the plot of
> the curve but the intersection of the circles is not colored. Why? For my
> purpose the interior part of the two circles is the union of the internal
> parts of them and not this union wthout the intersection. 
> How can I solve my problem? Is fill the best command I can run becouse of my
> purpose? 
> 
> thank you

I tried the following in Matlab

>> fill(cos(t),sin(t),'r')

The line above produced a circle filled with red and a black edge color.

The line below produced an empty circle with a black edge color.

>> fill(cos(2*t),sin(2*t),'r')

I haven't looked at the detail, but I'd guess this respects the patch object. 
Replacing "fill(...)" with "patch(...)" gives the same result for me.

Ben







reply via email to

[Prev in Thread] Current Thread [Next in Thread]