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: Moo
Subject: Re: What does command fill exactly return?
Date: Thu, 24 Jun 2010 11:17:43 +0200

Since noone else has replied - I don't know what it does, but we can try to reverse-engineer what it does.  I tried doing the same thing, but using sin(3*t) and cos(3*t), which resulted in a filled circle.  Doing sin(4*t) and cos(4*t) again gives a blank circle.  My best guess is that it must do some sort of "line integration" so to speak, since they correspond to an even number of revolutions of the circle.  The rule looks to be either: if a region is currently filled, unfill it, and vice versa.

As an experiment, (currently I don't have access to octave), try to do the same thing with abs(cos(2*t)) and abs(sin(2*t)) and see if it is filled or not.

For a pretty picture, try doing the same with cos(19*t) and sin(17*t) (or any other two large primes).

On Wed, Jun 23, 2010 at 11:54 AM, sd83 <address@hidden> 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
--
View this message in context: http://octave.1599824.n4.nabble.com/What-does-command-fill-exactly-return-tp2265356p2265356.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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