[vtkusers] plotting functions and surfaces again with vtk
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue May 20 13:28:32 EDT 2003
>>>>> "KAS" == kemal Asad-Syed <kasadsyed at hotmail.com> writes:
KAS> i am sorry to ask this question again but because of some
KAS> technical issues i lost the sample c or c++ code to plot
KAS> function such as y = Sin(x) and surfaces z = f(x,y), i am
KAS> trying to use the Vtk. thanks Kemal
I'm not sure what the best way to plot a one dimensional curve in VTK
is. However plotting z = F(x, y) should be a piece of cake if you use
a vtkStructuredPoints object to represent the x-y plane, and at each
of its points provide values for z and store these values as the
scalar attributes of the plane. Then pass the output of this through
vtkWarpScalar and then visualize the surface. expCos.cxx provides a
nice but fairly complex example from a newbies perspective:
VTK/Graphics/Testing/Cxx/expCos.cxx
cheers,
prabhu
More information about the vtkusers
mailing list