Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: how to find the length of diagonal

Subject: how to find the length of diagonal

From: Ashwini Deshpande

Date: 04 Jul, 2008 09:08:03

Message: 1 of 15

Hai,

i have 3 points on a plane, whose positions are fixed. and
one arbitrary point, it's position can vary.

i have to form a quadrilateral by making use of these 4
points , it may form concave or convex quadrilateral.

from this data one point is clear that 2 sides and 1
diagonal length are fixed. and i want to calculate the
length of another diagonal.

how do i do it??

thanks !!
Ashwini

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 04 Jul, 2008 09:27:02

Message: 2 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g4kp9i$bd4$1@fred.mathworks.com>...
> Hai,
>
> i have 3 points on a plane, whose positions are fixed. and
> one arbitrary point, it's position can vary.
>
> i have to form a quadrilateral by making use of these 4
> points , it may form concave or convex quadrilateral.
>
> from this data one point is clear that 2 sides and 1
> diagonal length are fixed. and i want to calculate the
> length of another diagonal.
>
> how do i do it??
>
> thanks !!
> Ashwini
>
Hi Ashwini,

This does not seems to be a matlab question !!hehe

Anyways without any other constrained you can not find the
length of other diagonal.
Just an example :
say fixed points are (0,0),(0,1),(1,0)
arbitary point (1,1) length of diagonal = sqrt(2)
arbitary point (1,2) length of diagonal = sqrt(5)

So in order to find the diagonal length there should be
other constrained.

with reagrds,
Nitin

Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 04 Jul, 2008 09:43:02

Message: 3 of 15

"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g4kqd6$l7n$1@fred.mathworks.com>...
> "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> message <g4kp9i$bd4$1@fred.mathworks.com>...
> > Hai,
> >
> > i have 3 points on a plane, whose positions are fixed. and
> > one arbitrary point, it's position can vary.
> >
> > i have to form a quadrilateral by making use of these 4
> > points , it may form concave or convex quadrilateral.
> >
> > from this data one point is clear that 2 sides and 1
> > diagonal length are fixed. and i want to calculate the
> > length of another diagonal.
> >
> > how do i do it??
> >
> > thanks !!
> > Ashwini
> >
> Hi Ashwini,
>
> This does not seems to be a matlab question !!hehe
>
> Anyways without any other constrained you can not find the
> length of other diagonal.
> Just an example :
> say fixed points are (0,0),(0,1),(1,0)
> arbitary point (1,1) length of diagonal = sqrt(2)
> arbitary point (1,2) length of diagonal = sqrt(5)
>
> So in order to find the diagonal length there should be
> other constrained.
>
> with reagrds,
> Nitin

thanks for ur replay..

its true that it is not pure matlab question .. but i was
searching for it since 3-4 days .. so thought somebody in
this forum must be having some idea ...

Now come to the point,
it may for concave or convex quadrilateral .. but i want a
comman formula or logic which can be applied for both.

otherwise two separate logics for concave and convex
quadrilaterals ....

it is very urgent ...

plz help me .....!!!!!!

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 04 Jul, 2008 10:24:02

Message: 4 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g4krb6$2fd$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g4kqd6$l7n$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > message <g4kp9i$bd4$1@fred.mathworks.com>...
> > > Hai,
> > >
> > > i have 3 points on a plane, whose positions are
fixed. and
> > > one arbitrary point, it's position can vary.
> > >
> > > i have to form a quadrilateral by making use of these
4
> > > points , it may form concave or convex quadrilateral.
> > >
> > > from this data one point is clear that 2 sides and 1
> > > diagonal length are fixed. and i want to calculate the
> > > length of another diagonal.
> > >
> > > how do i do it??
> > >
> > > thanks !!
> > > Ashwini
> > >
> > Hi Ashwini,
> >
> > This does not seems to be a matlab question !!hehe
> >
> > Anyways without any other constrained you can not find
the
> > length of other diagonal.
> > Just an example :
> > say fixed points are (0,0),(0,1),(1,0)
> > arbitary point (1,1) length of diagonal = sqrt(2)
> > arbitary point (1,2) length of diagonal = sqrt(5)
> >
> > So in order to find the diagonal length there should be
> > other constrained.
> >
> > with reagrds,
> > Nitin
>
> thanks for ur replay..
>
> its true that it is not pure matlab question .. but i was
> searching for it since 3-4 days .. so thought somebody in
> this forum must be having some idea ...
>
> Now come to the point,
> it may for concave or convex quadrilateral .. but i want a
> comman formula or logic which can be applied for both.
>
> otherwise two separate logics for concave and convex
> quadrilaterals ....
>
> it is very urgent ...
>
> plz help me .....!!!!!!

hi,

Superficially it seems that there should be two logics
provided you have any more constrained.
Or else where is it used might construct the constrain for
having single logic.
Where is it used ??

ps: distance between points will give side/diagonal

with regards ,
Nitin

Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 04 Jul, 2008 10:36:02

Message: 5 of 15

"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g4kto2$q3e$1@fred.mathworks.com>...
> "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> message <g4krb6$2fd$1@fred.mathworks.com>...
> > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> > <g4kqd6$l7n$1@fred.mathworks.com>...
> > > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > > message <g4kp9i$bd4$1@fred.mathworks.com>...
> > > > Hai,
> > > >
> > > > i have 3 points on a plane, whose positions are
> fixed. and
> > > > one arbitrary point, it's position can vary.
> > > >
> > > > i have to form a quadrilateral by making use of these
> 4
> > > > points , it may form concave or convex quadrilateral.
> > > >
> > > > from this data one point is clear that 2 sides and 1
> > > > diagonal length are fixed. and i want to calculate the
> > > > length of another diagonal.
> > > >
> > > > how do i do it??
> > > >
> > > > thanks !!
> > > > Ashwini
> > > >
> > > Hi Ashwini,
> > >
> > > This does not seems to be a matlab question !!hehe
> > >
> > > Anyways without any other constrained you can not find
> the
> > > length of other diagonal.
> > > Just an example :
> > > say fixed points are (0,0),(0,1),(1,0)
> > > arbitary point (1,1) length of diagonal = sqrt(2)
> > > arbitary point (1,2) length of diagonal = sqrt(5)
> > >
> > > So in order to find the diagonal length there should be
> > > other constrained.
> > >
> > > with reagrds,
> > > Nitin
> >
> > thanks for ur replay..
> >
> > its true that it is not pure matlab question .. but i was
> > searching for it since 3-4 days .. so thought somebody in
> > this forum must be having some idea ...
> >
> > Now come to the point,
> > it may for concave or convex quadrilateral .. but i want a
> > comman formula or logic which can be applied for both.
> >
> > otherwise two separate logics for concave and convex
> > quadrilaterals ....
> >
> > it is very urgent ...
> >
> > plz help me .....!!!!!!
>
> hi,
>
> Superficially it seems that there should be two logics
> provided you have any more constrained.
> Or else where is it used might construct the constrain for
> having single logic.
> Where is it used ??
>
> ps: distance between points will give side/diagonal
>
> with regards ,
> Nitin
>

