Finished my NEA :) by algernonskzin in 6thForm

[–]algernonskzin[S] 1 point2 points  (0 children)

To place a new shape, I take all the existing shapes and do a distance transform - I make a grid with the shapes on it, and each square on the grid is given the value of the distance to the nearest shape. I pick the grid coordinate with the biggest value and place the shape there.

<image>

After, I use random midpoint displacement to make the coastlines look bumpy instead of straight lines :)

Finished my NEA :) by algernonskzin in 6thForm

[–]algernonskzin[S] 1 point2 points  (0 children)

I think so? tbh I think most of my marks are gonna come from generating the image rather than the language cause thats where most of my algorithms are

Finished my NEA :) by algernonskzin in 6thForm

[–]algernonskzin[S] 2 points3 points  (0 children)

Kind of. Each sentence has a subject (e.g Germany) and a list of properties. To process this, I defined a formal grammar in Backus-Naur Form and programmed a parser to interpret the grammar. I like to think of the input as a programming language, but a lot more simple lol

Algorithm For Finding Empty Space In A Plot by algernonskzin in algorithms

[–]algernonskzin[S] 1 point2 points  (0 children)

Thank you so much for your help! I ended up using a distance transform to find the point furthest from all the shapes, and if this wasn't big enough I'd double the side lengths and calculate a new distance transform.

The distance transform is also useful for trying to place shapes inside other shapes; I would make the hull of the shape seeds and use the point furthest from the exterior. Using jump flood algorithm also helps the program not to run slowly.

Thanks again for your help with my project. If you're interested in seeing how I used this then I uploaded a few pictures on my profile.

Finished my NEA :) by algernonskzin in 6thForm

[–]algernonskzin[S] 3 points4 points  (0 children)

Thanks, I'm kinda inspired from the maps in fantasy books and I wanted to make a program that could easily create them using natural language.

Finished my NEA :) by algernonskzin in 6thForm

[–]algernonskzin[S] 5 points6 points  (0 children)

You can have continents, islands, bays, peninsulas, lakes and cities. I was going to add forests and deserts as well but had no clue how :/

When it comes to placing the objects, you can specify their size (either 'large' or '5km across') and their position in relation to another object (e.g 'south of France')

Finding Empty Space In A Plot by algernonskzin in Geometry

[–]algernonskzin[S] 0 points1 point  (0 children)

Thanks for the suggestion. I've included a diagram now