← Back to team overview

yade-users team mailing list archive

Re: [Question #240509]: Rendering problem of triangles

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Burak,

could you please attach some pictures to give us better idea?

Anyway, check how this function is defined for non-deformable tatrahedron
[1]

cheers
Jan

[1]
http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/dem/Tetra.cpp#L995



2013/12/9 burak er <question240509@xxxxxxxxxxxxxxxxxxxxx>

> New question #240509 on Yade:
> https://answers.launchpad.net/yade/+question/240509
>
> Dear Yade-Dev,
>
> I have problems with rendering of faces of my deformable tetrahedron class
> that I defined within yade.  Within deformable tetrahedrons, each vertex is
> defined in a list and each face of the deformable tetrahedron also defined
> in another list including it's connected vertex indices. I create
> tetrahedrons by importing mesh from a gmsh file where its node numbering
> order is given in gmsh's manual.
>
> When I try to give opengl the normal of each face with the calculating
> method given here[1]  or even calculating it  with the node numbering as
> given in the user manual of gmsh , I see the coloring difference of the
> tetrahedrons faces. My drawing function of the deformable elements can be
> found here[2].
>
> So I want to ask; What may cause the difference of the colors of the faces
> of tetrahedron with the code given at[2]? Do you suggest a better way  to
> draw a tetrahedron?
>
> [1]
> http://math.stackexchange.com/questions/183030/given-a-tetrahedron-how-to-find-the-outward-surface-normals-for-each-side
> [2]
> https://github.com/burak-er/trunk/blob/master/pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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