There is a task to derive the equation (find several points) of a circle by the point of the center and the normal of the plane of the circle. I removed the center point and accepted it (0,0,0) for simplicity (then I simply add the coordinates of my center to the results).

What is the problem. Sphere equation x² + y² + z² = R² Equation of the plane Ax + By + Cz = 0, where N (A, B, C) is a normal vector.

My equation is a system of the last two equations.

Next, I have a plug ... I need to find a series of points around the circle clockwise through step α = 360 ° / N.

I understand that this equation I need to not just solve but also lead to spherical coordinates. But how? I know math normally, but I obviously blunted it.

UPD: There is still a certain solution, knowing (X, Y) necessary points of a circle on a plane, get (X, Y, Z) by “rotating” the axes of interdependence on N (A, B, C), but how to implement this question ..

  • @PavelMayorov agree) did not wake up yet - pavel

1 answer 1

You went a rather complicated way. Everything is made easier.

To begin with, it is necessary to build an orthonormal coordinate system in the plane of the circle. To do this, find any vector perpendicular to the normal vector. This is the ugliest part of the solution. And in this place one should not be afraid to set conditional operators - according to the “hedgehog combing theorem” from topology, one cannot do without them.

The easiest way to rotate a vector at a right angle is to multiply it by something vectorially. But if the multiplied vectors are close in direction, accuracy will suffer (and if they are collinear, there will be zero).

Therefore, I propose to consider the three basic vectors ( i , j and k ) and multiply by the one that is “the most dissimilar”. For this we find the coordinate with the smallest module . Let, for definiteness, | A | <| B | and | C |. So, multiply by the vector i and get the first of the vectors of the basis of the local coordinate system:

i 1 = n x i = (A i + B j + C k ) x i = -B k + C j

Now again multiply it by the normal vector and get the second basis vector:

j 1 = n x i 1 = (A i + B j + C k ) x (-B k + C j ) = (expand the brackets yourself)

Now it remains to normalize the basis vectors so that they become unit - and you can use the parametric equation of a circle:

r = r 0 + R cos φ i 1 / | i 1 | + R sin φ j 1 / | j 1 |

  • ABOUT! for sure, you can use perpendiculars! As I did not guess. But I do not need accuracy, it is enough to calculate approximately the values ​​of the points of a circle. We will check. Thank. - Dmitry Chistik
  • @Dmitry Chistik can not forget about accuracy. When divided by the near-zero number, the accuracy decreases so that it will be noticeable to the naked eye. - Pavel Mayorov
  • @Dmitry Chistik The main rule of computational mathematics is to avoid singularities. - Pavel Mayorov
  • I understand the parametric equation of a circle is its projection on the base plane? and we calculate the third coordinate from the equation of the plane? - Dmitry Chistik
  • @Dmitry Chistik is a vector equation. It works in any coordinates. - Pavel Mayorov