# Virtual reality

Hello, I am looking for a way to position (and aim) the camera exactly where I want, in this simple virtual world, in order to calculate the azimuth and elevation of an object from my point of view.

## HTML Iframes

Camera positionning problem:

It seems that the camera is set at (0,0,5) by default. Here is something that works for me:

1. Bring the camera to the origin: \sqrt(E_0 * Cam),
2. Rotate the camera,
3. Moving the camera along a direction with: [1 -( d/2*(E_O \vee V).\text{Normalized} * I ],

?1) I am still wondering about the translator used in step 1 vs the one used in step 3.
?2) I had expected the motor, to be multiplied the other way around: T2 * Rz * Ry * T1, rather than T1 * Ry * Rz * T2
World View:

Eye View:

var point = (x,y,z)=>1e123+ x1e203+ y1e013 +z1e102;
var dir = (x,y,z)=>!(x
1e1 + y1e2 + z1e3);
//###################################################################
//#################### Rendering #####################################
//###################################################################

var webGL=document.body.appendChild(this.graph(()=>
{

var sqrt = motor => (Math.sign(motor.s) + motor).Normalized;
var motor = (line,angle_or_distance)=>Math.E**(angle_or_distance/2 * line);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Where I want to go
var here = point(0,0.0,-5)//relative move … down to the origin
var T1 = ()=>sqrt(1e123 * here)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Rotation Motor
var Ry = Math.E**((90 * Math.PI / 180/2)1e13) // ccw from top view
var Rx = Math.E
*((0 * Math.PI / 180/2)1e23)
var Rz = Math.E
*((30 * Math.PI / 180/2)*1e12) // looking in the sky
//----------------------------------------------
// Translation Motor
var V= dir(1,0,0) // direction vector
var distance = 0.25 // +: backing off | -:geting closer

var T2 = 1 -( distance/2*(1e123 & V).Normalized *1e0123 )
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

camera.set(T1 * Ry * Rz * T2);

  return render


}
,{ camera,…

Now it seems ok…

## HTML Iframes

Camera positionning problem: