Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: create grayscale star sign
Date: Tue, 11 Aug 2009 16:20:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <h5s5o1$r5f$1@fred.mathworks.com>
References: <h2n7vl$5th$1@fred.mathworks.com> <0b84ba91-b15b-4dc1-9615-e9dff36570d8@s31g2000yqs.googlegroups.com> <9448389f-33c2-4239-808f-785b7f809d93@c2g2000yqi.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1250007617 27823 172.30.248.35 (11 Aug 2009 16:20:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 11 Aug 2009 16:20:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1917726
Xref: news.mathworks.com comp.soft-sys.matlab:562441


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <9448389f-33c2-4239-808f-785b7f809d93@c2g2000yqi.googlegroups.com>...
> On Aug 11, 8:09?am, "M. David " <M.Da...@gmail.com> wrote:
> > "M. David " <M.Da...@gmail.com> wrote in message <h5rmif$sg...@fred.mathworks.com>...
> > > dear ImageAnalyst, thanks for your response.
> > > the peaks must not be sharp. ?And, I will paint the inside of the shape with different color, and outside of the shape with different color. Also, the color of the shape itself must be with different color. How to do this?
> >
> > I mean, there should not be any sharp corner. Deeps and the peaks should not be sharp- Hide quoted text -
> >
> ----------------------------------------------------------------------------------------------------------
> M. David:
> Then just create an image with sharp vertexes, blur it, and then find
> the new, smoother boundaries with bwboundaries.  Save them to a mat
> file, and then you can recall them, translate them if necessary, and
> plot them as you need to.
> 
> Check out the patch() function if you want to fill the region.
> Good luck,
> ImageAnalyst

Thanks a lot ImageAnalyst,

I am trying to change theta values of the following codes to obtain more oval corners instead of the sharp corners. Could you please examine the following codes:

t = (-1/4:1/28:3/4)*2*pi;
r1 = 44; r2 = 19;
r = (r1+r2)/2 + (r1-r2)/2*(-1).^[0:28];
x2 = r.*cos(t);
y2 = r.*sin(t);
plot(x2,y2,'b')

what should be the t values?
best regards