← Back to team overview

yade-users team mailing list archive

Re: [Question #242575]: visualisatiion of spheres displacements by colour in 3d viewport

 

Question #242575 on Yade changed:
https://answers.launchpad.net/yade/+question/242575

    Status: Open => Answered

jduriez proposed the following answer:
Hello Ehsan,

For your first question, you can play with shape.color (defined for each
body).

Loop over bodies "b" and write something like
b.shape.color = Vector3(a,b,c) # the a,b,c are in [0,1] , they are RGB parameters you mention (abc = 100 => red, abc=010 => green, ...), and you could compute them according to b.state.pos - some reference Vector3 (the displacement)

For the 2d question, I do not know how to make particles invisible, give
maybe a look to OpenGLRenderer (https://www.yade-
dem.org/doc/yade.wrapper.html#openglrenderer), that - I guess - is
responsible for displaying things. An alternative way would be to let
ouput the considered bodies only as "wire" : try b.shape.wire = 1

Jérôme

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.