Check out the fiddle I made: http://jsfiddle.net/kbtn6pz5/
In this code snippet, I am moving the camera to a random point on a sphere, adjusting its lookAt property, and setting its altitude above the surface of the sphere.
This example is based on the fiddle boilerplate...
var camera, scene, renderer, geometry, material, mesh;
initialize();
animateScene();
function initialize() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 10000);
scene.add(camera);
var radius = 200;
geometry = new THREE.SphereGeometry(radius, 32, 32);
material = new THREE.MeshNormalMaterial();
mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
var point = THREE.GeometryUtils.randomPointsInGeometry(geometry, 1);
var altitude = 100;
var coefficient = 1 + altitude / radius;
camera.position.x = point[0].x * coefficient;
camera.position.y = point[0].y * coefficient;
camera.position.z = point[0].z * coefficient;
camera.lookAt(mesh.position);
renderer = new THREE.CanvasRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
}
function animateScene() {
requestAnimationFrame(animateScene);
renderScene();
}
function renderScene() {
renderer.render(scene, camera);
}