# Camera set-up in graph function

how is the camera define in the graph function. Is there a way to set up its location, aiming azimuth and elevation?
Algebra(3,0,1,()=>this.graph([1e123,1e23,1e13,1e12],{camera:1+.5e01-.5e02})); // and in 3D PGA

The h and p parameters control the heading and pitch respectively - should be enough. You can see it in action in the very first 3D PGA example. I hope that’s what you were asking for?

Thank you, That would be perfect, if there were a roll as well.

h : 10* Math.PI / 180/2, // Heading
p : 90* Math.PI / 180/2, // Pitching

I am still trying to figure out how to position the camera at the origin and then move it from there, !!Notice the glitch when you first drag the mouse, it goes back to another camera set-up.

## HTML Iframes

Camera positionning problem:

\tiny{A_i}
I cannot figure out where to put the code for the camera, it looks like there is three ways to handle it:

1st) In the main code:
var camera=(1-1e02+1e13-1.2e03+0.9e01)

+++++++++++++++++++++++
2nd) there…
…{
camera:0.7+1e01,
grid : 0, // Display a grid
h : 90 * Math.PI / 180/2, // Heading

scale : 0.5, // Custom scale (default=1), mousewheel.
animate : 0,
}…
++++++++++++++++++
Third ) In the rendering:
…(this.graph(()=>
{ // for meth
var rot_y = Math.E**((90 * Math.PI / 180/2)*1e13) // ccw from top view
var camera_To_Ori = ()=>sqrt(camera * Ori)
var Moteur = rot_y

camera.set(Moteur) // rotate
//camera.set( Ori );
return[…

Getting closer, but looking for a way to move like this, along the x axis, with the mouse or a cursor.

## HTML Iframes

Camera positionning problem:

var camera=0e0;

+++++++++++++++++++
//###################################################################
//#################### Rendering #####################################
//###################################################################

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

{ // for meth
var rot_y = Math.E**((90 * Math.PI / 180/2)1e13) // ccw from top view
var rot_x = Math.E
*((90 * Math.PI / 180/2)1e23)
var rot_z = Math.E
*((0 * Math.PI / 180/2)*1e12)

//var time=performance.now()/4000; camera.set((Math.cos(time)+Math.sin(time)1e13)); //copy from
//var time=performance.now()/40; var R=Math.E
*((time * Math.PI / 180/2)1e13);camera.set(R); // ok keep
//var time=(1/2+Math.cos(performance.now()/4000)/(2))/Math.sqrt(2); var T=sqrt(Ori (timeX));camera.set(rot_y
rot_zT);
var time=(1/2+Math.cos(performance.now()/4000)/(2))10; var T=sqrt(Ori (timeM1_o));camera.set(rot_yrot_z
T);
//var time=(1/2+Math.cos(performance.now()/4000)/(2))1; var T=1+(.01t1e01);camera.set(rot_yrot_z*T);

return[
//[
“…The camera eye…”, // First label is used as title.

+++++++++++++++++++++
,{
//camera,//:Math.E**(Math.PI/41e13),
animate : true,
camera,
grid : 1, // Display a grid
//h : 80 * Math.PI / 180/2, // Heading
//p : -8 * Math.PI / 180/2,// Pitching

scale : 0.5, // Custom scale (default=1), mousewheel.
}));
++++++++++++++++++
text1,M1_o.e023.toFixed(1),
text2,(time).toFixed(3),
text3,(-1
(camera.e01)).toFixed(2),

For follow-up, see: Virtual reality