# Flow Field, trying to paint with Kinect

**URL:** <https://discourse.processing.org/t/flow-field-trying-to-paint-with-kinect/11816>\
**Category:** Libraries\
**Created:** [June 3, 2019, 10:24pm UTC](https://discourse.processing.org/t/flow-field-trying-to-paint-with-kinect/11816 "2019-06-03T22:24:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josipaca](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@josipaca](https://discourse.processing.org/u/josipaca)\
**Post date:** [June 3, 2019, 10:24pm UTC](https://discourse.processing.org/t/flow-field-trying-to-paint-with-kinect/11816/1 "2019-06-03T22:24:11Z")

</div>

Hey I’m quite new to Processing and trying to make like a force to the Lerped position from the Kinect, kind of like a mouse. So if the Lerped position shows the field drags to it like a magnet.

I can figure it out and I’m stuck…

Anyone know how I can do it?

> **[Josipaca/Flowfield\_Track](https://github.com/Josipaca/Flowfield_Track)**
>
> Contribute to Josipaca/Flowfield\_Track development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![josipaca](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@josipaca](https://discourse.processing.org/u/josipaca)\
**Post date:** [June 5, 2019, 1:59pm UTC](https://discourse.processing.org/t/flow-field-trying-to-paint-with-kinect/11816/2 "2019-06-05T13:59:28Z")

</div>

Edit:  
I’m thinking about make it react to the depth data from the Kinect so it forms after the person that is seen of the Kinect

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 7, 2019, 3:55pm UTC](https://discourse.processing.org/t/flow-field-trying-to-paint-with-kinect/11816/3 "2019-06-07T15:55:46Z")

</div>

> [@josipaca](#):
>
> make like a force to the Lerped position from the Kinect, kind of like a mouse

Your title and sketch name says “flow field” but your question says “like a mouse.” Which are you trying to do? Create a flow field, or create a mouse pointer?

> **[Vector field](https://en.wikipedia.org/wiki/Vector_field)**
>
> In vector calculus and physics, a vector field is an assignment of a vector to each point in a space, most commonly Euclidean space 
>   
>     
>       
>         
>           
> R
>           
>           
> n
>           
>         
>       
>     
> {\\displaystyle \\mathbb {R} ^{n}}
>   
> . A vector field on a plane can be visualized as a collection of arrows with given magnitudes and directions, each attached to a point on the plane. Vector fields are often used to model, for example, the sp Th...

When you say “the lerped position from the Kinect” it sounds like you want to find the center of mass of the Kinect depth image, and constantly drag an object (like a mouse pointer or a ball) towards that center of mass. Is that right?

Do you want the pointer controlled by a nearest point, like a projecting hand, or do you want the entire depth field – like three people’s bodies, and the pointer falls somewhere between them?

You can also use blob detection with opencv or boofcv and find the center for each blob.
