clamp mouse coords to simple jit.gen snorm circle

    Nov 02 2019 | 10:54 pm
    Hello I am trying to have mouse coordinates only go as far as a simple snorm circle via jit.gen. So I've created a mask, but can't seem to figure out how to clip the x,y coordinates. So the mouse coords are restricted to the white area of the mask.

    • Nov 07 2019 | 4:19 pm
      i'm not quite clear on what your end goal is. can you restate?
    • Nov 07 2019 | 4:50 pm
      I am using coordinates to control some particles. I would like the particles to be limited to the ellipse shape I have created in jit.gen, but this was turning into a shader thing(and was too complicated for me to accomplish) So I thought I could just create a simple ellipse mask, but what I am tracking is close to the edges of the frame so I was trying to keep the tracking coordinate inside the ellipse.
      I though I could do this is in gen by putting the coords in a matrix and cliping or sampling the mask, but wasn't having luck. I then heard that this could be accomplished with cartopol or by again by shaders.
      While I work out the basics I am using mouse coordinates from, but I intend to use CV or color tracking in the end.
    • Nov 07 2019 | 5:39 pm
      sorry heres a patch updated, using cartopol in gen. This is as close as I've got.