Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

PR

Just a small problem.

I can fix it online!

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

mindsponge.common.rigids_from_3_points

View Source On Gitee
mindsponge.common.rigids_from_3_points(point_on_neg_x_axis, origin, point_on_xy_plane)[source]

Gram-Schmidt process. Create rigids representation of 3 points local coordination system, point on negative x axis A, origin point O and point on x-y plane P.

First calculate the coordinations of vector AO and OP. Then use rots_from_two_vecs get the rotation matrix.

Distance between origin point O and the origin point of global coordinate system is the translations of rigid.

Finally return the rotations and translations of rigid.

Reference:

Jumper et al. (2021) Suppl. Alg. 21 'Gram-Schmidt process'.

v1=x3x2v2=x1x2e1=v1/||v1||u2=v2e1(e1Tv2)e2=u2/||u2||e3=e1×e2rotation=(e1,e2,e3)translation=(x2)
Parameters
  • point_on_neg_x_axis (tuple) – point on negative x axis A, length is 3. Data type is constant or Tensor with same shape.

  • origin (tuple) – origin point O, length is 3. Data type is constant or Tensor with same shape.

  • point_on_xy_plane (tuple) – point on x-y plane P, length is 3. Data type is constant or Tensor with same shape.

Returns

tuple(rots, trans), rigid, length is 2. Include rots (xx,xy,xz,yx,yy,yz,zx,zy,zz) and trans (x,y,z) . Data type is constant or Tensor with same shape.

Supported Platforms:

Ascend GPU

Examples

>>> import mindsponge
>>> A = (1, 2, 3)
>>> O = (4, 6, 8)
>>> P = (5, 8, 11)
>>> ans = mindsponge.common.rigids_from_3_points(A, O, P)
>>> print(ans)
((0.4242640686695021, -0.808290367995452, 0.40824828617045156, 0.5656854248926695,
 -0.1154700520346678, -0.8164965723409039, 0.7071067811158369, 0.5773502639261153,
 0.4082482861704521), (4,6,8))