I tried to use VTK library from C++.
Is there any example of using VTK just to plot simple 3D contour graph like the one shown below?
The official VTK Wiki has dozens of code examples, but I cannot find any useful example of this simple task.

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A while back I wanted to do the very same thing and did some extensive searching. It didn’t turn up much so I want to share with you my solution. It contains some superfluous code but it works. http://pastie.org/4721543
I just rediscovered this question because VTK 6.0 will have a plotsurface function. Which most likely will be far more performant than what my code does. I will try it later and update this post.
A little explanation to my code might be helpful though. It does the following:
mapper->SetScalarRange(..)It also adds a timer and an update command, it outputs rendering statistics, etc. as I said there’s much you can leave out. My blog post elaborates a little bit more on this, but not much.