inscribe image in circle


    Jan 13 2018 | 11:01 pm
    Hi! I am trying to do something fairly simple but having some trouble with it: I want an image to be inscribed and warped to fit into a circle. following simple trigonometry I can use the (scaled) tan and radius of the point to create new coordinates to be sampled by [sample]. In theory it works but when I draw it it doesn't come out right probably because of the center of the image being shifted by a -0.5. I attached the patch here please let me know what I am doing wrong...

    • Jan 17 2018 | 2:27 pm
      Hey,
      I think i got it?
      Hth Luvulongtime!
    • Jan 19 2018 | 3:52 pm
      Nice! Thanks a lot, I almost went bananas over this.... things that in theory work in my head don't really work in jit.gl.pix, I think I need more practice. But this is a good lesson...
    • Jan 19 2018 | 6:28 pm
      Glad i could help. What helps me with debugging is just pasting it into jit.pix and hook up a jit.cellblock and just look at the output. It makes it easier to figure out what the numbers should do :)