vendredi 30 juillet 2021

How to generate a non-intersecting polygon like an island , which is not necessarily convex? [closed]

I would like to generate a polygon, that doesn't have intersecting edges, but not necessarily convex.

I want to use it for a game. It would represent an island/continent. The more it resembles a real continent, the better. There's no need of heightmap, only the shape.

I'd store it in an array, x and y coordinates would alternate in it.

And it would be completely random, but would fit in a given area.

I'm thinking something like this:

Island shape




Aucun commentaire:

Enregistrer un commentaire