svg
01.06.2015 | vb   | lw   | svg | top |
home
introduction
zoom
animate
interact
generate example | 1 |


Rectangle subdivision

The script repeatedly subdivides a rectangle. It first chooses an existing rectangle, then decides if the next line should be horizontal or vertical, then calculates a random position in the chosen rectangle, and finally draws the line. In each cycle, it updates arrays with the accumulated data.

The interface allows to set a minimal distance, to set the number of lines, and to generate a new drawing using these values without reloading the page.

One part is basically a translation of an ArchiCAD 2d object from gdl to svg, the other part is the interface with its graphic and functionality.

links