Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing a hexagon

Using Firemonkey XE2 , I was able to use the TCube component to create a cubed map, But I am now wanting a hexagon map. There was no option for a 3d hexagon shape i could find. I figured you could create a THex similar to the TCube but I have not been able to do this or even get close. Can anyone supply a sample of doing this?

The shape I'm looking for is a hexagon prism.

enter image description here

like image 612
Glen Morse Avatar asked Mar 27 '26 13:03

Glen Morse


1 Answers

I am doing the same thing that you are doing and developing a strategic game with a hexagon map in Delphi.

You have the object that you need in Delphi itself and that is TCylinder. You should set SubdivisionAxes from 12 to 6 (12 is default for this object) and that is all you need to have the object that you want.

for implementing your map I suggest you to check this link as well. http://www.redblobgames.com/grids/hexagons/

good luck.

like image 51
Loghman Avatar answered Mar 29 '26 05:03

Loghman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!