Thanks,..
 |
 |A(0,0) B
-|--------(*)------------------------------------
 | /
 | /
 | /
 | /
 | /
 | /
 | /
 | / (*)-(arbitrary point)
(*)C D
 |
 |
 |
 
Refer to above fig, points A,B,C are fixed and D is
arbitrary point. and it can be anywhere in that quadrant ..
(only in that quadrant).
But it can be inside the triangle ABC or outside also.

Hope now it gives a clear picture.

Ashwini ..
  
 





Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 04 Jul, 2008 11:06:01

Message: 6 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g4kuei$4a4$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g4kto2$q3e$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > message <g4krb6$2fd$1@fred.mathworks.com>...
> > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
message
> > > <g4kqd6$l7n$1@fred.mathworks.com>...
> > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com>
wrote in
> > > > message <g4kp9i$bd4$1@fred.mathworks.com>...
> > > > > Hai,
> > > > >
> > > > > i have 3 points on a plane, whose positions are
> > fixed. and
> > > > > one arbitrary point, it's position can vary.
> > > > >
> > > > > i have to form a quadrilateral by making use of
these
> > 4
> > > > > points , it may form concave or convex
quadrilateral.
> > > > >
> > > > > from this data one point is clear that 2 sides
and 1
> > > > > diagonal length are fixed. and i want to
calculate the
> > > > > length of another diagonal.
> > > > >
> > > > > how do i do it??
> > > > >
> > > > > thanks !!
> > > > > Ashwini
> > > > >
> > > > Hi Ashwini,
> > > >
> > > > This does not seems to be a matlab question !!hehe
> > > >
> > > > Anyways without any other constrained you can not
find
> > the
> > > > length of other diagonal.
> > > > Just an example :
> > > > say fixed points are (0,0),(0,1),(1,0)
> > > > arbitary point (1,1) length of diagonal = sqrt(2)
> > > > arbitary point (1,2) length of diagonal = sqrt(5)
> > > >
> > > > So in order to find the diagonal length there
should be
> > > > other constrained.
> > > >
> > > > with reagrds,
> > > > Nitin
> > >
> > > thanks for ur replay..
> > >
> > > its true that it is not pure matlab question .. but i
was
> > > searching for it since 3-4 days .. so thought
somebody in
> > > this forum must be having some idea ...
> > >
> > > Now come to the point,
> > > it may for concave or convex quadrilateral .. but i
want a
> > > comman formula or logic which can be applied for both.
> > >
> > > otherwise two separate logics for concave and convex
> > > quadrilaterals ....
> > >
> > > it is very urgent ...
> > >
> > > plz help me .....!!!!!!
> >
> > hi,
> >
> > Superficially it seems that there should be two logics
> > provided you have any more constrained.
> > Or else where is it used might construct the constrain
for
> > having single logic.
> > Where is it used ??
> >
> > ps: distance between points will give side/diagonal
> >
> > with regards ,
> > Nitin
> >
>
> Thanks,..
> |
> |A(0,0) B
> -|--------(*)------------------------------------
> | /
> | /
> | /
> | /
> | /
> | /
> | /
> | / (*)-(arbitrary point)
> (*)C D
> |
> |
> |
>
> Refer to above fig, points A,B,C are fixed and D is
> arbitrary point. and it can be anywhere in that
quadrant ..
> (only in that quadrant).
> But it can be inside the triangle ABC or outside also.
>
> Hope now it gives a clear picture.
>
> Ashwini ..
>
>
>
>
>
>
>
Hi,

As per your figure there are few constrained which were
needed.
Anyway the diagonal will be sqrt(x^2+y^2) irrespective of
point inside the triangle or outside. where (x,y) is co-
ordinates of D

with regards,
Nitin

Subject: Re: how to find the length of diagonal

From: John D'Errico

Date: 04 Jul, 2008 13:35:02

Message: 7 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in message
<g4kuei$4a4$1@fred.mathworks.com>...
> Thanks,..
> |
> |A(0,0) B
> -|--------(*)------------------------------------
> | /
> | /
> | /
> | /
> | /
> | /
> | /
> | / (*)-(arbitrary point)
> (*)C D
> |
> |
> |
>
> Refer to above fig, points A,B,C are fixed and D is
> arbitrary point. and it can be anywhere in that quadrant ..
> (only in that quadrant).
> But it can be inside the triangle ABC or outside also.
>
> Hope now it gives a clear picture.

I've read through this thread, and sorry, but
nothing is yet clear.

You have three fixed points, say they are at
the locations

A = [0,0]
B = [0,b]
C = [c,0]

You want to place a 4th point D, at some
location [x,y] in this quadrant. This point
will define the 4th vertex of a polygon.
Define the polygon using vertices ACDB,
in that order.

All of this is apparent from your question
so far. If the polygon is convex, so that
D is not inside triangle ACB, then there
are two diagonals, and the lengths of
those diagonals are trivial to compute.
Those lengths are given by norm(A-D)
and norm(B-C).

If the polygon is not convex, then how
do you choose to define its diagonals?

John

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 07 Jul, 2008 03:38:01

