[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: Re: [vtkusers] Displaying multiple implicit functions
From: Bill Lorensen <bill.lorensen () gmail ! com>
Date: 2010-09-29 3:55:28
Message-ID: AANLkTikGFKgW94dBVj8gRHu-PscX2tWL8u9xrD4T+Ptc () mail ! gmail ! com
[Download RAW message or body]
You can use ImplicitBoolean to combine multiple implicit functions.
See this example which has 2 spheres:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filters/ImplicitBoolean
On Tue, Sep 28, 2010 at 2:27 AM, ChiaWeng Boon <chiaweng@gmail.com> wrote:
> Hi,
>
> To display ONE implicit function F(x,y,z)=0, I use vtksamplefunction,
> as shown below. The output of vtkSampleFunction in ImageData format is
> written to a file using vtkXMLImageDataWritter. How do I write MANY
> different implicit functions in one single file? Put them into cells
> of unstructured grids? If yes, how?
>
> ImpFunc* function = ImpFunc::New();
> vtkSampleFunction* sample = vtkSampleFunction::New();
> sample->SetImplicitFunction(function);
> sample->SetModelBounds(xmin, xmax, ymin, ymax, zmin, zmax);
> sample->SetSampleDimensions(20,20,20);
> sample->ComputeNormalsOff();
> sample->Update();
> vtkSmartPointer<vtkXMLImageDataWriter> writer = vtkXMLImageDataWriter::New();
> writer->SetFileName(string a);
> writer->SetInput(sample->GetOutput());
> writer->Write();
>
> I am an absolute beginner. Showing the code that I have to write to
> solve the problem will be helpful.
>
>
> Yours,
>
> boon
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic