Create hexagonal grid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Create hexagonal grid

Post by [-hh] »

The attached simple demo stack creates a hexagonal grid.

You can set
  • the number of rows
  • the number of cols
  • the horizontal radius of the circumellipses
  • the vertical radius of the circumellipses
  • choose a flat or pointed top of the hexagons
Moreover you get the grid element's name by mouseEnter and can toggle the color of the elements by mouseDown.
Attachments
hexagonGrid.livecode.zip
(25.79 KiB) Downloaded 573 times
hexagonalGrid.png
shiftLock happens
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: Create hexagonal grid

Post by dunbarx »

Hermann.

Good to see you again.

Craig
Post Reply