<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164495</link>
    <title>MATLAB Central Newsreader - Drawing a solid circle pixel using x,y coordinate and radius</title>
    <description>Feed for thread: Drawing a solid circle pixel using x,y coordinate and radius</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 25 Feb 2008 18:43:01 -0500</pubDate>
      <title>Drawing a solid circle pixel using x,y coordinate and radius</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164495#417217</link>
      <author>Phil Au</author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
I was having difficulties in creating a solid circle shape &lt;br&gt;
pixel with x and y coordinates, and radius..&lt;br&gt;
&lt;br&gt;
I kind of know that the radius must be at least more than 3 &lt;br&gt;
pixels size to be able to show the shape of the circle, but &lt;br&gt;
I dont know where to start to write the code..&lt;br&gt;
&lt;br&gt;
Many thanks </description>
    </item>
    <item>
      <pubDate>Mon, 25 Feb 2008 22:08:05 -0500</pubDate>
      <title>Re: Drawing a solid circle pixel using x,y coordinate and radius</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164495#417251</link>
      <author>Ian Clarkson</author>
      <description>&quot;Phil Au&quot; &amp;lt;philipawt@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fpv27l$p8s$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I was having difficulties in creating a solid circle &lt;br&gt;
shape &lt;br&gt;
&amp;gt; pixel with x and y coordinates, and radius..&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I kind of know that the radius must be at least more than &lt;br&gt;
3 &lt;br&gt;
&amp;gt; pixels size to be able to show the shape of the circle, &lt;br&gt;
but &lt;br&gt;
&amp;gt; I dont know where to start to write the code..&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Many thanks &lt;br&gt;
&lt;br&gt;
i could have sworn this got answered a few days ago. check &lt;br&gt;
around the forum a bit more. it involved calculating the &lt;br&gt;
radius out from the center and just turning the pixel &quot;on&quot;, &lt;br&gt;
as i recall.</description>
    </item>
    <item>
      <pubDate>Mon, 25 Feb 2008 22:45:06 -0500</pubDate>
      <title>Re: Drawing a solid circle pixel using x,y coordinate and radius</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164495#417261</link>
      <author>Phil Au</author>
      <description>&quot;Ian Clarkson&quot; &amp;lt;ian.clarkson@gesturetek.com&amp;gt; wrote in &lt;br&gt;
message &amp;lt;fpve85$i5i$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Phil Au&quot; &amp;lt;philipawt@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;fpv27l$p8s$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi all,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I was having difficulties in creating a solid circle &lt;br&gt;
&amp;gt; shape &lt;br&gt;
&amp;gt; &amp;gt; pixel with x and y coordinates, and radius..&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I kind of know that the radius must be at least more &lt;br&gt;
than &lt;br&gt;
&amp;gt; 3 &lt;br&gt;
&amp;gt; &amp;gt; pixels size to be able to show the shape of the circle, &lt;br&gt;
&amp;gt; but &lt;br&gt;
&amp;gt; &amp;gt; I dont know where to start to write the code..&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Many thanks &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; i could have sworn this got answered a few days ago. &lt;br&gt;
check &lt;br&gt;
&amp;gt; around the forum a bit more. it involved calculating the &lt;br&gt;
&amp;gt; radius out from the center and just turning the &lt;br&gt;
pixel &quot;on&quot;, &lt;br&gt;
&amp;gt; as i recall.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thx for your advice, But I was wondering how I adapt this &lt;br&gt;
to a reference frame in an image ? i.e. paint a solid &lt;br&gt;
cirlce in pixel(x,y)?</description>
    </item>
    <item>
      <pubDate>Tue, 26 Feb 2008 01:06:41 -0500</pubDate>
      <title>Re: Drawing a solid circle pixel using x,y coordinate and radius</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164495#417277</link>
      <author>ImageAnalyst</author>
      <description>On Feb 25, 5:45=A0pm, &quot;Phil Au&quot; &amp;lt;philip...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;Ian Clarkson&quot; &amp;lt;ian.clark...@gesturetek.com&amp;gt; wrote in&lt;br&gt;
&amp;gt; message &amp;lt;fpve85$i5...@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &quot;Phil Au&quot; &amp;lt;philip...@gmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;fpv27l$p8...@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I was having difficulties in creating a solid circle&lt;br&gt;
&amp;gt; &amp;gt; shape&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; pixel with x and y coordinates, and radius..&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I kind of know that the radius must be at least more&lt;br&gt;
&amp;gt; than&lt;br&gt;
&amp;gt; &amp;gt; 3&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; pixels size to be able to show the shape of the circle,&lt;br&gt;
&amp;gt; &amp;gt; but&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I dont know where to start to write the code..&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Many thanks&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; i could have sworn this got answered a few days ago.&lt;br&gt;
&amp;gt; check&lt;br&gt;
&amp;gt; &amp;gt; around the forum a bit more. it involved calculating the&lt;br&gt;
&amp;gt; &amp;gt; radius out from the center and just turning the&lt;br&gt;
&amp;gt; pixel &quot;on&quot;,&lt;br&gt;
&amp;gt; &amp;gt; as i recall.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thx for your advice, But I was wondering how I adapt this&lt;br&gt;
&amp;gt; to a reference frame in an image ? i.e. paint a solid&lt;br&gt;
&amp;gt; cirlce in pixel(x,y)?- Hide quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=&lt;br&gt;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D&lt;br&gt;
Let me know if you're able to adapt this simple demo code I wrote for&lt;br&gt;
you to your situation:&lt;br&gt;
%=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=&lt;br&gt;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=&lt;br&gt;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D&lt;br&gt;
% Make a binary image containing two overlapping circular objects.&lt;br&gt;
imageSizeX =3D 128;&lt;br&gt;
imageSizeY =3D 200;&lt;br&gt;
centerX =3D 64;&lt;br&gt;
centerY =3D 90;&lt;br&gt;
radius =3D 10;&lt;br&gt;
[x,y] =3D meshgrid(1:imageSizeY, 1:imageSizeX);&lt;br&gt;
binaryImage =3D sqrt((x-centerX).^2 + (y-centerY).^2) &amp;lt;=3D radius;&lt;br&gt;
figure;&lt;br&gt;
imshow(binaryImage, []);&lt;br&gt;
title('bw Circle');&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst</description>
    </item>
  </channel>
</rss>

