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.

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.invert_point

mindsponge.common.invert_point(transformed_point, rotation, translation, extra_dims=0, stack=False, use_numpy=False)[source]

The inverse transformation of a rigid body group transformation with respect to a point coordinate, that is, the inverse transformation of apply to point Make rotational translation changes on coordinates with the transpose of the rotation matrix (xx,xy,xz,yx,yy,yz,zx,zy,zz) and the translation vector (x,y,z) translation.

First, the initial coordinates are translated, and then the transpose of the rotation matrix is multiplied by rot_point to get the final coordinates.

rotpoint=transformedpointtranslationresult=rotationtrotpoint

The specific procedures of vector subtraction, transpose and multiplication can be referred to the api of vecs_sub, invert_rots, rots_mul_vecs etc.

Parameters
  • transformed_point (Tuple) – The initial coordinates of the input have shape (x,y,z), where x, y and z are Tensor and have the same shape.

  • rotation (Tuple) – The rotation matrix. shape is (xx,xy,xz,yx,yy,yz,zx,zy,zz), and xx and xy have the same shape.

  • translation (Tuple) – The translation vector shape is (x,y,z), where x, y and z are Tensor and have the same shape.

  • extra_dims (int) – Control whether to expand dims. Default: 0.

  • stack (bool) – Control whether to transform to tuple. Default: False.

  • use_numpy (bool) – Control whether to use numpy. Default: False.

Returns

Tuple, the transformed coordinate of invert point.Length is 3.

Supported Platforms:

Ascend GPU

Examples

>>> from mindsponge.common.geometry import invert_point
>>> from mindspore.common import Tensor
>>> from mindspore import dtype as mstype
>>> transformed_point = (1, 2, 3)
>>> rotation = (1, 2, 3, 4, 5, 6, 7, 8, 9)
>>> translation = (1, 0.5, -1)
>>> output= invert_point(transformed_point, rotation, translation)
>>> print(output)
(Tensor(shape=[], dtype=Float32, value = 34), Tensor(shape=[], dtype=Float32, value = 39.5),
 Tensor(shape=[], dtype=Float32, value = 45))