How to change the color of the triangle according to the orientation of the camera and the normal vector of the triangle

Thank you for your answer.
by looking for the vtk function, i found that the actor can use SetBackfaceProperty, which can solve the problem. anyway, thank you for your answer.

the complete code is
vtkSmartPointer backProperty = vtkSmartPointer::New();
backProperty->SetColor(colors->GetColor3d(“Red”).GetData());
actor->SetBackfaceProperty(backProperty);