{"action":"opened","issue":{"url":"https://api.github.com/repos/Terasology/DynamicCities/issues/26","repository_url":"https://api.github.com/repos/Terasology/DynamicCities","labels_url":"https://api.github.com/repos/Terasology/DynamicCities/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/Terasology/DynamicCities/issues/26/comments","events_url":"https://api.github.com/repos/Terasology/DynamicCities/issues/26/events","html_url":"https://github.com/Terasology/DynamicCities/issues/26","id":185110723,"number":26,"title":"Inner-city road networks","user":{"login":"CptCrispyCrunchy","id":11363229,"avatar_url":"https://avatars.githubusercontent.com/u/11363229?v=3","gravatar_id":"","url":"https://api.github.com/users/CptCrispyCrunchy","html_url":"https://github.com/CptCrispyCrunchy","followers_url":"https://api.github.com/users/CptCrispyCrunchy/followers","following_url":"https://api.github.com/users/CptCrispyCrunchy/following{/other_user}","gists_url":"https://api.github.com/users/CptCrispyCrunchy/gists{/gist_id}","starred_url":"https://api.github.com/users/CptCrispyCrunchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CptCrispyCrunchy/subscriptions","organizations_url":"https://api.github.com/users/CptCrispyCrunchy/orgs","repos_url":"https://api.github.com/users/CptCrispyCrunchy/repos","events_url":"https://api.github.com/users/CptCrispyCrunchy/events{/privacy}","received_events_url":"https://api.github.com/users/CptCrispyCrunchy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Terasology/DynamicCities/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-25T13:01:04Z","updated_at":"2016-10-25T13:01:04Z","closed_at":null,"body":"This task is probably a bit harder than [roads connecting cities](https://github.com/Terasology/DynamicCities/issues/25). It is recommended to first solve that issue. I worked out a possible approach but there are probably a lot of ways to solve this task.\r\n\r\nI orientated myself a bit on the method from Lechner et al., the paper [“A Survey of Procedural Methods for Terrain Modelling”](http://www.cg.its.tudelft.nl/Publications-new/2009/SDGTB09a/SDGTB09a.pdf) describes, using an agent based approach:\r\n\r\n_Every building will start with a node on its front door. Then district nodes will be calculated by building density to ensure that bigger buildings will have a higher chance of being near a district road.\r\nA weighted middle node will be calculated between the center of the district and the center of density (calculation could be done in analogy to the calculation of the center of mass in physics).\r\nThen Finding the corner points of buildings and spawn special raster nodes there will make it possible to apply optimization algorithms to find the shortest way between nodes of interest and ensure that all nodes will be between houses. The weighted middle node will be assigned to the nearest raster node.\r\nThe districts will now be connected with the weighted middle node as crossroads. For each house-node, the shortest intersection with the district lines will be calculated and connected accordingly.\r\nWith all preparations done, the roads have to be placed in a manner in which they won't intersect with the house spaces. This can easily be accomplished by just following the raster-nodes, while suppressing too diagonal movement. Later a distortion function can be used to give the roads a more natural feel._\r\n "}}
{"actor":{"display_login":"CptCrispyCrunchy"}}