<div dir="ltr">The camera also has a SetViewShear() method you might find useful:<div><br></div><div>camera.SetViewShear(0.1, 0.1, 0.0)</div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 31, 2018 at 2:21 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sebastien,<div><br></div><div>So your goal is to make VTK do an orthographic projection instead of</div><div>a perspective projection?  If so then you don't have to build your own</div><div>transform, the camera has an orthographic mode that it calls the</div><div>"ParallelProjection" mode:</div><div><br></div><div>camera = renderer.GetActiveCamera()</div><div>camera.ParallelProjectionOn()</div><div>camera.SetParallelScale(500.0) # tweak as needed</div><div><br></div><div>Set the camera pose in the usual way:</div><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">camera.SetFocalPoint(0.0, 0.0, 0.0)</span><br></div><div>camera.Position(0.0, 0.0, -500.0)</div><div>camera.SetViewUp(0.0, 1.0, 0.0)</div><div><br></div><div>Hope this helps.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span><span class=""><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 31, 2018 at 8:49 AM, smurphy <span dir="ltr"><<a href="mailto:sebastien.murphy@gmail.com" target="_blank">sebastien.murphy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, <br>
<br>
I am (desperately) trying to make an orthographic projection in a plane of a<br>
geometry (see picture attached). <br>
The only help I can find online is this thread so I am replying to this old<br>
post. <br>
I tried to do the following code but without success. It simply place the<br>
camera in the correct position but does not actually make the<br>
transformation. Am I missing a line, should I pass the transform to the<br>
camera in a certain way? <br>
Thanks a lot, <br>
Sebastien <br>
<br>
#center of the geometry volume is 0,0, -500 <br>
FocalPoint=[0,0,-500] <br>
Position=[0,0,-500] <br>
ViewUp=[0,0,-500] <br>
Transform=vtk.vtkPerspectiveTr<wbr>ansform() <br>
Transform.SetupCamera(Position<wbr>, FocalPoint, ViewUp) <br>
Transform.Ortho(-1000,1000,-15<wbr>00,1500,-500,500) <br>
<<a href="http://vtk.1045678.n5.nabble.com/file/t342442/Screen_Shot_2018-05-31_at_16.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/file/t342442/Screen_Shot_2<wbr>018-05-31_at_16.png</a>> <br></blockquote></div></div></div></span></div>
</blockquote></div><br></div>