Hi all<br>I used the following example code to see how the quadratic Tetrahedron gets on the screen.<br>Surprisingly it is not a curved object but kind of multi linear .<br>What is wrong with my pipeline ?<br><br><br><br><br>
int main(int argc, char** argv)<br>{<br> vtkUnstructuredGrid *meshGrid = vtkUnstructuredGrid::New() ;<br><br> VTK_CREATE(vtkPoints, points);<br> //points->Allocate(24);<br> points->InsertNextPoint(0.,0.,0.) ;<br>
points->InsertNextPoint(1.,0.,0.) ;<br> points->InsertNextPoint(0.,1.,0.) ;<br> points->InsertNextPoint(0.,0.,1.) ;<br><br> points->InsertNextPoint(0.5,0.,0.) ;<br> points->InsertNextPoint(0.5,0.5,0.) ;<br>
points->InsertNextPoint(0.0,0.5,0.) ;<br><br> points->InsertNextPoint(0.,0.,0.5) ;<br> points->InsertNextPoint(0.65,0.,0.65) ;<br> points->InsertNextPoint(0.,0.65,0.65) ;<br><br> meshGrid->SetPoints(points) ;<br>
<br> vtkIdList* pts = vtkIdList::New();<br> pts -> InsertId(0,0) ;<br> pts -> InsertId(1,1) ;<br> pts -> InsertId(2,2) ;<br> pts -> InsertId(3,3) ;<br> pts -> InsertId(4,4) ;<br> pts -> InsertId(5,5) ;<br>
pts -> InsertId(6,6) ;<br> pts -> InsertId(7,7) ;<br> pts -> InsertId(8,8) ;<br> pts -> InsertId(9,9) ;<br><br> meshGrid->InsertNextCell (VTK_QUADRATIC_TETRA, pts) ;<br><br> vtkDataSetMapper *meshMapper = vtkDataSetMapper::New();<br>
meshMapper -> SetInput(meshGrid);<br> //meshMapper -> SetRepresentationToWireframe() ;<br><br> vtkActor *meshActor = vtkActor::New();<br> meshActor -> SetMapper(meshMapper);<br><br> vtkRenderer *ren = vtkRenderer::New() ;<br>
ren -> SetBackground(0.2,0.2,0.15) ;<br> ren -> AddActor(meshActor) ;<br><br> vtkRenderWindow *renWin = vtkRenderWindow::New() ;<br> renWin ->AddRenderer(ren) ;<br> renWin ->SetSize(1024,768) ;<br>
<br> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New() ;<br> iren -> SetRenderWindow(renWin);<br> iren -> Initialize();<br> iren -> Start();<br><br> std::cout << std::endl ;<br>
<br>}<br><br>