meaning of Ig2_facet_sphere.cpp

Asked by Gastbye Liu on 2017-03-18

hi everyone:

"Vector3r cl " represents the center of sphere and the the center of facet?
The coordinate of facet's normal belongs to global coordinate system? And the " Vector3r cl" belongs to local coordinate system?

What's the meaning of "shrinkFactor" ?

Do you have some introduction to help me understand that?

Thanks!

Guangyu

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Gastbye Liu
Solved:
2017-03-19
Last query:
2017-03-19
Last reply:
2017-03-18
Gastbye Liu (gastbye) said : #1

And what's the meaning of "circular radius in Facet.hpp"?
Why facet has circular radius?

Jan Stránský (honzik) said : #2

Hello Guangyu,

my comments on code are after "////Jan:" symbols.
LCS = local coordinates system of the facet
GCS = global coordinate system

> "Vector3r cl " represents the center of sphere and the the center of facet?

According to comments in the code, it is the vector from facet.pos to sphere.pos, but expressesd with respect to Facet's local coordinate system:
Matrix3r facetAxisT=se31.orientation.toRotationMatrix(); ////Jan: matrix projecting points/vectors from LCS to GCS
Matrix3r facetAxis = facetAxisT.transpose(); // local orientation ////Jan: transposition makes the projection opposite, GCS->LCS
Vector3r cl = facetAxis*(se32.position + shift2 - se31.position); // "contact line" in facet-local coords
////Jan: omitting shift2, se32.position - se31.position is a vector from facet.pos to sphere.pos, in GCS
////Jan: facetAxis*(...) makes it in LCS

also be careful with facet's "center". It is its inscribed circle center, not center of mass as one could guess.

> The coordinate of facet's normal belongs to global coordinate system? And the " Vector3r cl" belongs to local coordinate system?

No, facet.normal is also expressed with respect to LCS.
facetAxisT * normal
would compute the global components
Have a look at Facet.*pp files

> What's the meaning of "shrinkFactor" ?

Using this factor, you can artificially shrink the facets for contact computation.
By default, it is not used. I have never used it, so I cannot help much here..

> And what's the meaning of "circular radius in Facet.hpp"?
> Why facet has circular radius?

Did you mean "Inscribing circle radius"?

> Do you have some introduction to help me understand that?

not really, see [1]. But Dominik's answer could give you some idea. To understand it in detail, I am afraid you would have to go through the code yourself..

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/264191

Gastbye Liu (gastbye) said : #3

Hi Jan:

Thank you so much!

Yeah, I mean "Inscribing circle radius" instead of "circular radius in facet".

This solved my problem absolutely!

How kind you are!

Guangyu