← Back to team overview

yade-dev team mailing list archive

Re: Facet Highlight

 

ok, I get your point. That is caused by the way openGL rendering code is
written; somehow boxes have glossy surface and facets don't. I am in no
way familiar with opengl, it is mostly code Olivier has written in the
prehistoric (= pre-python) period. If you know something about opengl,
go for it, if you don't or don't have time, you can file bug about that.

Once I was trying to make specular light used, but then I gave up. The
chameleon highlight is made by changing periodically the ambient light,
the color of bodies doesn't have to be changed that way.

V.

> 
> from yade import utils
> o=Omega()
> kw_facets={'frictionAngle':0.3,'young':37e9,'wire':False,'dynamic':False,'highlight':False}
> q1 = Quaternion(Vector3(0,0,1),0)
> o1,o_angl = q1.ToAxisAngle()
> id=o.bodies.append(utils.facetBox((0,0,0),(1,1,1),(o1[2],o1[0],o1[1],o_angl),exampleNumber=10,color=(1,1,0.1),**kw_facets))
> o.bodies.append(utils.box(center=[0,2,0],orientation=[o1[2], o1[0],
> o1[1], o_angl],extents=[1,1,1],color=[1,1,0.1]))
> from yade import qt
> qt.View()




References