#include "vtkCylinderSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkProperty.h"
#include "vtkCamera.h"
#include "vtkInteractorStyleTrackballCamera.h"
int main (int argc,char* argv[])
{
vtkCylinderSource *cylinder = vtkCylinderSource::New();
cylinder->SetRadius(2);
cylinder->SetHeight(5);
cylinder->SetResolution(800);
vtkPolyDataMapper *map = vtkPolyDataMapper::New();
map->SetInputConnection(cylinder->GetOutputPort());
vtkActor *actor = vtkActor::New();
actor->SetMapper(map);
actor->GetProperty()->SetColor(0.200,0.6,0.6);
vtkRenderer * ren=vtkRenderer::New();
ren->AddActor(actor);
ren->SetBackground(0.1,0.5,0.3);
vtkRenderWindow* win=vtkRenderWindow::New();
win->AddRenderer(ren);
win->SetSize(400,400);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(win);
vtkInteractorStyleTrackballCamera *style =
vtkInteractorStyleTrackballCamera::New();
iren->SetInteractorStyle(style);
iren->Start();
cylinder->Delete();
map->Delete();
actor->Delete();
ren->Delete();
iren->Delete();
return 0;
}