Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to find the points inside a curvature shape

Subject: how to find the points inside a curvature shape

From: Tinith

Date: 23 Jan, 2013 16:31:08

Message: 1 of 5

Hi, i have a polygon (e.g: rectangle) where it has equally spaced points (co-ordinates are known) inside it. then i need to draw a curvature shape (e.g: clothoid cuve, ellipse) inside this polygon. what i want to achieve is to find the co-ordinates of the points which is covered by the curvature shape.

Subject: how to find the points inside a curvature shape

From: Roger Stafford

Date: 23 Jan, 2013 18:12:08

Message: 2 of 5

"Tinith " <snoopcat@live.com> wrote in message <kdp38c$d9g$1@newscl01ah.mathworks.com>...
> Hi, i have a polygon (e.g: rectangle) where it has equally spaced points (co-ordinates are known) inside it. then i need to draw a curvature shape (e.g: clothoid cuve, ellipse) inside this polygon. what i want to achieve is to find the co-ordinates of the points which is covered by the curvature shape.
- - - - - - - - - -
  If by "shape" you mean the region enclosed by a closed curve, then use the inequality available from the equation of that curve. For an ellipse with equation

 A*x^2+B*x*y+C*y^2+D*x+E*y+F = 0

you would test your points with the inequality

 sign(A)*(A*x^2+B*x*y+C*y^2+D*x+E*y+F) <= 0

  With a clothoid curve (cornu or Euler spiral), which is not a closed curve, I have no idea what it would be that you want. It has no inside or outside, only points along an infinitely thin curve. What would you call its "shape"?

Roger Stafford

Subject: how to find the points inside a curvature shape

From: Tinith

Date: 24 Jan, 2013 00:33:09

Message: 3 of 5

"Roger Stafford" wrote in message <kdp95o$8k1$1@newscl01ah.mathworks.com>...
> "Tinith " <snoopcat@live.com> wrote in message <kdp38c$d9g$1@newscl01ah.mathworks.com>...
> > Hi, i have a polygon (e.g: rectangle) where it has equally spaced points (co-ordinates are known) inside it. then i need to draw a curvature shape (e.g: clothoid cuve, ellipse) inside this polygon. what i want to achieve is to find the co-ordinates of the points which is covered by the curvature shape.
> - - - - - - - - - -
> If by "shape" you mean the region enclosed by a closed curve, then use the inequality available from the equation of that curve. For an ellipse with equation
>
> A*x^2+B*x*y+C*y^2+D*x+E*y+F = 0
>
> you would test your points with the inequality
>
> sign(A)*(A*x^2+B*x*y+C*y^2+D*x+E*y+F) <= 0
>
> With a clothoid curve (cornu or Euler spiral), which is not a closed curve, I have no idea what it would be that you want. It has no inside or outside, only points along an infinitely thin curve. What would you call its "shape"?
>
> Roger Stafford


I am trying to generate a shape which looks like an antenna lobe. It is similar to a ellipse. But not perfect as an ellipse.

Subject: how to find the points inside a curvature shape

From: Roger Stafford

Date: 24 Jan, 2013 03:38:08

Message: 4 of 5

"Tinith " <snoopcat@live.com> wrote in message <kdpvg5$4gt$1@newscl01ah.mathworks.com>...
> I am trying to generate a shape which looks like an antenna lobe. It is similar to a ellipse. But not perfect as an ellipse.
- - - - - - - - -
  In that case the answer to your question will depend on just how you generate your shape. How do you generate it?

Roger Stafford

Subject: how to find the points inside a curvature shape

From: Tinith

Date: 24 Jan, 2013 11:54:07

Message: 5 of 5

"Roger Stafford" wrote in message <kdqab0$a90$1@newscl01ah.mathworks.com>...
> "Tinith " <snoopcat@live.com> wrote in message <kdpvg5$4gt$1@newscl01ah.mathworks.com>...
> > I am trying to generate a shape which looks like an antenna lobe. It is similar to a ellipse. But not perfect as an ellipse.
> - - - - - - - - -
> In that case the answer to your question will depend on just how you generate your shape. How do you generate it?
>
> Roger Stafford


at the moment i am generating the beam patterns using DIGITAL BEAMFORMING
by King Fisher, which can be found in: http://www.mathworks.co.uk/matlabcentral/fileexchange/13864-digital-beamforming

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us