Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hexagonal Grid Boundary

Status
Not open for further replies.

MATLABER

Computer
Joined
Dec 28, 2006
Messages
1
Location
LB
Hey Guys

I have drawn in MatLab a hexagonal grid, with a central cell and a number of tiers, which could be one tier =7 hexagons in total or two tiers =19 hexagons in total...etc.

The major problem that I have been facing for the
past two days is that I want to check wether a cetain point is lying nside this grid of hexagons or not. Note that I cannt use the "inpolygon" function since the external vertices of the grid do not form a regular ploygon.

Please I would be glad to hear any suggestions.I have heard some suggestions, but the problem is that they only work for a fixed and not generic number of tiers, so practically they are useless.


Thank You for your help.

I would really appreciate it.


 
Could you please send me your codes for the Hexagonal grid ( 7 hexagons.Thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top