[vtkusers] Drwaing Functions using VTK

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Wed Apr 2 16:43:52 EST 2003


Sharbel,
   vtkQuadric wont do it, and I dont know of any other way. I think you
would have to derive a new class from vtkImplicitFunction, vtkQuadric be a
good starting point. The heart of implicit functions in vtk is two
functions: EvaluateFunction and EvaluateGradient. You could define a new
vtk class that allows the user to provide these functions, registered with
the class and called when required. This will allow users to define there
own, arbitrary implicit functions.
The routine in vtk is then to sample the implicit function over a volume
with vtkSampleFunction, and then extract a surface, typically f=0, with
vtkContourFilter.

  regards
    Dave


|--------+--------------------------------->
|        |          "Sharbel Dalal"        |
|        |          <sdalal at inter.net.il>  |
|        |          Sent by:               |
|        |          vtkusers-admin at public.k|
|        |          itware.com             |
|        |                                 |
|        |                                 |
|        |          02/04/2003 23:03       |
|        |                                 |
|--------+--------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:     <vtkusers at public.kitware.com>                                                                 |
  |      cc:                                                                                                   |
  |      Subject:     [vtkusers] Drwaing Functions using VTK                                                   |
  >------------------------------------------------------------------------------------------------------------|




Hello,
I am a student and I am doing a project for my university , it's a semi
matlab language and we need to draw planes in the project, I chose VTK to
do so, I am sure it has the capabilities to do so, but ive been reading the
examples and all I found was an example of a quadric function, can anyone
tell me how (or perhaps give me an example) I can draw a non linear
function e.g f(x,y,z)=x^7*y^2+z*y+2
Your help would be really appreciated.
Thanks
Sharbel






More information about the vtkusers mailing list