Terrain Processor: Line: Random
Jump to navigation
Jump to search
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.