# Webcam tracking + generating random lines (as3)

**URL:** <https://forum.kirupa.com/t/webcam-tracking-generating-random-lines-as3/321897>\
**Category:** Uncategorized\
**Created:** [May 4, 2011, 1:23pm UTC](https://forum.kirupa.com/t/webcam-tracking-generating-random-lines-as3/321897 "2011-05-04T13:23:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonasdar](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@simonasdar](https://forum.kirupa.com/u/simonasdar)\
**Post date:** [May 4, 2011, 1:23pm UTC](https://forum.kirupa.com/t/webcam-tracking-generating-random-lines-as3/321897/1 "2011-05-04T13:23:07Z")

</div>

Hi all. I’m trying to write code for webcam tracking + drawing generative lines. Main idea is that person pass camera and it creates random size and colours lines. after lines fill screen up to 35%, screen become blank (as in the begining).  
So my questions are:

1. how to create random size and colours lines that appears by person tracked movement? (example could be that person is creating generative art by lines)
2. what functions should I use to count percents of filled screen? (I want that after 35% screen become blank as in the beginning. After that it just continue process from the beginning)  
Thank you in advance.
