[vtkusers] How to draw a checkered floor in VTK?

kenichiro yoshimi rccm.kyoshimi at gmail.com
Fri Jun 2 22:21:47 EDT 2017


Hi AC,

I don't have any idea about how to create an infinite grid, since
simulating an infinite plane would need a large meshes and they would
require a large amount of memory.  And I'm not sure if there is a way
to describe meshes periodically in VTK.

Alternatively you can use texture mapping. I do not know this way
satisfies your needs, but this might be a somewhat better than
creating large unstructured or structured grids.
I attached the sample code. I hope this will be of some help.

Best Regards,

2017-06-02 22:12 GMT+09:00 alican <alican1812 at hotmail.com>:
> Kenichiro, you are a life saver. I am a completely newbie to VTK, and I am
> struggling with it a lot. Please allow me one more question:
>
> How to make this grid infinite?  Like we see in 3D computer games?  I have
> tried this approach:
>
> SetOrigin(0.0, 0.0, 0.0)
> SetPoint1(10.0, 0.0, 0.0 );
> SetPoint2(0.0, 10.0, 0.0 );
>
> and then
> SetXResolution(10);
> SetYResolution(10);
>
> but this way I can only increase / decrease the size and the number of
> squares in the grid, not the total size of the grid.
> Sorry if this is a stupid question, as I said, I am still learning.
>
> Thank you again.
> AC
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-draw-a-checkered-floor-in-VTK-tp5743506p5743516.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextureMapPlane.zip
Type: application/zip
Size: 1954 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170603/56fc21e3/attachment.zip>


More information about the vtkusers mailing list