keep movie under mask (math problem)


    Aug 28 2006 | 5:08 pm
    I'm trying to move a picture with jit.rota using the offset arguments. This picture is composed with a circular zone, then passing thru a circular mask. How can I keep the playing picture inside the surface of the mask. I think there should be a way to do this mathematicaly, but the problem is that my math skill sucks (furthermore, I'm quite new to Jitter so maybe I went the wrong way). Any help would be greatly appreciated.
    As I realise my explanations are perfectly unclear, here's a demo patch using countdown.mov as an example.
    Thanks in advance.
    Best,
    Julien.

    • Aug 28 2006 | 7:41 pm
      On Aug 28, 2006, at 10:08 AM, jln wrote:
      > > I'm trying to move a picture with jit.rota using the offset > arguments. This picture is composed with a circular zone, then > passing thru a circular mask. How can I keep the playing picture > inside the surface of the mask. I think there should be a way to do > this mathematicaly, but the problem is that my math skill sucks > (furthermore, I'm quite new to Jitter so maybe I went the wrong > way). Any help would be greatly appreciated.
      Well, you'll want to brush up on your math if you want to do this sort of thing. Just handling offset and zoom is quite easy (make sure that offset + zoom*dimensions is within the bounding rectangle of your mask). It's a little trickier if you want to clap your anchor points and rotation, though it doesn't require anything more than a little algebra and trigonometry. (There are some free math tutorial sites if you google)
      Depending on what you are looking to do, applying the mask to the source image prior to scaling/rotation might be an easier way to think of the problem. Not sure if that is appropriate to your application, but the Math is a little easier.
      -Joshua