Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find distance between two points

Status
Not open for further replies.

hgphtgi

Banned
Joined
Jul 23, 2009
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
please help me to find the distance between two points

this is the derivation of the distance equation between two cells for hexagon type, please help me to get the distance between two cells for triangle and square cells

i appreciate your helpful

tnx bro's
 

Attachments

  • QQQQQQQQQQQQQQ.JPG
    QQQQQQQQQQQQQQ.JPG
    37.4 KB · Views: 66

albbg

Advanced Member level 4
Joined
Nov 7, 2009
Messages
1,254
Helped
434
Reputation
868
Reaction score
389
Trophy points
1,363
Location
Italy
Activity points
9,478
Sorry, but I didn't clearly understand your question. Do you want to calculate the distance between the center of two cells given what ?
 

hgphtgi

Banned
Joined
Jul 23, 2009
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
Tnxxxx for ur answer.this is what i mean
 

Attachments

  • QQQQQQQQQQQQQQ.JPG
    QQQQQQQQQQQQQQ.JPG
    29.7 KB · Views: 45
  • 111111111111.JPG
    111111111111.JPG
    27.6 KB · Views: 45

_Eduardo_

Full Member level 5
Joined
Aug 31, 2009
Messages
295
Helped
118
Reputation
238
Reaction score
103
Trophy points
1,323
Location
Argentina
Activity points
2,868
It's the same result. just shift the vector D to the nearest vertex.
 

hgphtgi

Banned
Joined
Jul 23, 2009
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
tnxxxxxxx for replay

i think its not same because the angle is different.
 

_Eduardo_

Full Member level 5
Joined
Aug 31, 2009
Messages
295
Helped
118
Reputation
238
Reaction score
103
Trophy points
1,323
Location
Argentina
Activity points
2,868
i think its not same because the angle is different.
You are right, in the last image is best viewed.

The formula remains unchanged.
You just measure the coordinates u,v in height of triangles. And taking into account that the height each triangle is 1/2 and the center of the triangle is at h/3 = 1/6.

u = 1/6+1/2+1/2+1/2 = 5/3
v = 1/2+1/6 = 2/3
D = sqrt(25+4+10)/3 = sqrt(39)/3
 

Attachments

  • Clipboard-3.jpg
    Clipboard-3.jpg
    69 KB · Views: 34
Last edited:

hgphtgi

Banned
Joined
Jul 23, 2009
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
tnx bro _Eduardo_ for ur answer

ur answer is brilliant and its Persuade. However i would the mathematical equation for D in general not for a specific example. PLZ

really i can't hardly express how glad i am.

i appreciate ur help bro
 

_Eduardo_

Full Member level 5
Joined
Aug 31, 2009
Messages
295
Helped
118
Reputation
238
Reaction score
103
Trophy points
1,323
Location
Argentina
Activity points
2,868
However i would the mathematical equation for D in general not for a specific example.

I do not understand what your problem.

The general formula is that you put in your first message.
The only secret is the computation of u and v according to where in the triangle are the start and end points.

Depends what your data are given, something that we still not know.

If the data are [u1, v1] and [u2, v2], just apply the fornula.

But if the data are the centers of the triangles, you must count the number that separates in each direction, including the fraction of height (h/3 or 2h/3 ; h: height of the triangle).
 

hgphtgi

Banned
Joined
Jul 23, 2009
Messages
15
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
0
hi bro _Eduardo_ tnx toooooo much gentleman.

ur answer now is full and clear for me tnx to much BUT how u got h/3, 2h/3 and the height each triangle is 1/2 ??

regards
 

_Eduardo_

Full Member level 5
Joined
Aug 31, 2009
Messages
295
Helped
118
Reputation
238
Reaction score
103
Trophy points
1,323
Location
Argentina
Activity points
2,868
In your first message, the distance between the hexagon centers is 1 ==> then height of each triangle is 1/2.

The center of every equilateral triangle is at 1/3rd of the height.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top