Message: 8 of 15

"John D'Errico" <woodchips@rochester.rr.com> wrote in
message <g4l8u6$iji$1@fred.mathworks.com>...
> "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message
> <g4kuei$4a4$1@fred.mathworks.com>...
> > Thanks,..
> > |
> > |A(0,0) B
> > -|--------(*)------------------------------------
> > | /
> > | /
> > | /
> > | /
> > | /
> > | /
> > | /
> > | / (*)-(arbitrary point)
> > (*)C D
> > |
> > |
> > |
> >
> > Refer to above fig, points A,B,C are fixed and D is
> > arbitrary point. and it can be anywhere in that
quadrant ..
> > (only in that quadrant).
> > But it can be inside the triangle ABC or outside also.
> >
> > Hope now it gives a clear picture.
>
> I've read through this thread, and sorry, but
> nothing is yet clear.
>
> You have three fixed points, say they are at
> the locations
>
> A = [0,0]
> B = [0,b]
> C = [c,0]
>
> You want to place a 4th point D, at some
> location [x,y] in this quadrant. This point
> will define the 4th vertex of a polygon.
> Define the polygon using vertices ACDB,
> in that order.
>
> All of this is apparent from your question
> so far. If the polygon is convex, so that
> D is not inside triangle ACB, then there
> are two diagonals, and the lengths of
> those diagonals are trivial to compute.
> Those lengths are given by norm(A-D)
> and norm(B-C).
>
> If the polygon is not convex, then how
> do you choose to define its diagonals?
>
> John

Hi John,

Just have a look in the pdf below:
http://www.calvin.edu/~venema/eeg/eeg-6.pdf

It classifies the quadilateral into 3 groups : convex ,
concave and crossed.

So on that basis I gave the above answer to him by taking
the diagonal as "AD" which was clear from his picture. Even
I was looking for constrined but when he provided the
picture I was cleared.

I hope that will make the picture clear.

with regards,
Nitin


Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 09 Jul, 2008 05:54:08

Message: 9 of 15

"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g4s32p$gr8$1@fred.mathworks.com>...
> "John D'Errico" <woodchips@rochester.rr.com> wrote in
> message <g4l8u6$iji$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> message
> > <g4kuei$4a4$1@fred.mathworks.com>...
> > > Thanks,..
> > > |
> > > |A(0,0) B
> > > -|--------(*)------------------------------------
> > > | /
> > > | /
> > > | /
> > > | /
> > > | /
> > > | /
> > > | /
> > > | / (*)-(arbitrary point)
> > > (*)C D
> > > |
> > > |
> > > |
> > >
> > > Refer to above fig, points A,B,C are fixed and D is
> > > arbitrary point. and it can be anywhere in that
> quadrant ..
> > > (only in that quadrant).
> > > But it can be inside the triangle ABC or outside also.
> > >
> > > Hope now it gives a clear picture.
> >
> > I've read through this thread, and sorry, but
> > nothing is yet clear.
> >
> > You have three fixed points, say they are at
> > the locations
> >
> > A = [0,0]
> > B = [0,b]
> > C = [c,0]
> >
> > You want to place a 4th point D, at some
> > location [x,y] in this quadrant. This point
> > will define the 4th vertex of a polygon.
> > Define the polygon using vertices ACDB,
> > in that order.
> >
> > All of this is apparent from your question
> > so far. If the polygon is convex, so that
> > D is not inside triangle ACB, then there
> > are two diagonals, and the lengths of
> > those diagonals are trivial to compute.
> > Those lengths are given by norm(A-D)
> > and norm(B-C).
> >
> > If the polygon is not convex, then how
> > do you choose to define its diagonals?
> >
> > John
>
> Hi John,
>
> Just have a look in the pdf below:
> http://www.calvin.edu/~venema/eeg/eeg-6.pdf
>
> It classifies the quadilateral into 3 groups : convex ,
> concave and crossed.
>
> So on that basis I gave the above answer to him by taking
> the diagonal as "AD" which was clear from his picture. Even
> I was looking for constrined but when he provided the
> picture I was cleared.
>
> I hope that will make the picture clear.
>
> with regards,
> Nitin
>
>

Thank u very much for ur replay,
Basically what u are telling is correct, but i am intended
to calculate the angle between diagonal AD and x-axis.

The distance between BD and CD are keep changing and i will
be getting proportional length. (But line of sight will be
on the same line)

So what i thought is once i get proportional length of AD i
will calculate angle between AD and x-axis. And this wont
get affected even if BD and CD varies on the LOS.

Thanks !
Ashwini


 

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 09 Jul, 2008 06:31:01

Message: 10 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g51jq0$hu5$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g4s32p$gr8$1@fred.mathworks.com>...
> > "John D'Errico" <woodchips@rochester.rr.com> wrote in
> > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote
in
> > message
> > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > Thanks,..
> > > > |
> > > > |A(0,0) B
> > > > -|--------(*)------------------------------------
> > > > | /
> > > > | /
> > > > | /
> > > > | /
> > > > | /
> > > > | /
> > > > | /
> > > > | / (*)-(arbitrary point)
> > > > (*)C D
> > > > |
> > > > |
> > > > |
> > > >
> > > > Refer to above fig, points A,B,C are fixed and D is
> > > > arbitrary point. and it can be anywhere in that
> > quadrant ..
> > > > (only in that quadrant).
> > > > But it can be inside the triangle ABC or outside
also.
> > > >
> > > > Hope now it gives a clear picture.
> > >
> > > I've read through this thread, and sorry, but
> > > nothing is yet clear.
> > >
> > > You have three fixed points, say they are at
> > > the locations
> > >
> > > A = [0,0]
> > > B = [0,b]
> > > C = [c,0]
> > >
> > > You want to place a 4th point D, at some
> > > location [x,y] in this quadrant. This point
> > > will define the 4th vertex of a polygon.
> > > Define the polygon using vertices ACDB,
> > > in that order.
> > >
> > > All of this is apparent from your question
> > > so far. If the polygon is convex, so that
> > > D is not inside triangle ACB, then there
> > > are two diagonals, and the lengths of
> > > those diagonals are trivial to compute.
> > > Those lengths are given by norm(A-D)
> > > and norm(B-C).
> > >
> > > If the polygon is not convex, then how
> > > do you choose to define its diagonals?
> > >
> > > John
> >
> > Hi John,
> >
> > Just have a look in the pdf below:
> > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> >
> > It classifies the quadilateral into 3 groups : convex ,
> > concave and crossed.
> >
> > So on that basis I gave the above answer to him by
taking
> > the diagonal as "AD" which was clear from his picture.
Even
> > I was looking for constrined but when he provided the
> > picture I was cleared.
> >
> > I hope that will make the picture clear.
> >
> > with regards,
> > Nitin
> >
> >
>
> Thank u very much for ur replay,
> Basically what u are telling is correct, but i am intended
> to calculate the angle between diagonal AD and x-axis.
>
> The distance between BD and CD are keep changing and i
will
> be getting proportional length. (But line of sight will be
> on the same line)
>
> So what i thought is once i get proportional length of AD
i
> will calculate angle between AD and x-axis. And this wont
> get affected even if BD and CD varies on the LOS.
>
> Thanks !
> Ashwini
>
>
>
Hi Ashwini,

Your comment has confused me a bit.

If you need to find angle of AD with x axis and you have
the above diagram, then I cannot see any role of point B,
ponit C. Whether quadtrilatoral is convex/concave or even
if it forms a quadrilateral or not.

Just info A=(0,0) will give you angle for any arbitary
point D(x,y) with x-axis in terms of (x,y).

Please clarify it.

with regards,
Nitin

Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 09 Jul, 2008 06:57:02

Message: 11 of 15

"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g51lv5$7uh$1@fred.mathworks.com>...
> "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> message <g51jq0$hu5$1@fred.mathworks.com>...
> > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> > <g4s32p$gr8$1@fred.mathworks.com>...
> > > "John D'Errico" <woodchips@rochester.rr.com> wrote in
> > > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote
> in
> > > message
> > > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > > Thanks,..
> > > > > |
> > > > > |A(0,0) B
> > > > > -|--------(*)------------------------------------
> > > > > | /
> > > > > | /
> > > > > | /
> > > > > | /
> > > > > | /
> > > > > | /
> > > > > | /
> > > > > | / (*)-(arbitrary point)
> > > > > (*)C D
> > > > > |
> > > > > |
> > > > > |
> > > > >
> > > > > Refer to above fig, points A,B,C are fixed and D is
> > > > > arbitrary point. and it can be anywhere in that
> > > quadrant ..
> > > > > (only in that quadrant).
> > > > > But it can be inside the triangle ABC or outside
> also.
> > > > >
> > > > > Hope now it gives a clear picture.
> > > >
> > > > I've read through this thread, and sorry, but
> > > > nothing is yet clear.
> > > >
> > > > You have three fixed points, say they are at
> > > > the locations
> > > >
> > > > A = [0,0]
> > > > B = [0,b]
> > > > C = [c,0]
> > > >
> > > > You want to place a 4th point D, at some
> > > > location [x,y] in this quadrant. This point
> > > > will define the 4th vertex of a polygon.
> > > > Define the polygon using vertices ACDB,
> > > > in that order.
> > > >
> > > > All of this is apparent from your question
> > > > so far. If the polygon is convex, so that
> > > > D is not inside triangle ACB, then there
> > > > are two diagonals, and the lengths of
> > > > those diagonals are trivial to compute.
> > > > Those lengths are given by norm(A-D)
> > > > and norm(B-C).
> > > >
> > > > If the polygon is not convex, then how
> > > > do you choose to define its diagonals?
> > > >
> > > > John
> > >
> > > Hi John,
> > >
> > > Just have a look in the pdf below:
> > > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> > >
> > > It classifies the quadilateral into 3 groups : convex ,
> > > concave and crossed.
> > >
> > > So on that basis I gave the above answer to him by
> taking
> > > the diagonal as "AD" which was clear from his picture.
> Even
> > > I was looking for constrined but when he provided the
> > > picture I was cleared.
> > >
> > > I hope that will make the picture clear.
> > >
> > > with regards,
> > > Nitin
> > >
> > >
> >
> > Thank u very much for ur replay,
> > Basically what u are telling is correct, but i am intended
> > to calculate the angle between diagonal AD and x-axis.
> >
> > The distance between BD and CD are keep changing and i
> will
> > be getting proportional length. (But line of sight will be
> > on the same line)
> >
> > So what i thought is once i get proportional length of AD
> i
> > will calculate angle between AD and x-axis. And this wont
> > get affected even if BD and CD varies on the LOS.
> >
> > Thanks !
> > Ashwini
> >
> >
> >
> Hi Ashwini,
>
> Your comment has confused me a bit.
>
> If you need to find angle of AD with x axis and you have
> the above diagram, then I cannot see any role of point B,
> ponit C. Whether quadtrilatoral is convex/concave or even
> if it forms a quadrilateral or not.
>
> Just info A=(0,0) will give you angle for any arbitary
> point D(x,y) with x-axis in terms of (x,y).
>
> Please clarify it.
>
> with regards,
> Nitin

Thanks !
If it is possible to calculate the angle without help of B
and C then it is well and good.

The lenghts of BD and CD are continuously getting updated,
and the position point D varies along the line of sight.

As the BD and are CD are known i thought of making use of
them rather than x and y values at point D.

The only required condition is even if D varies along LOS
angle should not vary and which can be achieved by making
use of quadrilateral formulas.

If it is possible calculate the angle between AD and x-axis
without the help of points B and C, then Plz tell me the
logic how to calculate it.

(hope it gives clear idea of my problem ..)
Thank u very much !!
Ashwini
 
    

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 09 Jul, 2008 07:14:02

Message: 12 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g51nfu$k1h$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g51lv5$7uh$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > message <g51jq0$hu5$1@fred.mathworks.com>...
> > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
message
> > > <g4s32p$gr8$1@fred.mathworks.com>...
> > > > "John D'Errico" <woodchips@rochester.rr.com> wrote
in
> > > > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com>
wrote
> > in
> > > > message
> > > > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > > > Thanks,..
> > > > > > |
> > > > > > |A(0,0) B
> > > > > > -|--------(*)-----------------------------------
-
> > > > > > | /
> > > > > > | /
> > > > > > | /
> > > > > > | /
> > > > > > | /
> > > > > > | /
> > > > > > | /
> > > > > > | / (*)-(arbitrary point)
> > > > > > (*)C D
> > > > > > |
> > > > > > |
> > > > > > |
> > > > > >
> > > > > > Refer to above fig, points A,B,C are fixed and
D is
> > > > > > arbitrary point. and it can be anywhere in that
> > > > quadrant ..
> > > > > > (only in that quadrant).
> > > > > > But it can be inside the triangle ABC or
outside
> > also.
> > > > > >
> > > > > > Hope now it gives a clear picture.
> > > > >
> > > > > I've read through this thread, and sorry, but
> > > > > nothing is yet clear.
> > > > >
> > > > > You have three fixed points, say they are at
> > > > > the locations
> > > > >
> > > > > A = [0,0]
> > > > > B = [0,b]
> > > > > C = [c,0]
> > > > >
> > > > > You want to place a 4th point D, at some
> > > > > location [x,y] in this quadrant. This point
> > > > > will define the 4th vertex of a polygon.
> > > > > Define the polygon using vertices ACDB,
> > > > > in that order.
> > > > >
> > > > > All of this is apparent from your question
> > > > > so far. If the polygon is convex, so that
> > > > > D is not inside triangle ACB, then there
> > > > > are two diagonals, and the lengths of
> > > > > those diagonals are trivial to compute.
> > > > > Those lengths are given by norm(A-D)
> > > > > and norm(B-C).
> > > > >
> > > > > If the polygon is not convex, then how
> > > > > do you choose to define its diagonals?
> > > > >
> > > > > John
> > > >
> > > > Hi John,
> > > >
> > > > Just have a look in the pdf below:
> > > > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> > > >
> > > > It classifies the quadilateral into 3 groups :
convex ,
> > > > concave and crossed.
> > > >
> > > > So on that basis I gave the above answer to him by
> > taking
> > > > the diagonal as "AD" which was clear from his
picture.
> > Even
> > > > I was looking for constrined but when he provided
the
> > > > picture I was cleared.
> > > >
> > > > I hope that will make the picture clear.
> > > >
> > > > with regards,
> > > > Nitin
> > > >
> > > >
> > >
> > > Thank u very much for ur replay,
> > > Basically what u are telling is correct, but i am
intended
> > > to calculate the angle between diagonal AD and x-axis.
> > >
> > > The distance between BD and CD are keep changing and
i
> > will
> > > be getting proportional length. (But line of sight
will be
> > > on the same line)
> > >
> > > So what i thought is once i get proportional length
of AD
> > i
> > > will calculate angle between AD and x-axis. And this
wont
> > > get affected even if BD and CD varies on the LOS.
> > >
> > > Thanks !
> > > Ashwini
> > >
> > >
> > >
> > Hi Ashwini,
> >
> > Your comment has confused me a bit.
> >
> > If you need to find angle of AD with x axis and you
have
> > the above diagram, then I cannot see any role of point
B,
> > ponit C. Whether quadtrilatoral is convex/concave or
even
> > if it forms a quadrilateral or not.
> >
> > Just info A=(0,0) will give you angle for any arbitary
> > point D(x,y) with x-axis in terms of (x,y).
> >
> > Please clarify it.
> >
> > with regards,
> > Nitin
>
> Thanks !
> If it is possible to calculate the angle without help of B
> and C then it is well and good.
>
> The lenghts of BD and CD are continuously getting updated,
> and the position point D varies along the line of sight.
>
> As the BD and are CD are known i thought of making use of
> them rather than x and y values at point D.
>
> The only required condition is even if D varies along LOS
> angle should not vary and which can be achieved by making
> use of quadrilateral formulas.
>
> If it is possible calculate the angle between AD and x-
axis
> without the help of points B and C, then Plz tell me the
> logic how to calculate it.
>
> (hope it gives clear idea of my problem ..)
> Thank u very much !!
> Ashwini
>
>
Hi,

Let angle of AD with x axis is @ ( treat as theta )
Basic trignometry shows @ lies between 0 to 90 Degree and
is given by @= arctan(|x/y|) , where x,y is cordinates of
Point D.

with regards,
Nitin

Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 09 Jul, 2008 08:04:23

Message: 13 of 15

"Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
<g51ofq$sg8$1@fred.mathworks.com>...
> "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> message <g51nfu$k1h$1@fred.mathworks.com>...
> > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> > <g51lv5$7uh$1@fred.mathworks.com>...
> > > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > > message <g51jq0$hu5$1@fred.mathworks.com>...
> > > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
> message
> > > > <g4s32p$gr8$1@fred.mathworks.com>...
> > > > > "John D'Errico" <woodchips@rochester.rr.com> wrote
> in
> > > > > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com>
> wrote
> > > in
> > > > > message
> > > > > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > > > > Thanks,..
> > > > > > > |
> > > > > > > |A(0,0) B
> > > > > > > -|--------(*)-----------------------------------
> -
> > > > > > > | /
> > > > > > > | /
> > > > > > > | /
> > > > > > > | /
> > > > > > > | /
> > > > > > > | /
> > > > > > > | /
> > > > > > > | / (*)-(arbitrary point)
> > > > > > > (*)C D
> > > > > > > |
> > > > > > > |
> > > > > > > |
> > > > > > >
> > > > > > > Refer to above fig, points A,B,C are fixed and
> D is
> > > > > > > arbitrary point. and it can be anywhere in that
> > > > > quadrant ..
> > > > > > > (only in that quadrant).
> > > > > > > But it can be inside the triangle ABC or
> outside
> > > also.
> > > > > > >
> > > > > > > Hope now it gives a clear picture.
> > > > > >
> > > > > > I've read through this thread, and sorry, but
> > > > > > nothing is yet clear.
> > > > > >
> > > > > > You have three fixed points, say they are at
> > > > > > the locations
> > > > > >
> > > > > > A = [0,0]
> > > > > > B = [0,b]
> > > > > > C = [c,0]
> > > > > >
> > > > > > You want to place a 4th point D, at some
> > > > > > location [x,y] in this quadrant. This point
> > > > > > will define the 4th vertex of a polygon.
> > > > > > Define the polygon using vertices ACDB,
> > > > > > in that order.
> > > > > >
> > > > > > All of this is apparent from your question
> > > > > > so far. If the polygon is convex, so that
> > > > > > D is not inside triangle ACB, then there
> > > > > > are two diagonals, and the lengths of
> > > > > > those diagonals are trivial to compute.
> > > > > > Those lengths are given by norm(A-D)
> > > > > > and norm(B-C).
> > > > > >
> > > > > > If the polygon is not convex, then how
> > > > > > do you choose to define its diagonals?
> > > > > >
> > > > > > John
> > > > >
> > > > > Hi John,
> > > > >
> > > > > Just have a look in the pdf below:
> > > > > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> > > > >
> > > > > It classifies the quadilateral into 3 groups :
> convex ,
> > > > > concave and crossed.
> > > > >
> > > > > So on that basis I gave the above answer to him by
> > > taking
> > > > > the diagonal as "AD" which was clear from his
> picture.
> > > Even
> > > > > I was looking for constrined but when he provided
> the
> > > > > picture I was cleared.
> > > > >
> > > > > I hope that will make the picture clear.
> > > > >
> > > > > with regards,
> > > > > Nitin
> > > > >
> > > > >
> > > >
> > > > Thank u very much for ur replay,
> > > > Basically what u are telling is correct, but i am
> intended
> > > > to calculate the angle between diagonal AD and x-axis.
> > > >
> > > > The distance between BD and CD are keep changing and
> i
> > > will
> > > > be getting proportional length. (But line of sight
> will be
> > > > on the same line)
> > > >
> > > > So what i thought is once i get proportional length
> of AD
> > > i
> > > > will calculate angle between AD and x-axis. And this
> wont
> > > > get affected even if BD and CD varies on the LOS.
> > > >
> > > > Thanks !
> > > > Ashwini
> > > >
> > > >
> > > >
> > > Hi Ashwini,
> > >
> > > Your comment has confused me a bit.
> > >
> > > If you need to find angle of AD with x axis and you
> have
> > > the above diagram, then I cannot see any role of point
> B,
> > > ponit C. Whether quadtrilatoral is convex/concave or
> even
> > > if it forms a quadrilateral or not.
> > >
> > > Just info A=(0,0) will give you angle for any arbitary
> > > point D(x,y) with x-axis in terms of (x,y).
> > >
> > > Please clarify it.
> > >
> > > with regards,
> > > Nitin
> >
> > Thanks !
> > If it is possible to calculate the angle without help of B
> > and C then it is well and good.
> >
> > The lenghts of BD and CD are continuously getting updated,
> > and the position point D varies along the line of sight.
> >
> > As the BD and are CD are known i thought of making use of
> > them rather than x and y values at point D.
> >
> > The only required condition is even if D varies along LOS
> > angle should not vary and which can be achieved by making
> > use of quadrilateral formulas.
> >
> > If it is possible calculate the angle between AD and x-
> axis
> > without the help of points B and C, then Plz tell me the
> > logic how to calculate it.
> >
> > (hope it gives clear idea of my problem ..)
> > Thank u very much !!
> > Ashwini
> >
> >
> Hi,
>
> Let angle of AD with x axis is @ ( treat as theta )
> Basic trignometry shows @ lies between 0 to 90 Degree and
> is given by @= arctan(|x/y|) , where x,y is cordinates of
> Point D.
>
> with regards,
> Nitin
>

Excellent ..
Thanks for ur replay..

i got ur idea .. and tried like this:
(using distance formula)
d1^2 = x^2+b^2+y^2 - 2*b*y
d2^2 = c^2+x^2+y^2 - 2*c*x

when i solve above two equations i got the answer as follows:
d1^2 - d2^2 = b^2-c^2-2*(b*y-c*x)

in this equation also there are 2 unknowns, how to solve
..........??

Note: where point on x-axis (c,0) and point on y-axis(0,b)
and point D is (x,y)
The only way to calculate the co-ordinates at D is by using
B and C.

Plz help me .. !!
Thanks !!

Subject: Re: how to find the length of diagonal

From: Nitin Chhabra

Date: 09 Jul, 2008 08:20:03

Message: 14 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g51re7$eqn$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g51ofq$sg8$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > message <g51nfu$k1h$1@fred.mathworks.com>...
> > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
message
> > > <g51lv5$7uh$1@fred.mathworks.com>...
> > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com>
wrote in
> > > > message <g51jq0$hu5$1@fred.mathworks.com>...
> > > > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
> > message
> > > > > <g4s32p$gr8$1@fred.mathworks.com>...
> > > > > > "John D'Errico" <woodchips@rochester.rr.com>
wrote
> > in
> > > > > > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > > > > > "Ashwini Deshpande"
<vd.ashwini@mathworks.com>
> > wrote
> > > > in
> > > > > > message
> > > > > > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > > > > > Thanks,..
> > > > > > > > |
> > > > > > > > |A(0,0) B
> > > > > > > > -|--------(*)-------------------------------
----
> > -
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | / (*)-(arbitrary point)
> > > > > > > > (*)C D
> > > > > > > > |
> > > > > > > > |
> > > > > > > > |
> > > > > > > >
> > > > > > > > Refer to above fig, points A,B,C are fixed
and
> > D is
> > > > > > > > arbitrary point. and it can be anywhere in
that
> > > > > > quadrant ..
> > > > > > > > (only in that quadrant).
> > > > > > > > But it can be inside the triangle ABC or
> > outside
> > > > also.
> > > > > > > >
> > > > > > > > Hope now it gives a clear picture.
> > > > > > >
> > > > > > > I've read through this thread, and sorry, but
> > > > > > > nothing is yet clear.
> > > > > > >
> > > > > > > You have three fixed points, say they are at
> > > > > > > the locations
> > > > > > >
> > > > > > > A = [0,0]
> > > > > > > B = [0,b]
> > > > > > > C = [c,0]
> > > > > > >
> > > > > > > You want to place a 4th point D, at some
> > > > > > > location [x,y] in this quadrant. This point
> > > > > > > will define the 4th vertex of a polygon.
> > > > > > > Define the polygon using vertices ACDB,
> > > > > > > in that order.
> > > > > > >
> > > > > > > All of this is apparent from your question
> > > > > > > so far. If the polygon is convex, so that
> > > > > > > D is not inside triangle ACB, then there
> > > > > > > are two diagonals, and the lengths of
> > > > > > > those diagonals are trivial to compute.
> > > > > > > Those lengths are given by norm(A-D)
> > > > > > > and norm(B-C).
> > > > > > >
> > > > > > > If the polygon is not convex, then how
> > > > > > > do you choose to define its diagonals?
> > > > > > >
> > > > > > > John
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > > Just have a look in the pdf below:
> > > > > > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> > > > > >
> > > > > > It classifies the quadilateral into 3 groups :
> > convex ,
> > > > > > concave and crossed.
> > > > > >
> > > > > > So on that basis I gave the above answer to him
by
> > > > taking
> > > > > > the diagonal as "AD" which was clear from his
> > picture.
> > > > Even
> > > > > > I was looking for constrined but when he
provided
> > the
> > > > > > picture I was cleared.
> > > > > >
> > > > > > I hope that will make the picture clear.
> > > > > >
> > > > > > with regards,
> > > > > > Nitin
> > > > > >
> > > > > >
> > > > >
> > > > > Thank u very much for ur replay,
> > > > > Basically what u are telling is correct, but i am
> > intended
> > > > > to calculate the angle between diagonal AD and x-
axis.
> > > > >
> > > > > The distance between BD and CD are keep changing
and
> > i
> > > > will
> > > > > be getting proportional length. (But line of
sight
> > will be
> > > > > on the same line)
> > > > >
> > > > > So what i thought is once i get proportional
length
> > of AD
> > > > i
> > > > > will calculate angle between AD and x-axis. And
this
> > wont
> > > > > get affected even if BD and CD varies on the LOS.
> > > > >
> > > > > Thanks !
> > > > > Ashwini
> > > > >
> > > > >
> > > > >
> > > > Hi Ashwini,
> > > >
> > > > Your comment has confused me a bit.
> > > >
> > > > If you need to find angle of AD with x axis and you
> > have
> > > > the above diagram, then I cannot see any role of
point
> > B,
> > > > ponit C. Whether quadtrilatoral is convex/concave
or
> > even
> > > > if it forms a quadrilateral or not.
> > > >
> > > > Just info A=(0,0) will give you angle for any
arbitary
> > > > point D(x,y) with x-axis in terms of (x,y).
> > > >
> > > > Please clarify it.
> > > >
> > > > with regards,
> > > > Nitin
> > >
> > > Thanks !
> > > If it is possible to calculate the angle without help
of B
> > > and C then it is well and good.
> > >
> > > The lenghts of BD and CD are continuously getting
updated,
> > > and the position point D varies along the line of
sight.
> > >
> > > As the BD and are CD are known i thought of making
use of
> > > them rather than x and y values at point D.
> > >
> > > The only required condition is even if D varies along
LOS
> > > angle should not vary and which can be achieved by
making
> > > use of quadrilateral formulas.
> > >
> > > If it is possible calculate the angle between AD and
x-
> > axis
> > > without the help of points B and C, then Plz tell me
the
> > > logic how to calculate it.
> > >
> > > (hope it gives clear idea of my problem ..)
> > > Thank u very much !!
> > > Ashwini
> > >
> > >
> > Hi,
> >
> > Let angle of AD with x axis is @ ( treat as theta )
> > Basic trignometry shows @ lies between 0 to 90 Degree
and
> > is given by @= arctan(|x/y|) , where x,y is cordinates
of
> > Point D.
> >
> > with regards,
> > Nitin
> >
>
> Excellent ..
> Thanks for ur replay..
>
> i got ur idea .. and tried like this:
> (using distance formula)
> d1^2 = x^2+b^2+y^2 - 2*b*y
> d2^2 = c^2+x^2+y^2 - 2*c*x
>
> when i solve above two equations i got the answer as
follows:
> d1^2 - d2^2 = b^2-c^2-2*(b*y-c*x)
>
> in this equation also there are 2 unknowns, how to solve
> ..........??
>
> Note: where point on x-axis (c,0) and point on y-axis(0,b)
> and point D is (x,y)
> The only way to calculate the co-ordinates at D is by
using
> B and C.
>
> Plz help me .. !!
> Thanks !!
>

Hi Ashwini,

I think it will be better if you mail your exact
requirement to my personal email id as I get the feeling
we are distracting MATLAB comunity with non-matlab problem.

If your requirement is only getting angle made by AD with
x axis, why are you involving the factors (B&C) which are
not governing it all in the picture.

So I request you to send me a mail, stating the figure and
all the values you need of the figure.And if possible the
usage of those values in your scope of work.

with regards,
Nitin

Subject: Re: how to find the length of diagonal

From: Ashwini Deshpande

Date: 09 Jul, 2008 09:01:03

Message: 15 of 15

