Mar-11-2019, 03:18 PM
In this array of hexagons, how to implement three consecutive hexagons into a linear hexagon.
The current idea is that we randomly find a point A, then take point A as the center of symmetry and find the other two points on both sides of the point. The method implemented first finds the closest point of point A by the shortest distance and then filters through three points of the total line.
Another idea is to abstract the graph into 0,1 (hollow for 0, solid for 1), then call the random number function and set three consecutive ones.
The current idea is that we randomly find a point A, then take point A as the center of symmetry and find the other two points on both sides of the point. The method implemented first finds the closest point of point A by the shortest distance and then filters through three points of the total line.
Another idea is to abstract the graph into 0,1 (hollow for 0, solid for 1), then call the random number function and set three consecutive ones.