Re: [Yade-users] [Question #700931]: How to colour in the particles in my own specific way (sequence)

2022-03-16 Thread Xifan Li
Question #700931 on Yade changed:
https://answers.launchpad.net/yade/+question/700931

Status: Answered => Solved

Xifan Li confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #700931]: How to colour in the particles in my own specific way (sequence)

2022-03-16 Thread Bruno Chareyre
Question #700931 on Yade changed:
https://answers.launchpad.net/yade/+question/700931

Status: Needs information => Answered

Bruno Chareyre proposed the following answer:
Hi,

That's how bodies are colored based on their subdomain in the mpi
module, it should apply for anything else with appropriate tuning:

import colorsys
colorScale = [Vector3(colorsys.hsv_to_rgb(value*1.0/numThreads, 1, 1)) for 
value in range(0, numThreads)]
for b in O.bodies:
   b.shape.color = colorScale[b.subdomain]

Bruno

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #700931]: How to colour in the particles in my own specific way (sequence)

2022-03-15 Thread Robert Caulk
Question #700931 on Yade changed:
https://answers.launchpad.net/yade/+question/700931

Status: Open => Needs information

Robert Caulk requested more information:
Hello,

What is "the diagonal?" What is "the other areas?" What is "the result I
wanted?"

Please review our forum guidelines: https://www.yade-
dem.org/wiki/Howtoask

Cheers,

Robert

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #700931]: How to colour in the particles in my own specific way (sequence)

2022-03-14 Thread Xifan Li
New question #700931 on Yade:
https://answers.launchpad.net/yade/+question/700931

Hi, I'm a new Yader. 
Since I wanted to paint the deformation of the specimen in Figure 11 of this 
article, the idea I came up with was to use a different colour on the diagonal 
than the other areas so that I could see the result I wanted after the 
deformation. Of course by paraview.

Here is the paper:  
https://ascelibrary.org/doi/full/10.1061/(ASCE)GM.1943-5622.0001001

I want to ask your opinions about:

[1] Is the idea correct? If so, how can I use the different colours on the 
diagonal of my sample?
[2] If not, could you please give some suggestions?

I will be very grateful to wait for your answers and many thanks for your help!

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp