
Actually, that expression calculating a mid point about which to turn (that I mentioned in a previous post) wasn’t useful in the end. Instead, I used sin and cos of an angle multiplied by a variable radius to describe points on a circle that can change size, and a counter to change the angle over time so that by using S=O/H C=A/H T=O/A (another blast from the past) I could animate a circle moving on a circular path. The programing on the turquoise background describes how the circles orbit each other within their pair, and on the blue background how the pair move on a circular path around the space.
By changing the direction the counter counts (up or down) I can reverse the direction of travel. Around the space, I used the equation I mentioned before (the one that determines when two circles get close to each other) to initiate a change of direction around the room for the trailing couple, this prevents collisions. But, since in a milonga the direction of travel around the dance floor is anticlockwise, I also added a delay instruction on the message so that after a second the couple turn back and continue in an anticlockwise direction.

Within the pair, I used the objects ‘bonk’ and ‘fiddle’ to determine when to initiate a change of direction. Bonk listens for attacks in the music, which worked well with the percussive sounds of the piano. Fiddle listens for pitch and different types of sound, which worked better with the bandoneon. The idea is that the circles will move in accordance with selected parts of the music, as would an improvising dancer.
“I used sin and cos of an angle … and a counter to change the angle over time”.
Much simpler is: X = X + ΔY , Y = Y – ΔX
LikeLike