Type of 3D Rotation Animation used in this video

http://youtu.be/IUZqinlhono

I have referred to an application for interactive rotation in 3D space. The same is uploaded on youtube for your reference.
I am having difficulty in understanding the rotation of the axis. In the reference app, axis of model moves in bernoulli’s lemniscate path. When we swipe horizontal or vertical, it rotates complete 360 degrees
however when the angle of swipe is changed (not exactly parallel to X-axis or Y-axis) model’s axis moves in lemniscate path and comes back to starting position.

I am not abel to understand the concept and functioning behind this action. I am really stuck and have tried really hard to understand but failed. I will be obliged if anyone helps me understand this.

http://youtu.be/IUZqinlhono

I believe it is a simple angle/axis rotation with the object offset from its center of rotation. Put three objects together like this:

11572-angleaxis2.jpg

The red sphere is a child of the red block, the red block is a child of the translucent sphere. The block starts on the backside (positive Z) of the sphere. The translucent sphere is only necessary as a visualization aid. It can be replaced by an empty game object. Now attach this script to the translucent sphere:

using UnityEngine;
using System.Collections;

public class AngleAxis : MonoBehaviour {
	private Vector2 v2StartPos;
	private bool bMoving = false;
	
	void Update () {
		
		if (Input.GetMouseButtonDown (0)) {
			bMoving = true;
			v2StartPos = (Vector2)Input.mousePosition;
    	}
	
		if (Input.GetMouseButton (0)) {
			if (bMoving)
				RotateSphere ((Vector2)Input.mousePosition);
		}
		
		if (Input.GetMouseButtonUp(0))
					bMoving = false;
	}

	void RotateSphere(Vector2 fingerPos)
		{
		Vector3 v3Direction = fingerPos - v2StartPos;
		Vector3 v3Axis;
		v3Axis.y = -v3Direction.x;
		v3Axis.x = v3Direction.y;
		v3Axis.z = 0.0f;
		
		gameObject.transform.RotateAround(v3Axis, v3Direction.magnitude/500.0f);
		v2StartPos = fingerPos;
		}
}

The rotation is not a perfect match, but it is close and you can see by playing a bit with the distances and/or with how the axis is calculated, the two could match. If you play the video and visualize the figure attached to a sphere that is being rotated, the logic of the movements seem clear.