[vtkusers] How to color 2 sides of a plane by different colors? (alican)

Andras Lasso lasso at queensu.ca
Sun Nov 26 16:54:11 EST 2017


You can set different properties for front and back face of the mesh. See https://www.vtk.org/doc/nightly/html/classvtkActor.html#a67e6053de538c91fd20a496b24172dbd

Andras
________________________________
From: Andrew Maclean <andrew.amaclean at gmail.com>
Sent: Nov 26, 2017 3:44 PM
To: vtk
Cc: alican
Subject: Re: [vtkusers] How to color 2 sides of a plane by different colors? (alican)

Think of a plane has having zero thickness so it can have only one colour.
One approach is to:
1) Create two planes.
2) Offset one plane from the other by a small amount. You need to judge by how much.
3) Colour each plane's actor a different colour.
4) Render and interact.

This site has lots of examples that you may find useful: https://lorensen.github.io/VTKExamples/site/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2F&data=02%7C01%7Classo%40queensu.ca%7C4e4e1233eed14fb7582908d5350e830e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636473258804797130&sdata=3ze%2BxD6j6kvN%2B%2F8%2BxV6nyFxdMKDRzynN5ItlOzlJn3g%3D&reserved=0>


---------- Forwarded message ----------
From: alican <alican1812 at hotmail.com<mailto:alican1812 at hotmail.com>>
To: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Cc:
Bcc:
Date: Sat, 25 Nov 2017 14:37:18 -0700 (MST)
Subject: [vtkusers] How to color 2 sides of a plane by different colors?
I have seen these example : VTK/Examples/Cxx/PolyData/ColorCellsWithRGB
<https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK%2FExamples%2FCxx%2FPolyData%2FColorCellsWithRGB&data=02%7C01%7Classo%40queensu.ca%7C4e4e1233eed14fb7582908d5350e830e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636473258804797130&sdata=zV1gDfw%2BnadYhcDfyeEGzYQjZXS1em8zKq%2FL7ELYYu4%3D&reserved=0>>

and I understand how to color different cells.
But is it possible to color 2 sides of the plane in different colors?



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7C4e4e1233eed14fb7582908d5350e830e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636473258804797130&sdata=yc4wwWrajiVf6AYufDW0RPtg21RVW1%2FDBzh51Uv8VMs%3D&reserved=0>



--
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171126/81ee0dde/attachment.html>


More information about the vtkusers mailing list