I’m trying to draw a curved line between 2 objects in a way that if I move the objects around the curve remains the same. I’m having difficulties with the quadratic method and calculating the control point. Any help with this or ideas for another approach will be welcome.
Ideally I’d like to have an arrow that the user can edit. The typical connector line where you add points and then curve it yourself. But that’s for version 2.0
Hi Daniel, how do you calculate x1_tangent and the other tangents? I’m a bit confused, you need an angle for that, don’t you?
I want to create something similar to the picture I posted (doesn’t need to be exactly the same). Just an arc or a curve of some form so when I move the listener around the talker the curve moves with it.
How silly of me!! I didn’t realise the juce coordinates are like upside down. So the y=0 is on the top and y=50 is on the bottom.
And I was doing my calculations using the normal cartesian y+ on top and y- on the bottom.
So I’ve just changed
float midy = (y2-y1)/2 + y1 - sin(a)*amplitude;
That was the thing I didn’t completely understand in your OP, I thought your idea “to have an arrow that the user can edit” would be the same, as I did.