# Need help with generative art

**URL:** https://discourse.processing.org/t/need-help-with-generative-art/10727
**Category:** Coding Questions
**Created:** [April 28, 2019, 9:33pm UTC](https://discourse.processing.org/t/need-help-with-generative-art/10727 "2019-04-28T21:33:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tiwis](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tiwis](https://discourse.processing.org/u/tiwis)
#### Post date: [April 28, 2019, 9:33pm UTC](https://discourse.processing.org/t/need-help-with-generative-art/10727/1 "2019-04-28T21:33:32Z")

</div>

Hello, my name is Matías, i’m from Argentina and this is my first post on this awersome forum.

Today, i’m working with generative art and the problem is that i’m “painting” the background with the mouseX and mouseY positions as if the mouse was a brush and then I need the mouse to stop painting and to do something different in order to finish with the art picture and I don’t now how to do it…  
This is the style of picture I want to recreate…  
 ![download](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1d0f763af054d2c58d5fae4ba122ab1e7abf4896.jpeg)

In the program what I have done is making a class for the brush that paints the background and then I have done a class that I called “contador” which counts +1 when the mouse moves all over the screen in order to control when the background is already painted. **I thought that having that information I would be able to “stop” painting and start with another part of the picture but that is what I can’t do, anyone could help me?**

Thanks and cheers from Argentina for everyone!

[Here is the link of the program, I couldn’t put it with the code because it has classes and it’s a mess hahaha](http://www.mediafire.com/folder/d644yndb7u5lb/WilmsV2)

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [April 29, 2019, 2:22am UTC](https://discourse.processing.org/t/need-help-with-generative-art/10727/2 "2019-04-29T02:22:04Z")

</div>

sorry, i not read your code,  
but your description sounds like you use the mouse position for paint  
( and not use the mousePressed )  
only to compare with other ideas, pls check recent  
[Help with a "Drawing" App](https://discourse.processing.org/t/help-with-a-drawing-app/10688/3) second code

so you have color adjust and brush size, but no SPRAY tool  
possibly you have that already.
