Thank you Eric, but I was probably not as clear as I thought. I have already seen that a 2D glyphs can be oriented given a defined vector, but, actually, I was wondering if we can make the 2D plane perpendicular/normal to this vector, as in the attached picture.<br>
<br>Hope it is clearer now<br><br>Regards<br><br>  Luc<br><br><div class="gmail_quote">2010/5/12 Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey Luc,<br>
<br>
If I understand you correctly, you want 2D glyphs on your points, but you want them oriented according to the normal vectors you&#39;ve read from your file?<br>
<br>
If you apply the Glyph filter to your data set, and then choose 2D Glyph from the Glyph Type combo-box, then you can set the type of 2d glyphs to Circle. If you want them to be oriented by the normals you&#39;ve calculated, then just make sure the Orient check-box is checked, and your normals are chosen in the Vectors combo-box. I&#39;ll attach an example screen shot of the output so you can see if this is what you&#39;re looking for. (Note, I&#39;ve also checked Filled to fill in the circles, but this isn&#39;t necessary.)<br>

<br>
If I&#39;m misunderstanding your question, feel free to rephrase it and we&#39;ll try again. :)<br>
<br>
-Eric<br>
<br>
------------------------------------------------------<br>
<font color="#888888">Eric E Monson<br>
Duke Visualization Technology Group<br>
<br>
</font><br><br>
On May 12, 2010, at 2:25 AM, luc scholtes wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I am new to Paraview and I could not find any clear information on how 2D glyphs are oriented. Is there a way to control their normals to the the 2D plane?<br>
&gt;<br>
&gt; Here is the code I use to generate a cloud of points from a text file to which I would like to assign different filters (it can be 3D or 2D, but circles oriented by their normals would be perfect...)<br>
&gt;<br>
&gt; /// here is the part to recover the data<br>
&gt; std::ifstream file (&quot;cracks.txt&quot;,std::ios::in);<br>
&gt;         if(file){<br>
&gt;              while ( !file.eof() ){<br>
&gt;                 std::string line;<br>
&gt;                 Real p0,p1,p2,s,o0,o1,o2;<br>
&gt;                 while ( std::getline(file, line) ){<br>
&gt;                     file &gt;&gt; p0 &gt;&gt; p1 &gt;&gt; p2 &gt;&gt; s &gt;&gt; o0 &gt;&gt; o1 &gt;&gt; o2;<br>
&gt;                     vtkIdType pid[1];<br>
&gt;                     pid[0] = crackPos-&gt;InsertNextPoint(p0, p1, p2);<br>
&gt;                     crackCells-&gt;InsertNextCell(1,pid);<br>
&gt;                     crackSize-&gt;InsertNextValue(s);<br>
&gt;                     float n[3] = { o0,o1,o2 };<br>
&gt;                     crackOri-&gt;InsertNextTupleValue(n);<br>
&gt;                 }<br>
&gt;              }<br>
&gt;              file.close();<br>
&gt; }<br>
&gt;<br>
&gt; /// here is the code to create the VTK file<br>
&gt; vtkSmartPointer&lt;vtkUnstructuredGrid&gt; crackUg = vtkSmartPointer&lt;vtkUnstructuredGrid&gt;::New();<br>
&gt; crackUg-&gt;SetPoints(crackPos);<br>
&gt; crackUg-&gt;SetCells(VTK_VERTEX, crackCells);<br>
&gt; crackUg-&gt;GetPointData()-&gt;AddArray(crackSize);<br>
&gt; crackUg-&gt;GetPointData()-&gt;AddArray(crackOri);<br>
&gt;<br>
&gt; vtkSmartPointer&lt;vtkXMLUnstructuredGridWriter&gt; writer = vtkSmartPointer&lt;vtkXMLUnstructuredGridWriter&gt;::New();<br>
&gt; string fn=fileName+&quot;cracks.&quot;+lexical_cast&lt;string&gt;scene-&gt;currentIteration)+&quot;.vtu&quot;;<br>
&gt; writer-&gt;SetFileName(fn.c_str());<br>
&gt; writer-&gt;SetInput(crackUg);<br>
&gt; writer-&gt;Write();<br>
&gt;<br>
&gt; Do you have any advice?<br>
&gt;<br>
&gt; Tahnks a lot in advance<br>
&gt;<br>
&gt;   Luc<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br>
<br></blockquote></div><br>