Hi,
I’m part-way into a project using the sensor board and a 3d map (similar to the tabletop edge with backboard outline map I had posted about earlier, also a perimeter with a backboard).
I will have the sensor board mounted underneath in the centre, and read the accelerometer to determine the magnitude and direction of impulses/bumps against the table. I think I have a rough version of this component working OK, including calculating a 3d vector (angle and magnitude) of the force involved.
(I am reading instant forces on the accelerometer, calculating the overall magnitude, and if that is over a threshold it proceeds to determine the delta vector from the baseline and the delta magnitude. If it is below that threshold (most of the noise), it sets the lastX/Y/Z values from which to calculate the deltas. I then calculate the horizontal and vertical angle of these delta accelerations.
My next step is to have a ripple seem to begin from close to where the impact may have originated, moving in the direction of the force. I am trying to sort out a best strategy for this, and am quite new to this, so am hoping to avoid significant missteps.
My initial plan had been to find the intersection of the opposite vector with the map bounding box, and set that as the origin for a sphere. The sphere’s radius would then steadily increase at a given speed, with some decay gradually decreasing the brightness over time until the sphere is no longer active. My plan was to be able to have up to 5 ‘spheres’ (separate waves triggered by different bumps), each decaying until inactive. Once that is working, I could potentially work on wrapping to allow reflections - although I think for my application that won’t contribute much value. For a see-through cube matrix it may be more interesting, though.
So, my question - is the idea of an expanding sphere to represent the wave spreading across a 3d map a good plan? Is there a better one?
My thought was that I would have an array for each sphere - origin, strength (from initial magnitude, radius, and being affected by decay), and probably color. I’d then need to test each index/pixel against this model of the sphere to see what color the pixel should be somehow…
Thanks for bearing with my novice inquiry - I know I’m likely going to be throwing a lot of time into this learning curve, I’m just hoping to be able to have it on the correct path.
Cheers