I'm really new to pd. I'm learning at my university and I have to make a project using fiducial and ReacTIVision. In pd I want to put 4 or 5 pictures in different positions, the opacity would be 0% and if I move the Fiducial the picture which is closest to the fiducial will get filled (the opacity would change to 100% if the fiducial is nearby). I tried to make it with a text, but it only worked from the half and only on the x axis.
Could anyone help me with this, because I really don't know how to do it!
I saw that I should use conditional logic but I don't know how...
Thanks for your help and sorry for my bad english!(
X position and Y position help with Fiducial and ReacTIVision
@Vanilleaya A long long long time ago I played around with it.
So it will take me a while to absorb what you want to do, and to remember how it works.
Here is a patch that works ..... moves a square in GEM...... simple.pd which I think should work even in vanilla.
I have stripped it down from another patch, which I built in a hurry trying to help someone smooth the data.
That patch has disappeared from the Forum back when "disk full" errors were causing problems on the server.
Here it is....... stable_comic_drones.zip
It needs "extended" or quite a few libraries installed to Vanilla through Deken. It works much better though.
It will get the position of the fiducial and show it as a square in the GEM window.
Compare the fiducial position xy data that I have going into [translate XYZ] in my patch......... to the picture position data that you will put into the [translate XYZ] for each of your pictures....... to work out how close it is.
I hope it helps.
If it does, then get as far as you can with it and come back for more help if you are stuck.
@Vanilleaya somehow you need to process the data coming from [tuioclient] further. Now you route and unpack, but also you also need to scale the numbers so that what comes out of tuio matches the gem dimensions and calculate the distance of your objects.
see: https://www.mathopenref.com/coorddist.html for distance caculation.
Maybe that is allready apliable from Davids patches.
@Johnny-Mauser Yes, my patch scales the fiducial position to the Gem window, but your link is great for calculating the proximity.
The A and B coordinates will be (x,y) for the fiducial(A) and (x,y) for the picture(B) as they are fed into each [translateXYZ].
Thanks for your replies, I hope I will make this with your help and advices!
Thank you so much again! :3