Terrain Processor: Line: Random: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Line {{TerrainProcessorManual|Line: Random|BITasksPlugin.dll|Polyline, PolylineM, PolylineZ|No|= |DESCRIPTION=Random placement of multipl...") |
Lou Montana (talk | contribs) m (Text replacement - " *\|= " to " ") |
||
Line 1: | Line 1: | ||
[[Category:Terrain Processor Manual|Line]] | [[Category:Terrain Processor Manual|Line]] | ||
{{TerrainProcessorManual|Line: Random|BITasksPlugin.dll|Polyline, PolylineM, PolylineZ|No | {{TerrainProcessorManual|Line: Random|BITasksPlugin.dll|Polyline, PolylineM, PolylineZ|No | ||
|DESCRIPTION=Random placement of multiple objects on linear shapes specified in the given shapefile. Very easy, random positions only one condition - minimal distance from another objects. | |DESCRIPTION=Random placement of multiple objects on linear shapes specified in the given shapefile. Very easy, random positions only one condition - minimal distance from another objects. | ||
|TASKPARAMETERS=* '''RANDOM SEED''' - number used to initialize pseudorandom number generator. | |TASKPARAMETERS=* '''RANDOM SEED''' - number used to initialize pseudorandom number generator. |
Latest revision as of 21:16, 17 January 2021
Task details
Task name : Line: Random
Dll plugin name : BITasksPlugin.dll
Geometry type : Polyline, PolylineM, PolylineZ
Heightmap : No
Description
Random placement of multiple objects on linear shapes specified in the given shapefile. Very easy, random positions only one condition - minimal distance from another objects.
Task parameters
- RANDOM SEED - number used to initialize pseudorandom number generator.
- MAXDISTANCE - maximal object distance from centreline.
- 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.
- Spline interpolation - Use bezier spline instead of original polyline.
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
Very simple algorithm, it places objects randomly on linear shape. Can be used for sparse positioning of trees along a line, or for creating random strings of bushes (e.g. in the forests).
Algorithm
For each shape (linear) do :
- instances_count = shape_length * LDENSITY
- For instances_count try to find position :
- Random parameter in range 0 ... shape_length
- Compute real coordinate for parameter
- Random distance from line in range 0 ... MAXDISTANCE
- Random angle
- newCoordinate = coordinate_on_line + angle * random_distance
- If newCoordinate is in collision with other instances, go to a.
- Insert newCoordinate with object prototype in output.