Hi all,<br><br>&nbsp;&nbsp; I need to put the following camera&#39;s parameters (perspective projection model):<br><br>Viewplane at Z = 0<br>Eyepoint or center of projection at Z = -0,839 (being the focal length of the camera, noted d)
<br>Height (and width) of the RenderWindow = 2 (measured in millimeters)<br>ViewUp (0,1,0)<br><br>Then, this is the code I used to develop the previous camera model with the vtkCamera class:<span style="font-family: monospace;">
</span><pre style="font-family: arial,sans-serif;">
<font size="2">vtkCamera *camera = vtkCamera::New();<br><br>camera-&gt;SetViewUp(0, 1, 0);                 // ViewUp<br>camera-&gt;SetPosition(0, 0, -d);               // Eyepoint<br>camera-&gt;SetFocalPoint(0, 0, 0);            // Viewplane
<br>camera-&gt;ComputeViewPlaneNormal(); </font></pre><font size="2"><span style="font-family: arial,sans-serif;">double h = 2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // h is the height of the RenderWindow</span><br style="font-family: arial,sans-serif;">
<span style="font-family: arial,sans-serif;">double d = 0,839;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // d is the distance from your eyes to the screen</span></font><font size="2"><br>double angleofview = 2. * atan((h/2.)/d);&nbsp;&nbsp;&nbsp; // angleofview = 2*atan((h/2)/d)
</font>
<br><br>camera-&gt;SetViewAngle(angleofview);<br><br>I tested it and It seems that it works, but I don&#39;t know if I&#39;m properly using the vtkCamera<br>class to implement what I really need. <br><br>Any help will be grateful.
<br><br>Thanks all.<br>