Terrain Processor: Area: Random: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Area__NOTOC__ {| cellspacing="0" style="background:#eee" | '''Task name''': Area: Random '''Dll plugin name''': BITasksPlugin.dll '''Ge...") |
Lou Montana (talk | contribs) m (Text replacement - " *\|= " to " ") |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Terrain Processor Manual|Area]] | [[Category:Terrain Processor Manual|Area]] | ||
{| | {{TerrainProcessorManual|Area: Random|BITasksPlugin.dll|Polygon, PolygonM, PolygonZ|No | ||
|DESCRIPTION=Random placement of multiple objects inside the polygons specified in the given shapefile. Very easy, random positions only two conditions - probability and minimal distance from another objects. | |||
|TASKPARAMETERS=* '''RANDOM SEED''' - number used to initialize pseudorandom number generator. | |||
| | |||
Random placement of multiple objects inside the polygons specified in the given shapefile. Very easy, random positions only two conditions - probability and minimal distance from another objects. | |||
= | |||
* '''RANDOM SEED''' - number used to initialize pseudorandom number generator. | |||
* '''DENSHA''' - The density of the filling in number of objects for hectare. For example 100 objects for hectare means an average distance of about 10 meters between objects. | * '''DENSHA''' - The density of the filling in number of objects for hectare. For example 100 objects for hectare means an average distance of about 10 meters between objects. | ||
= | |OBJECTPROTOTYPEPARAMETERS=* '''OBJECT''' - Object's prototype name | ||
* '''OBJECT''' - Object's prototype name | |||
* '''PROB''' - Object's probability | * '''PROB''' - Object's probability | ||
* '''MINHEIGHT''' - Minimal size in % | * '''MINHEIGHT''' - Minimal size in % | ||
* '''MAXHEIGHT''' - Maximal size in % | * '''MAXHEIGHT''' - Maximal size in % | ||
* '''MINDIST''' - Minimal distance in meters | * '''MINDIST''' - Minimal distance in meters | ||
= | |USAGE=This algorithm is very simple, it generates random positions in area with given density. You can use it for forests with clustering or stones in open terrain. | ||
This algorithm is very simple, it generates random positions in area with given density. You can use it for forests with clustering or stones in open terrain | |ALGORITHM=For each shape (areal) do : | ||
= | |||
For each shape (areal) do : | |||
# instances_count = HECTARES * DENSHA | # instances_count = HECTARES * DENSHA | ||
# For instances_count try to find position : | # For instances_count try to find position : | ||
Line 33: | Line 18: | ||
If this loop a <-> c has no new output for last 100 attempts, area is full and iteration of this shape will end. | If this loop a <-> c has no new output for last 100 attempts, area is full and iteration of this shape will end. | ||
|SAMPLE= | |||
}} |
Latest revision as of 21:09, 17 January 2021
Task details
Task name : Area: Random
Dll plugin name : BITasksPlugin.dll
Geometry type : Polygon, PolygonM, PolygonZ
Heightmap : No
Description
Random placement of multiple objects inside the polygons specified in the given shapefile. Very easy, random positions only two conditions - probability and minimal distance from another objects.
Task parameters
- RANDOM SEED - number used to initialize pseudorandom number generator.
- DENSHA - The density of the filling in number of objects for hectare. For example 100 objects for hectare means an average distance of about 10 meters between objects.
Object prototype parameters
- OBJECT - Object's prototype name
- PROB - Object's probability
- MINHEIGHT - Minimal size in %
- MAXHEIGHT - Maximal size in %
- MINDIST - Minimal distance in meters
Usage
This algorithm is very simple, it generates random positions in area with given density. You can use it for forests with clustering or stones in open terrain.
Algorithm
For each shape (areal) do :
- instances_count = HECTARES * DENSHA
- For instances_count try to find position :
- Random position in bounding box.
- If position is inside shape, continue to c. else a.
- Test with objects if minimal distance is ok then add new random prototype instance in output and a else a.
If this loop a <-> c has no new output for last 100 attempts, area is full and iteration of this shape will end.