V
V
Vincent12021-02-19 01:50:30
Mathematics
Vincent1, 2021-02-19 01:50:30

How to flip a curved line on the y-axis?

I am recording cursor movements using python, I have an array of xy coordinates. Then when I play back the recorded line, the cursor repeats the recorded line. How can I make it so that I can reproduce the same line, but in an arbitrary direction?
In mathematics, my knowledge ends after sines of cosines, so I'm looking for some ready-made algorithm.
602eed66727f7247678386.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2021-02-19
@hint000

https://ru.wikipedia.org/wiki/Rotation_matrix
We multiply the coordinates of each point of the graph (in the form of a vector (X, Y)) by the rotation matrix, we get a new vector (X1, Y1).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question