inscribe image in circle
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...
Hey,
I think i got it?
Hth
Luvulongtime!
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...
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 :)