"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g51re7$eqn$1@fred.mathworks.com>...
> "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> <g51ofq$sg8$1@fred.mathworks.com>...
> > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > message <g51nfu$k1h$1@fred.mathworks.com>...
> > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in message
> > > <g51lv5$7uh$1@fred.mathworks.com>...
> > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
> > > > message <g51jq0$hu5$1@fred.mathworks.com>...
> > > > > "Nitin Chhabra" <nitin.chhabra@st.com> wrote in
> > message
> > > > > <g4s32p$gr8$1@fred.mathworks.com>...
> > > > > > "John D'Errico" <woodchips@rochester.rr.com> wrote
> > in
> > > > > > message <g4l8u6$iji$1@fred.mathworks.com>...
> > > > > > > "Ashwini Deshpande" <vd.ashwini@mathworks.com>
> > wrote
> > > > in
> > > > > > message
> > > > > > > <g4kuei$4a4$1@fred.mathworks.com>...
> > > > > > > > Thanks,..
> > > > > > > > |
> > > > > > > > |A(0,0) B
> > > > > > > > -|--------(*)-----------------------------------
> > -
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | /
> > > > > > > > | / (*)-(arbitrary point)
> > > > > > > > (*)C D
> > > > > > > > |
> > > > > > > > |
> > > > > > > > |
> > > > > > > >
> > > > > > > > Refer to above fig, points A,B,C are fixed and
> > D is
> > > > > > > > arbitrary point. and it can be anywhere in that
> > > > > > quadrant ..
> > > > > > > > (only in that quadrant).
> > > > > > > > But it can be inside the triangle ABC or
> > outside
> > > > also.
> > > > > > > >
> > > > > > > > Hope now it gives a clear picture.
> > > > > > >
> > > > > > > I've read through this thread, and sorry, but
> > > > > > > nothing is yet clear.
> > > > > > >
> > > > > > > You have three fixed points, say they are at
> > > > > > > the locations
> > > > > > >
> > > > > > > A = [0,0]
> > > > > > > B = [0,b]
> > > > > > > C = [c,0]
> > > > > > >
> > > > > > > You want to place a 4th point D, at some
> > > > > > > location [x,y] in this quadrant. This point
> > > > > > > will define the 4th vertex of a polygon.
> > > > > > > Define the polygon using vertices ACDB,
> > > > > > > in that order.
> > > > > > >
> > > > > > > All of this is apparent from your question
> > > > > > > so far. If the polygon is convex, so that
> > > > > > > D is not inside triangle ACB, then there
> > > > > > > are two diagonals, and the lengths of
> > > > > > > those diagonals are trivial to compute.
> > > > > > > Those lengths are given by norm(A-D)
> > > > > > > and norm(B-C).
> > > > > > >
> > > > > > > If the polygon is not convex, then how
> > > > > > > do you choose to define its diagonals?
> > > > > > >
> > > > > > > John
> > > > > >
> > > > > > Hi John,
> > > > > >
> > > > > > Just have a look in the pdf below:
> > > > > > http://www.calvin.edu/~venema/eeg/eeg-6.pdf
> > > > > >
> > > > > > It classifies the quadilateral into 3 groups :
> > convex ,
> > > > > > concave and crossed.
> > > > > >
> > > > > > So on that basis I gave the above answer to him by
> > > > taking
> > > > > > the diagonal as "AD" which was clear from his
> > picture.
> > > > Even
> > > > > > I was looking for constrined but when he provided
> > the
> > > > > > picture I was cleared.
> > > > > >
> > > > > > I hope that will make the picture clear.
> > > > > >
> > > > > > with regards,
> > > > > > Nitin
> > > > > >
> > > > > >
> > > > >
> > > > > Thank u very much for ur replay,
> > > > > Basically what u are telling is correct, but i am
> > intended
> > > > > to calculate the angle between diagonal AD and x-axis.
> > > > >
> > > > > The distance between BD and CD are keep changing and
> > i
> > > > will
> > > > > be getting proportional length. (But line of sight
> > will be
> > > > > on the same line)
> > > > >
> > > > > So what i thought is once i get proportional length
> > of AD
> > > > i
> > > > > will calculate angle between AD and x-axis. And this
> > wont
> > > > > get affected even if BD and CD varies on the LOS.
> > > > >
> > > > > Thanks !
> > > > > Ashwini
> > > > >
> > > > >
> > > > >
> > > > Hi Ashwini,
> > > >
> > > > Your comment has confused me a bit.
> > > >
> > > > If you need to find angle of AD with x axis and you
> > have
> > > > the above diagram, then I cannot see any role of point
> > B,
> > > > ponit C. Whether quadtrilatoral is convex/concave or
> > even
> > > > if it forms a quadrilateral or not.
> > > >
> > > > Just info A=(0,0) will give you angle for any arbitary
> > > > point D(x,y) with x-axis in terms of (x,y).
> > > >
> > > > Please clarify it.
> > > >
> > > > with regards,
> > > > Nitin
> > >
> > > Thanks !
> > > If it is possible to calculate the angle without help of B
> > > and C then it is well and good.
> > >
> > > The lenghts of BD and CD are continuously getting updated,
> > > and the position point D varies along the line of sight.
> > >
> > > As the BD and are CD are known i thought of making use of
> > > them rather than x and y values at point D.
> > >
> > > The only required condition is even if D varies along LOS
> > > angle should not vary and which can be achieved by making
> > > use of quadrilateral formulas.
> > >
> > > If it is possible calculate the angle between AD and x-
> > axis
> > > without the help of points B and C, then Plz tell me the
> > > logic how to calculate it.
> > >
> > > (hope it gives clear idea of my problem ..)
> > > Thank u very much !!
> > > Ashwini
> > >
> > >
> > Hi,
> >
> > Let angle of AD with x axis is @ ( treat as theta )
> > Basic trignometry shows @ lies between 0 to 90 Degree and
> > is given by @= arctan(|x/y|) , where x,y is cordinates of
> > Point D.
> >
> > with regards,
> > Nitin
> >
>
> Excellent ..
> Thanks for ur replay..
>
> i got ur idea .. and tried like this:
> (using distance formula)
> d1^2 = x^2+b^2+y^2 - 2*b*y
> d2^2 = c^2+x^2+y^2 - 2*c*x
>
> when i solve above two equations i got the answer as follows:
> d1^2 - d2^2 = b^2-c^2-2*(b*y-c*x)
>
> in this equation also there are 2 unknowns, how to solve
> ..........??
>
> Note: where point on x-axis (c,0) and point on y-axis(0,b)
> and point D is (x,y)
> The only way to calculate the co-ordinates at D is by using
> B and C.
>
> Plz help me .. !!
> Thanks !!
>

Thanks ..
I have mailed u .. plz have a look ..

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics