Fetching normals and tangents of a Tri6 #3073
-
Hi, It seems the get_tangents method only works on faces (sides of a Tet, for example). Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
You can call:
Then the "face" normal to the Tri6 at quadrature point
|
Beta Was this translation helpful? Give feedback.
-
Thanks,
If I got it properly, I would have:
Point tan1 = dxyzdxi[qp].unit();
Point tan2 = dxyzdxi[qp].unit();
Point normal = dxyzdxi[qp].cross(dxyzdeta[qp]).unit();
Is that right?
Em qua., 3 de nov. de 2021 às 16:01, John W. Peterson <
***@***.***> escreveu:
… You can call:
const std::vector<RealGradient>& dxyzdxi = fe->get_dxyzdxi();
const std::vector<RealGradient>& dxyzdeta = fe->get_dxyzdeta();
Then the "face" normal to the Tri6 at quadrature point qp should be given
by:
dxyzdxi[qp].cross(dxyzdeta[qp]).unit()
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMOVERZCZHKD3XFRKOZ7B33UKGIJXANCNFSM5HJVIWQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Yes, I think that should work, but it would be good if you could check that the results you get seem reasonable. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the typo.
Well .. Below is what I got (on the left would be the expected, on the
right the resulting).
I can see that *dxyzdxi* is not orthogonal to *dxyzdeta*.
Is that expected?
Point tan_s = dxyzdxi[qp].unit();
Point tan_t = dxyzdeta[qp].unit();
Point normal_f = dxyzdxi[qp].cross(dxyzdeta[qp]).unit();
tan_s: (x,y,z)=( -1, 0, 0)
tan_t: (x,y,z)=(-0.672813, 0, 0.739813)
normal_f:(x,y,z)=( 0, 1, 0)
Em qua., 3 de nov. de 2021 às 16:14, John W. Peterson <
***@***.***> escreveu:
… Actually your "tan2" should use dxyzdeta.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3073 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMOVER43KZILJITYSUHYVC3UKGJ27ANCNFSM5HJVIWQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
OK, I have actually only used this formula with Quad4 and Tri3 and it seemed to work OK for this, but maybe it doesn't generalize? I would suggest you find the orthogonal projection of tan_t onto tan_s in the plane spanned by tan_s and tan_t and use that for the second tangent vector instead if it's important for the two tangent directions to be orthogonal... |
Beta Was this translation helpful? Give feedback.
-
Thanks!
Em qua., 3 de nov. de 2021 às 16:36, John W. Peterson <
***@***.***> escreveu:
… OK, I have actually only used this formula with Quad4 and Tri3 and it
seemed to work OK for this, but maybe it doesn't generalize? I would
suggest you find the orthogonal projection of tan_t onto tan_s in the plane
spanned by tan_s and tan_t and use that for the second tangent vector
instead if it's important for the two tangent directions to be orthogonal...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMOVERZ56Y53W7AJBGVL6IDUKGMOJANCNFSM5HJVIWQA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
You can call:
Then the "face" normal to the Tri6 at quadrature point
qp
should be given by: