We are about to switch to a new forum software. Until then we have removed the registration on this forum.
https://processing.org/examples/arraylistclass.html
Is it possible to make png or jpeg images of basketball bounce like the black circles on the link above? Could I do this using the code provided on the link above?
Thank you in advance.
Answers
Sure.
Look here:
https://www.processing.org/reference/loadImage_.html
https://www.processing.org/reference/image_.html
Of course your ball image must have no borders around the actual ball on the image.
Also, jpg don't have transparent zones on the image, but .png have, iirc.
This means (since images are always rectangles) with a .jpg file the rect will cover the background and not only the ball on the image will cover the background.
Chrisir ;-)
Check this: https://forum.processing.org/two/discussion/18819/how-to-copy-a-triangle-out-of-an-image
You should become familiar with mask and PGraphics:
https://processing.org/reference/PImage_mask_.html
https://processing.org/reference/PGraphics.html
Kf