← Back to team overview

yade-users team mailing list archive

[Question #294531]: Change colour of spheres when based on Movement

 

New question #294531 on Yade:
https://answers.launchpad.net/yade/+question/294531

Hey Guys
New to Yade, been building a model for a tunnel simulation. What i'm trying to acheieve is have the spheres change colour based on there displacement so that I can see where the movement is occuring. Not sure if it's necessary to post the whole code?

Right now the line I am using is

for s in O.bodies:
		s.shape.color=scalarOnColorScale(0.1*s.state.displ().norm(),0,0) 

What currently happens is the spheres change colour, but only initially. Is this the right code to do that? Could someone explain what this code is actually doing? 



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