Difference between revisions of "Virtual Juggling"

From Wayfarer
(Saving first half of article.)
 
Line 1: Line 1:
 +
__NOEDITSECTION__
 
[[Image:Balljuggling.png|right]]
 
[[Image:Balljuggling.png|right]]
Final Project
+
Final Project<br/>
Physically Based Modeling
+
Physically Based Modeling<br/>
Comp 290.072
+
Comp 290.072<br/>
Spring 2000
+
Spring 2000<br/>
  
 
For my final project in Physically Based Modeling (Comp 290.072) I have chosen to implement Virtual Juggling. This project uses physically based models for the objects being juggled and robotic style "mirror laws" to enable the hands to catch the juggled objects.
 
For my final project in Physically Based Modeling (Comp 290.072) I have chosen to implement Virtual Juggling. This project uses physically based models for the objects being juggled and robotic style "mirror laws" to enable the hands to catch the juggled objects.

Revision as of 20:51, 5 December 2007

Balljuggling.png

Final Project
Physically Based Modeling
Comp 290.072
Spring 2000

For my final project in Physically Based Modeling (Comp 290.072) I have chosen to implement Virtual Juggling. This project uses physically based models for the objects being juggled and robotic style "mirror laws" to enable the hands to catch the juggled objects.

The Problem of Juggling

Juggling presents a nontrivial, dynamic environment in which to simulate. There are normally multiple projectiles with interweaving paths. Human jugglers must use their hand-eye coordination to decide where the ball or club will be so that the hand may be placed in a position to catch it. Although a computer, if the programmer wanted to, could use its inherent knowledge of the complete state of its world to automatically calculate the best position to catch an object, I have chosen not to do this. Rather, just like a human juggler, my application makes use of only the current state of the world to decide where to place the hands when catching. It does this using robotic style "mirror laws" (which are explained below). This approach, I believe, more closely approximates how real jugglers juggle.

Real Juggling

Real juggling can be done with almost any type of prop. Most props, however, fall into three different categories typified by the 3 most common juggling props: balls, rings, and clubs. These three props have very different characteristics that affect how they are juggled.

Balls

With balls, all axes are equal and if the prop rotates in flight it does not matter.

Rings

With rings, two axes are equal and one is small enough to be effectively nonexistent. This affects how the prop can rotate. Any rotation around the small axis is inconsequential, but rotation around either of the other axes can be difficult to control.

Clubs

With clubs, two axes are relatively equal while one is fairly large (compared to the other two). This forces the club to rotate around an axis perpendicular to the juggler during the act of juggling.

No matter what type of prop used, there are several basic patterns employed in juggling. For a single juggler, the basic patterns are the cascade, fountain, shower, and multiplexing. A cascade is the standard juggling pattern where balls are alternatively thrown from one hand to another. It is normally used when juggling an odd number of objects. In the fountain pattern, balls are thrown and caught by the same hand. It is traditionally used for patterns consisting of an even number of objects. The shower pattern is the most commonly depicted juggling pattern. In a shower, all the balls are thrown in a circle. Even though many non-jugglers think of this pattern when thinking of juggling, it is a much more difficult pattern than either the cascade or the fountain. Multiplexing is when a juggler throws more than one object from a single hand simultaneously.

Patterns between multiple jugglers are based on the single person patterns. Most commonly, two jugglers will juggle in synchronized cascade patterns and periodically throw objects to the other person instead of to themselves. This is called passing. Another form of juggling involving multiple juggling is "buddy juggling." In buddy juggling, two people juggle as though they were only one person. One person can do all the juggling for one side while the other juggles for the other side (i.e. one person juggles the right hand and the other the left hand) or the jugglers can alternate which side they juggle. This can lead to many interesting effects where the objects being juggled go in a standard pattern while the jugglers interweave between each other.

The Physics of Juggling

Juggling makes use of several key concepts. First, all motion, even that with complex rotation, can be considered standard projectile motion. Second, juggling patterns make use of periodic cycles. Patterns repeat, rather than change continuously. Third, the number of fundamental patterns is small. Through the use of these concepts juggling can easily be understood. Before we dive into that, however, let us define a few variables and equations.

Some Definitions

Lets call the time between consecutive throws for one hand tau. Each hand travels in a circular pattern that has two states: holding an object and not holding an object. Let's call the time in which a hand is holding something the dwell time. The dwell time is obviously smaller than tau since tau is composed of both the dwell time and the non-dwell time. We not really concerned about the absolute length of the dwell time, but rather how does the dwell time compare to tau. Therefore, let's call theta the fraction of tau that is the dwell time. An immediate observation we should make is that theta will always be between 0 and 1 (and never equal to either). Given that, the dwell time (or the time an object spends in the hand) is tau * theta. Let's call the number of objects being juggled n.

