I’m trying to rotate a Universal Joint (produced entirely in GH) to its very maximum angles. The base geometry (the outer shell with its opening making contact with the axle at maximum angles) allows for a maximum 15 degree angle in two planes (15 degrees / plane).

When turning the ball to maximum angles in two planes simultaneously, the outer ball makes contact with the inner axle at Dot 1 and 3 in the clip. The Ball opening is wide enough to allow the combined planes to sum up into approximately 21 degrees at those contact points (1 & 3).

Anyway, when turning the ball in only one plane, (to max 15 degrees) there’s that gap at point 2.

That gap doesn’t actually pose any problem, except for the tricky math it takes if I want to close the gap while rotating the ball using the Multi Dimensional component shown in the clip. And I would like to know how to close that gap (while not colliding with the axle when both planes are turned to their respective maximum angles).

I’d like the inner edge of the Ball to make contact with the inner axle at all times, but how do I calculate the two (accelerating) angles to achieve that? See clip:

Fig 1. What formula keeps the gap at dot 2 closed all the way from dot 1 through dot 2 to dot 3 while dragging the controller up and down? :

The controller emits values -1 to 1 in both planes, which I multiply with the desired maximum angle (15 degrees in this case, plus allowance for combining this angle in two planes at the same time, which ends up at a maximum of ~21 degrees)

on first look, i think you just rotate the red object around the axis which is the centerline of the red cylindrical part that’s poking out… doing that will make #3 arrive at point #1 without collisions.

likewise, using the same axis of rotation, keep the red stationary and rotate the green… point #1 arrives at #3 eventually.

axis = purple… rotate either the red or the green.

i mean, i can’t really see any other rotation possible that won’t cause a collision.
?

@jeff_hammond, I see your point, but unfortunately the green and red parts rotate strictly together. Should have said that since it’s not obvious from the video.

@emilio, yes, this indicates the movement pattern that is required. Producing the movement path with a trigonometric formula is trickier though… At first I thought I had solved this math already in basic school but not so, not so…

Edit: At first I tried something that looks entirely meaningless ( `ArcCos(Cos(v)) and definitely not yielding exact numbers, but surprisingly enough it comes “close” (which is not good enough of course). Look at the the clip below how the angles involved (15 and ~21) are Degrees and the output of ArcCos is Radians, which is then calculated together (15 degrees is the “Desired Turn Angle” in the clip and the “CompensatedAngle” is the ~21 maximum angle in the “corners”).

Fig 1. Here the number pad yields 15 x 15 degrees. (Edit: Updated video to H.264 encoding) :

OK, here’s a cheat formula which comes a bit closer (and doing so without confusing Radians and Degrees). But also this formula has a little glitch, although this time not at the quadrants (gap now closed at all the green pts 1, 2 and 3). This time a small gap occurs at the red pts A1 and A2 (although a smaller gap than at pt 3 in the previous example). See clip :

Edit: Updated video to H.264 encoding :

If anyone think that they can close this gap I’d be listening very carefully.

They don’t show up in Google Chrome, which is my primary browser, but are visible in Microsoft Edge. Probably something I need to change to see them in Chrome.

A Google search shows that mp4 videos not visible on Chrome on Windows has been a recurring problem, though the most recent posts I found were from 2013. I’ll put a post about it on the Meta sub-forum here.