title: VTK: display subdivided polygon
body: <p>I have created an icosahedron and subdivided it, I am not trying to display it but it seems to be displaying it un-subdivided. Here is my code:</p>
  
  <pre><code>vtkSmartPointer&lt;vtkPlatonicSolidSource&gt; icosahedron = vtkSmartPointer&lt;vtkPlatonicSolidSource&gt;::New();
       icosahedron-&gt;SetSolidTypeToIcosahedron();
       icosahedron-&gt;Update();
  
       cout &lt;&lt; " Centre is " &lt;&lt; icosahedron-&gt;GetOutput()-&gt;GetCenter()[0] &lt;&lt; ", " &lt;&lt; icosahedron-&gt;GetOutput()-&gt;GetCenter()[1] &lt;&lt; ", " &lt;&lt; icosahedron-&gt;GetOutput()-&gt;GetCenter()[2] &lt;&lt; endl;
       cout &lt;&lt; "    There are " &lt;&lt; icosahedron-&gt;GetOutput()-&gt;GetNumberOfPolys() &lt;&lt; " triangles." &lt;&lt; endl;
       cout &lt;&lt; " there are " &lt;&lt; icosahedron-&gt;GetOutput()-&gt;GetNumberOfPoints() &lt;&lt; " points " &lt;&lt; endl;
  
       vtkSmartPointer&lt;vtkPolyDataAlgorithm&gt; subdivisionFilter;
       subdivisionFilter = vtkSmartPointer&lt;vtkLinearSubdivisionFilter&gt;::New();
       dynamic_cast&lt;vtkLinearSubdivisionFilter *&gt; (subdivisionFilter.GetPointer())-&gt;SetNumberOfSubdivisions(2);
       subdivisionFilter-&gt;SetInput(icosahedron-&gt;GetOutput());
       subdivisionFilter-&gt;Update();
  
       cout &lt;&lt; " After " &lt;&lt; endl;
       std::cout &lt;&lt; "    There are " &lt;&lt; subdivisionFilter-&gt;GetOutput()-&gt;GetNumberOfPoints() &lt;&lt; " points." &lt;&lt; std::endl;
       std::cout &lt;&lt; "    There are " &lt;&lt; subdivisionFilter-&gt;GetOutput()-&gt;GetNumberOfPolys() &lt;&lt; " triangles." &lt;&lt; std::endl;
  
  
       vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapper = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();
       mapper-&gt;SetInputConnection(subdivisionFilter-&gt;GetOutputPort());
  
       vtkSmartPointer&lt;vtkActor&gt; actor = vtkSmartPointer&lt;vtkActor&gt;::New();
       actor-&gt;SetMapper(mapper);
  
       vtkSmartPointer&lt;vtkRenderer&gt; renderer =  vtkSmartPointer&lt;vtkRenderer&gt;::New();
       vtkSmartPointer&lt;vtkRenderWindow&gt; renderWindow = vtkSmartPointer&lt;vtkRenderWindow&gt;::New();
  
       renderWindow-&gt;AddRenderer(renderer);
  
       vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor = vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();
       renderWindowInteractor-&gt;SetRenderWindow(renderWindow);
  
       //Add the actors to the scene
       renderer-&gt;AddActor(actor);
       renderer-&gt;SetBackground(.1, .2, .3);
  
       //Render and interact
       renderWindow-&gt;Render();
       renderWindowInteractor-&gt;Start();
  </code></pre>
  
  <p>The console output is:</p>
  
  <pre><code> Centre is 0, 0, 0
      There are 20 triangles.
   there are 12 points 
   After 
      There are 162 points.
      There are 320 triangles.
  </code></pre>
  
  <p>Confirming that it has indeed been subdivided.</p>