Re: Store a solid unit Circle
- From: "Parag S. Chandakkar" <parag2489@xxxxxxxxx>
- Date: Thu, 29 Oct 2009 05:30:07 -0700 (PDT)
sorry there was a minor mistake in the program
http://www.mathworks.de/matlabcentral/newsreader/view_thread/164290
This thread describes how to store a solid UNIT circle numerically.
In
the 2nd post of it, he gives the following program
%%%%%%%%%%%%%
clc;
clear all;
nPixels = 101;
radius = 1;
xMin = -radius;
xMax = +radius;
[x,y] = meshgrid(linspace(xMin,xMax,nPixels));
unitCircle = sqrt(x.^2+y.^2) <= radius;
imagesc(unitCircle);axis square;
%%%%%%%%%%%%%
my question is why number of pixels are taken as 101?
If I take it as 501, I thought that circle should completely lie in
the rectangle(and not touch the rectangle, since circle would remain
unit circle, but size of rectangle will increase by 400 pixels)this
doesn't happen , so
why the no. of pixels are 101 and can I take it as some other value
and at the same time keep the circle as a unit circle?
Thank You.
.
- References:
- Store a solid unit Circle
- From: Parag S. Chandakkar
- Store a solid unit Circle
- Prev by Date: Re: Matlab to Excel
- Next by Date: Re: How to devid ethe image
- Previous by thread: Store a solid unit Circle
- Next by thread: glpk mex file 64 bit on linux OS
- Index(es):
Relevant Pages
|