<html><head></head><body><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/>http://i.imgur.com/DpH6m.jpg<br/><br/>Instead it looks like this:<br/>http://i.imgur.com/Wz4ga.jpg<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/>http://i.imgur.com/Je5BD.jpg<br/><br/>Is there a away to make it look like picture 1?<br/><br/>Here&#39;s the short code used for this example:<br/></div><div><br/></div><div><br/></div><div>#include &quot;stdafx.h&quot;<br/>#include &quot;vtkRenderer.h&quot;<br/>#include &quot;vtkRenderWindow.h&quot;<br/>#include &quot;vtkWin32RenderWindowInteractor.h&quot;<br/>#include &quot;vtkCubeSource.h&quot;<br/>#include &quot;vtkPolyDataMapper.h&quot;<br/>#include &quot;vtkActor.h&quot;<br/>#include &quot;vtkLight.h&quot;<br/><br/>int main ()<br/>{<br/>&nbsp;&nbsp;&nbsp; vtkRenderer *renderer = vtkRenderer::New(); <br/><br/>&nbsp;&nbsp;&nbsp; int x = 0;<br/>&nbsp;&nbsp;&nbsp; int y = 0;<br/>&nbsp;&nbsp;&nbsp; int z = 100;<br/><br/>&nbsp;&nbsp;&nbsp; //Create a light<br/>&nbsp;&nbsp;&nbsp; vtkLight *light = vtkLight::New();<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetLightTypeToSceneLight();<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetPosition(x, y, z);<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetFocalPoint(0, 0, 0);<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetIntensity(0.5);<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetConeAngle(20);<br/>&nbsp;&nbsp;&nbsp; light-&gt;SetPositional(1);<br/>&nbsp;&nbsp;&nbsp; renderer-&gt;AddLight(light);<br/><br/>&nbsp;&nbsp;&nbsp; //Create a cube where the light is<br/>&nbsp;&nbsp;&nbsp; vtkCubeSource *lightCube = vtkCubeSource::New();<br/>&nbsp;&nbsp;&nbsp; lightCube-&gt;SetBounds(x-2, x+2, y-2, y+2, z-2, z+2);<br/><br/>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *maplightCube = vtkPolyDataMapper::New();<br/>&nbsp;&nbsp;&nbsp; maplightCube-&gt;SetInput(lightCube-&gt;GetOutput());<br/><br/>&nbsp;&nbsp;&nbsp; vtkActor *alightCube = vtkActor::New();<br/>&nbsp;&nbsp;&nbsp; alightCube-&gt;SetMapper(maplightCube);<br/><br/>&nbsp;&nbsp;&nbsp; renderer-&gt;AddActor(alightCube);<br/><br/>&nbsp;&nbsp;&nbsp; //Create a cube for the light to shine on<br/>&nbsp;&nbsp;&nbsp; vtkCubeSource *cube = vtkCubeSource::New(); //obst1<br/>&nbsp;&nbsp;&nbsp; cube-&gt;SetBounds(-500, 500, -500, 500, -5, 5);<br/><br/>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *mapCube = vtkPolyDataMapper::New();<br/>&nbsp;&nbsp;&nbsp; mapCube-&gt;SetInput(cube-&gt;GetOutput());<br/><br/>&nbsp;&nbsp;&nbsp; vtkActor *aCube = vtkActor::New();<br/>&nbsp;&nbsp;&nbsp; aCube-&gt;SetMapper(mapCube);<br/><br/>&nbsp;&nbsp;&nbsp; renderer-&gt;AddActor(aCube);<br/>&nbsp;&nbsp;&nbsp; renderer-&gt;SetBackground(1,1,1);<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; vtkRenderWindow *renWin = vtkRenderWindow::New();<br/>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(renderer);<br/><br/>&nbsp;&nbsp;&nbsp; vtkWin32RenderWindowInteractor *iren = vtkWin32RenderWindowInteractor::New();<br/>&nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow(renWin);<br/><br/>&nbsp;&nbsp;&nbsp; renWin-&gt;SetSize(1200,800);<br/>&nbsp;&nbsp;&nbsp; renWin-&gt;Render();<br/><br/>&nbsp;&nbsp;&nbsp; iren-&gt;Start();<br/><br/>}<br/><br/>
<br/></div><div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
    <div style="margin:0 0 10px 0;">
        <b>Gesendet:</b>&nbsp;Mittwoch, 21. November 2012 um 16:28 Uhr<br/>
        <b>Von:</b>&nbsp;&quot;David Doria&quot; &lt;daviddoria@gmail.com&gt;<br/>
        <b>An:</b>&nbsp;Kein Empf&auml;nger<br/>
        <b>Cc:</b>&nbsp;&quot;web-Dmitri web-Danewitz&quot; &lt;d.danewitz@web.de&gt;, vtkusers@vtk.org<br/>
        <b>Betreff:</b>&nbsp;Re: [vtkusers] Light source similar to a flashlight?
    </div>
    <div name="quoted-content">
        On Wed, Nov 21, 2012 at 9:50 AM, Joachim Pouderoux <span>&lt;<a href="joachim.pouderoux@kitware.com" target="_parent">joachim.pouderoux@kitware.com</a>&gt;</span> wrote:<br/><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
Hello Dmitri,<br/><br/>Yes of course it is possible. Take a look at the vtkLight documentation here:<br/><a href="http://www.vtk.org/doc/nightly/html/classvtkLight.html#details" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkLight.html#details</a><br/>

<br/>Consider to set the light position, focal point and cone angle then call SetPositionalOn().<br/><br/>Hope it helps,<br/><br/>Regards,</blockquote><div><br/></div>There is a shadow example here:<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Shadows" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Shadows</a><br clear="all"/>
<br/></div><div>If you could extract just what you said (a light making a circle on a plane) into a simple &quot;Light&quot; example, that would be a nice addition to the examples!</div><div><br/></div><div>David</div></div>

    </div>
</div><div><br/><br/></div></div></body></html>