Now, with those variables, let's give a few useful equations. First, let's consider the case where n is even. If n is even, then each hand (we're assuming two hands here) holds 0.5 * n objects and one full "cycle" of juggling (that is, at the end of the cycle, the objects are in the same location as when the cycle started) lasts for 0.5 * n * tau. However, because of the dwell time, the first object must land theta * tau earlier (that is, we consider the cycle to end when the last object is caught, not after its dwell time). Therefore, the time each object spends in the air (let's call it t) is equal to 0.5 * n * tau - theta * tau or simplified: t = 0.5 * tau (n - 2 * theta).

Since we know how long an object spends in the air, we can use the standard equation of projectile motion to determine how high the ball goes. The standard equation of projectile motion is r = r0 + v0*t + 0.5*g*t^2. (This can be found in any physics text.) At the apogee (that is, the highest point of the parabola made by the path of the object), the velocity of an object will be 0. If we also assume that the object was launched from a height of 0, we get the equation h = 0.5 * g * t^2 (note that ^ is the exponentiation operator). However, the t we calculated previously is actually twice the value of the t in this equation. Therefore, to unify the two equations, we must rewrite it to be: h = 0.5 * g * (0.5 * t)^2 or simplified: h = (1/8) * g * t^2. Substituting the value of t calculated previously, we get h = (1/32)*g*[(n- 2*theta)^2]*tau^2.

We need to know, however, what initial velocity will allow us to reach the height h. At h, the velocity v will be equal to v0 - g*t1. Solving for t1 (the time to get to h), we get t1 = v0/g. We can substitute this into the standard equation for projectile motion and solve for v0. The equation starts out as h = v0 * (v0/g) - 0.5 * g * (v0/g)^2. Simplifying, we get v0 = sqrt(2*g*h). This gives us the initial velocity needed to reach a height h.

Some observations to be made are that tau and h are the limiting factors for successfully maintaining a juggle. Higher values of h must be aimed more accurately and smaller values of tau determine how fast a juggler must aim. While h is dependent upon the number of objects juggled (thereby ensuring that as the number of objects increase, the difficulty increases), tau can usually be adjusted. Most often tau falls in the range of 0.2 seconds to 0.8 seconds with a many jugglers having a tau of 0.5 seconds. Another factor in creating a stable juggling pattern is the value of theta. The vast majority of jugglers have a theta very close to 0.5 (i.e. the object is held for half the time the hand takes to travel in a circle). This encourages a strong pattern by ensuring that as one hand is throwing, the other is catching.

What About Club Juggling?

Club juggling introduces two extra considerations into a juggling pattern: 1. the club rotates, 2. clubs are generally caught in only one place -- the handle. How can we adjust our equations to take club spin into account?

Club rotation is a byproduct of the lever arm going from the elbow to the hand. With that in mind, let's call L1 the length from the elbow to the handle of a club. Let's also call L the length from the elbow to the club's center of mass (which is normally in the round area at the top of the handle). We'll use omega as the angular velocity of the pivot arm. Now, the velocity at the center of mass is given by the equation v0 = omega * L. The time the center of mass spends in the air is calculated similarly to how we calculated the initial velocity to reach a height h. To reach a height h we used the equation t1 = v0/g. The time spent in the air is twice this (t1 is the time going up which equals the time going down), so the time the center of mass of the club spends in the air is t = 2*v0/g = 2*omega*L/g. The club handle, however, since it is rotating, travels at a different speed. This speed is given by the equation v1 = omega * (L - L1). If we want the speed of the handle in the frame of reference of the center of mass, we can just subtract the two velocities: v0 - v1 = omega * L - omega * (L - L1). Note that the handle rotates with the same angular velocity omega that the pivot arm rotated with, and since we catch the club by the handle, it must rotate by 2*PI*m radians for m number of rotations. This allows us to calculate how long the club must stay in the air, based on the number of rotations it makes. This value is t(m) = 2 * PI * m / omega. An interesting observation is that t(m) must be equal to the t we previously calculated (since both are how long the club stays in the air). Therefore, we get the equation: 2 * PI * m / omega = 2 * omega * L /g or rearranging the variables: omega = sqrt(m

  • PI * g / L).

The throw height can be calculated using the same formula we used for balls (h = (1/8)*g*t^2), so we can substitute for t and get the following equation: h(m) = (1/8)*g*t(m)^2 = (1/8)*g*(2*PI*m/omega)^2 = m*PI*L/2. The most striking thing about this equation is that it no longer contains g. This is because in a lower gravity the club must be released slower to reach the same height and in releasing slower, since angular velocity is a byproduct of the arm motion, less spin is imparted to the club. With a lower gravity, however, the club will travel further by the exact amount needed to compensate for the slower angular velocity.

So, to recap, here are the basic equations of juggling: