<pre style="margin-top:0px;margin-bottom:0px">On Wed, Nov 21, 2012 at 11:40 AM, web-Dmitri web-Danewitz <span dir="ltr"><<a href="mailto:d.danewitz@web.de" target="_blank">d.danewitz@web.de</a>></span> wrote:</pre><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div>Thank you David,<br></div><div><br></div><div>It still does not work for me. I made a very small example, explaining my problem. <br>
<br>What I expect to see when I shine on the surface is for it to look something like this:<br><a href="http://i.imgur.com/DpH6m.jpg" target="_blank">http://i.imgur.com/DpH6m.jpg</a><br><br>Instead it looks like this:<br>
<a href="http://i.imgur.com/Wz4ga.jpg" target="_blank">http://i.imgur.com/Wz4ga.jpg</a><br><br>But when I just make the surface to be shined on smaller (-5, 5, -5, 5, -5, 5) instead of (-500, 500, -500, 500, -5, 5) it look like this:<br>
<a href="http://i.imgur.com/Je5BD.jpg" target="_blank">http://i.imgur.com/Je5BD.jpg</a><br><br>Is there a away to make it look like picture 1?<br><br>Here's the short code used for this example:</div></div></div></blockquote>
<div><br></div><div>I can't get this to work either. I have simplified the example by creating a plane on which to shine the light. I have placed a sphere at the point that the light is supposed to be focused on. I have used a vtkLightActor to verify that the light is pointing where we expect. The scene looks correct without this line:</div>
<div><br></div>
<div>renderer->AddLight(light);</div><div><br></div><div>but as soon as I add that light, the plane disappears entirely (is black?) when viewed from any direction, and the sphere is only visible when viewed from the direction of the light. </div>
<div><br></div><div>Can anyone explain what we are doing wrong here?</div><div><br></div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkLightCollection.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkProperty.h></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderer.h></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderWindow.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkPlaneSource.h></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkSphereSource.h></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkPolyDataMapper.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkActor.h></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkLight.h></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkLightActor.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkSmartPointer.h></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderWindowInteractor.h></span></pre><pre style="margin-top:0px;margin-bottom:0px"><br>
</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>main()</pre><pre style="margin-top:0px;margin-bottom:0px">{</pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderer</span>><span style="color:rgb(192,192,192)"> </span>renderer<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderer</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span>lightPosition[<span style="color:rgb(0,0,128)">3</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1</span>};</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">light</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span>lightFocalPoint[<span style="color:rgb(0,0,128)">3</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">0</span>};</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkLight</span>><span style="color:rgb(192,192,192)"> </span>light<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkLight</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetLightTypeToSceneLight();</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetPosition(lightPosition[<span style="color:rgb(0,0,128)">0</span>],<span style="color:rgb(192,192,192)"> </span>lightPosition[<span style="color:rgb(0,0,128)">1</span>],<span style="color:rgb(192,192,192)"> </span>lightPosition[<span style="color:rgb(0,0,128)">2</span>]);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetPositional(<span style="color:rgb(128,128,0)">true</span>);<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">required</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">vtkLightActor</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">below</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetFocalPoint(lightFocalPoint[<span style="color:rgb(0,0,128)">0</span>],<span style="color:rgb(192,192,192)"> </span>lightFocalPoint[<span style="color:rgb(0,0,128)">1</span>],<span style="color:rgb(192,192,192)"> </span>lightFocalPoint[<span style="color:rgb(0,0,128)">2</span>]);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetDiffuseColor(<span style="color:rgb(0,0,128)">1</span>,<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">0</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetAmbientColor(<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">1</span>,<span style="color:rgb(0,0,128)">0</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>light->SetSpecularColor(<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">1</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkLightCollection</span>*<span style="color:rgb(192,192,192)"> </span>originalLights<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>renderer->GetLights();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span>::cout<span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Originally</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">there</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">are</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span>originalLights->GetNumberOfItems()<span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">lights."</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span>::endl;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer->AddLight(light);<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">commenting</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">this</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">line</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">shows</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">plane</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">normal</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">light</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span>::cout<span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Now</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">there</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">are</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span>originalLights->GetNumberOfItems()<span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">lights."</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span>::endl;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Display</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">where</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">light</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">is</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkLightActor</span>><span style="color:rgb(192,192,192)"> </span>lightActor<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkLightActor</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightActor->SetLight(light);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer->AddViewProp(lightActor);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Display</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">where</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">light</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">is</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">focused</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkSphereSource</span>><span style="color:rgb(192,192,192)"> </span>lightFocalPointSphere<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkSphereSource</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointSphere->SetCenter(lightFocalPoint);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointSphere->SetRadius(<span style="color:rgb(0,0,128)">.1</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointSphere->Update();</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>><span style="color:rgb(192,192,192)"> </span>lightFocalPointMapper<span style="color:rgb(192,192,192)"> </span>=</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointMapper->SetInputConnection(lightFocalPointSphere->GetOutputPort());</pre><pre style="margin-top:0px;margin-bottom:0px">
<br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>><span style="color:rgb(192,192,192)"> </span>lightFocalPointActor<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointActor->SetMapper(lightFocalPointMapper);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>lightFocalPointActor->GetProperty()->SetColor(<span style="color:rgb(0,0,128)">1.0</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span>);<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//(R,G,B)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer->AddViewProp(lightFocalPointActor);</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">cube</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">light</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">shine</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">on</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPlaneSource</span>><span style="color:rgb(192,192,192)"> </span>plane<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPlaneSource</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>plane->Update();</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>><span style="color:rgb(192,192,192)"> </span>planeMapper<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>planeMapper->SetInputData(plane->GetOutput());</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>><span style="color:rgb(192,192,192)"> </span>planeActor<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>planeActor->SetMapper(planeMapper);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer->AddActor(planeActor);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderWindow</span>><span style="color:rgb(192,192,192)"> </span>renderWindow<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderWindow</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderWindow->AddRenderer(renderer);</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span>><span style="color:rgb(192,192,192)"> </span>renderWindowInteractor<span style="color:rgb(192,192,192)"> </span>=</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span>>::New();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderWindowInteractor->SetRenderWindow(renderWindow);</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(192,192,192)"> </span>renderWindow->Render();</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderWindowInteractor->Start();</pre><pre style="margin-top:0px;margin-bottom:0px">
<br></pre><pre style="margin-top:0px;margin-bottom:0px">}</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><br><div>David </div></div>