# Hi Andy, # I have an idea but I think it is more CPU hungry than calculating square roots, so it is useless :-) # There should be three tables. First one keeps the last N samples of the incoming signal (surface). It is like an oscilloscope which updates at every sample. Second one is a static N sample table. It includes the shape of the cylinder (bottom half part of the circle) where the radius R of the circle is equal or less than N/2. # At every sample you should let the cylinder fall from high above to the ground in the vertical direction. When the curve of the half circle meets the surface you get the vertical position of the cylinder! # But I can not find a good algorithm for this collision detection. You can take the difference of every point in cylinder table from the surface table. (Third table is this difference table) If a point have a value zero or something that point is the point of intersection. You now the initial height of the circle and how much you lowered it. The last position is the output of this filter. So simple :-) -ugur guney-
On Fri, Mar 7, 2008 at 10:23 AM, Andy Farnell padawan12@obiwannabe.co.uk wrote:
I'm trying to obtain a waveform for a rolling cylinder on an irregular surface. The signature looks like the attached, or see this paper.
https://www.enactivenetwork.org/download.php?id=97
Rath gives a formula that uses a square root, which I want to avoid.
Several methods I've tried, based on samplehold and a parabolic shaper almost get there, but I can't quite crack this one.
It is the circular motion of the cylinder rotating around the last maxima and truncated by the intersection of the radius with the next minima.
I want to generate it from a samplehold noise (step waveform) source in real time, so no look ahead or tables (although delaying by some blocks is okay)
I've tried integrating and shaping the step wave, but it's not right :(
Now I can't see the wood for the trees and think I'm missing something really obvious.
Any geometry experts got an idea?
Preferably something only in the signal domain.
Cheers,
Andy
-- Use the source
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list