Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:02:40+00:00 2026-06-15T08:02:40+00:00

I tried to use VTK library from C++. Is there any example of using

  • 0

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.

a 3d plot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:02:41+00:00Added an answer on June 15, 2026 at 8:02 am

    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:

    1. generate a plane the size of your 2D matrix that holds your z values (cols & rows represent the x & y values).
    2. create xyz-points from the input matrix
    3. store the z values as scalars for each point
    4. warp that plane according to the z values of the matrix and apply colors (mapper->SetScalarRange(..)
    5. draw your plot

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to use dat.GUI in the following three.js example . I just did
I am trying to use VTK from python. I tried to find and could
Preamble Using VTK library with C++, quite often I have to write something like
I tried to use this snippet from the Soundcloud API: <script src=http://connect.soundcloud.com/sdk.js> <script> SC.initialize({
I tried to use object expression to extend the IDelegateEvent, but in fsi there
Example output 1. test,test,test,test,test, 2. test,test,test,, 3. test,test,,, 4. test,,,,, I tried use implode
I tried use javascript spilt to get part of the word : new from
I tried use js to change my url from http://localhost/text/index.php#mainpage%20menu1 to http://localhost/text/index.php#homepage%20menu1 My code
I tried to use Cleaver, that is PhoneGap / Cordova as a component of
I tried to use the following function in order to set the div's position

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.