Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradient colour to elements / meshes #134

Open
ricardoavelino opened this issue Apr 4, 2022 · 2 comments
Open

Gradient colour to elements / meshes #134

ricardoavelino opened this issue Apr 4, 2022 · 2 comments

Comments

@ricardoavelino
Copy link

ricardoavelino commented Apr 4, 2022

Feature Request

It would be a great adition to be able to add "gradient colour" to elements or meshes.

This could be done, for example, by assigning colours to the vertices of a mesh (or mesh face), instead of assigning only one colour to it. Then the Viewer should interpolate the colour of that face (or mesh itself) based on an interpolation of the colour values assigned to the vertices.

Details

This could be very useful, for example to express the stresses in a cross section. @GeneKao perhaps can also give some insight since he implemented his own colour interpolation for compas_cra. (See his nice paper)

@GeneKao
Copy link
Contributor

GeneKao commented Apr 12, 2022

@ricardoavelino I hacked this in the old viewer, which is quite different from the current version.
Maybe @Licini can find a better way to implement this? maybe from the user level can give a parameter called face_vertice_color? and the viewer needs to be safeguarded to make sure that the user provides the length of a list colour needs to match with vertice number. For example, for a polygon with 5 points, the user needs to provide 5 colours, and the middle point (make triangles for the polygon) needs to be interpreted.

@franaudo
Copy link

franaudo commented Sep 6, 2022

@Licini is there any update on this? It can be very useful for FEA2. Thanks!!

@Licini Licini mentioned this issue Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants