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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

Create hexagonal grid

Post by [-hh] » Sat Jun 30, 2018 1:20 am

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 356 times
hexagonalGrid.png
shiftLock happens

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9645
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Create hexagonal grid

Post by dunbarx » Sat Jun 30, 2018 4:50 am

Hermann.

Good to see you again.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”