How to calculate center coordinates of two reverse arcs in 3D space

In summary, the conversation discusses a problem involving calculating coordinates for points C1 and C2, which are the centers of two reverse arcs tangent to each other at point M. The arcs are also tangent to specific rays and have equal radii. One approach is to set up equations using vector dot products and use an algorithmic solver to find the minimum. Another approach is to use Bezier curves, which may give a better solution depending on the setup requirements. The conversation also touches on the issue of dividing the arcs into equal lengths and the use of parameters to determine the positions of the points.
  • #1
Brad_
6
0
Hi,

View attachment 1815

Given 3D points P1(200,60,140), P2(300,120,110), P3(3,0,-1), P4(-100,0,-1) and the radius of
arc C1MP3 is equal to radius of arc C2MP1. How do I calculate coordinates x, y, z of
points C1 and C2?

Points C1 and C2 are centers of two reverse arcs which are tangent to each other at point M which lies on ray Q1Q2.
Arc C1MP3 is tangent to ray P3P4 and arc C2MP1 is tangent to ray P1P2.
Points Q1 and Q2 emerge as a result of moving points P1 and P3 in the direction obvious from picture.
It is easy to calculate centers of arcs with different radius. But how to calculate centers of arcs
with equal radius. How to find the position of points Q1 and Q2?
 

Attachments

  • reversearcs.PNG
    reversearcs.PNG
    4.8 KB · Views: 116
Mathematics news on Phys.org
  • #2
Brad007 said:
Hi,

View attachment 1815

Given 3D points P1(200,60,140), P2(300,120,110), P3(3,0,-1), P4(-100,0,-1) and the radius of
arc C1MP3 is equal to radius of arc C2MP1. How do I calculate coordinates x, y, z of
points C1 and C2?

Points C1 and C2 are centers of two reverse arcs which are tangent to each other at point M which lies on ray Q1Q2.
Arc C1MP3 is tangent to ray P3P4 and arc C2MP1 is tangent to ray P1P2.
Points Q1 and Q2 emerge as a result of moving points P1 and P3 in the direction obvious from picture.
It is easy to calculate centers of arcs with different radius. But how to calculate centers of arcs
with equal radius. How to find the position of points Q1 and Q2?

Welcome to MHB, Brad! :)

I could solve the problem by setting up the equations using only vector dot products.
Then let an algorithmic solver do the work.

My solution is:
\begin{array}{lccrrrc}
Q1&=&(&120.2, &12.1, &163.9&) \\
Q2&=&(&77.6, &0, &-1.0&) \\
C1&=&(&3.0, &7.0, &95.0&) \\
C2&=&(&176.1, &53.2, &47.0&) \\
M&=&(&96.2, &5.3, &71.1&) \\
R&=&&96.3
\end{array}

Summarized, the steps in my approach are:
1. Introduce variables for the radius R, how far Q1 lies beyond P1, and how far Q2 lies beyond P3.
2. Calculate normalized vectors for P1-Q1 and for Q2-Q1.
3. Their average vector points to C2. Use that to calculate the point C2 where C2-P1 is perpendicular to P2-P1.
4. Calculate the point M1 where M should be.
5. Repeat the calculation with P3 and P4 to find C1 and M2.
6. Let an algorithmic solver do the work to find the minimum for:
$$||M2-M1||^2 + (||P1-C2|| - R)^2 + (||P3-C1|| - R)^2$$Btw, these type of problems are often solved with so called Bezier curves.
Bezier math is more straight forward and may give better solutions depending on the requirements of your setup. You will get a smooth path with minimal course changes and curvature, which could well be better than 2 reverse arcs with equal radius.
 
  • #3
I like Serena said:
Welcome to MHB, Brad! :)

I could solve the problem by setting up the equations using only vector dot products.
Then let an algorithmic solver do the work.

My solution is:
\begin{array}{lccrrrc}
Q1&=&(&120.2, &12.1, &163.9&) \\
Q2&=&(&77.6, &0, &-1.0&) \\
C1&=&(&3.0, &7.0, &95.0&) \\
C2&=&(&176.1, &53.2, &47.0&) \\
M&=&(&96.2, &5.3, &71.1&) \\
R&=&&96.3
\end{array}

Summarized, the steps in my approach are:
1. Introduce variables for the radius R, how far Q1 lies beyond P1, and how far Q2 lies beyond P3.
2. Calculate normalized vectors for P1-Q1 and for Q2-Q1.
3. Their average vector points to C2. Use that to calculate the point C2 where C2-P1 is perpendicular to P2-P1.
4. Calculate the point M1 where M should be.
5. Repeat the calculation with P3 and P4 to find C1 and M2.
6. Let an algorithmic solver do the work to find the minimum for:
$$||M2-M1||^2 + (||P1-C2|| - R)^2 + (||P3-C1|| - R)^2$$Btw, these type of problems are often solved with so called Bezier curves.
Bezier math is more straight forward and may give better solutions depending on the requirements of your setup. You will get a smooth path with minimal course changes and curvature, which could well be better than 2 reverse arcs with equal radius.

Can you list here all the initial equations please?
 
  • #4
I would rather see more detailed procedure how the result was computed then the actual result at least. I want to implement this as piece of code in 3dsmax script.

I need to have the rays connected with two reverse arcs becuse then I will divide the arcs into several pieces of the same length. I have tried to do the same with Bezier splines, but it is not possible (only with brute force algorithm).
 
  • #5
Brad007 said:
I would rather see more detailed procedure how the result was computed then the actual result at least. I want to implement this as piece of code in 3dsmax script.

I need to have the rays connected with two reverse arcs becuse then I will divide the arcs into several pieces of the same length. I have tried to do the same with Bezier splines, but it is not possible (only with brute force algorithm).

I consider the procedure I outlined fairly detailed.
Most of the steps won't become clearer if I write down a formula for it.
For which part of the procedure would you like to see more details?
Or are your problems more with how vectors and dot products are defined and used?
 
  • #6
At first step I did the following $$Q1=P1-s*u ; Q2=P3-t*v$$ where $$u=\frac{P2-P1}{||P2-P1||} ; v=\frac{P4-P3}{||P4-P3||}$$ and s,t are parameters for how far the points lies.
Then I can not figure out how the parameters s,t behave.

Is it right way how to define the first step?
 
  • #7
Brad007 said:
At first step I did the following $$Q1=P1-s*u ; Q2=P3-t*v$$ where $$u=\frac{P2-P1}{||P2-P1||} ; v=\frac{P4-P3}{||P4-P3||}$$ and s,t are parameters for how far the points lies.
Then I can not figure out how the parameters s,t behave.

Is it right way how to define the first step?

Yes.
This is the first stage of defining variables that determine the equations.
Later we will figure out what their values should be.
 
  • #8
ok, then I did the following
$$k=\frac{Q2-Q1}{||Q2-Q1||};l=\frac{Q1-Q2}{||Q1-Q2||}$$
$$c2=\frac{u+k}{2};c1=\frac{v+l}{2}$$
$$e=P1.u;r=\frac{e-Q1.u}{c2.u};C2=Q1+r*c2$$
$$e=P3.v;r=\frac{e-Q2.v}{c1.v};C1=Q2+r*c1$$
$$e=P1.c2;r=\frac{e-Q1.c2}{c2.k};M1=Q1+r*k$$
$$e=P3.c1;r=\frac{e-Q2.c1}{c1.l};M2=Q2+r*l$$

then I used Mathematica to find minimum for
$$||M2-M1||^2 + (||P1-C2|| - R)^2 + (||P3-C1|| - R)^2$$

with this result {7.46-25, {R -> 96.26, s -> 96.12, t -> 74.64} which is right result.

How do I solve for parameters R,s,t without using Mathematica solver? Can you please tell what are some other methods how to calculate parameters R,s,t. As I have written here I want to implement this as max script.
 
Last edited:
  • #9
Brad007 said:
ok, then I did the following
$$k=\frac{Q2-Q1}{||Q2-Q1||};l=\frac{Q1-Q2}{||Q1-Q2||}$$
$$c2=\frac{u+k}{2};c1=\frac{v+l}{2}$$
$$e=P1.u;r=\frac{e-Q1.u}{c2.u};C2=Q1+r*c2$$
$$e=P3.v;r=\frac{e-Q2.v}{c1.v};C1=Q2+r*c1$$
$$e=P1.c2;r=\frac{e-Q1.c2}{c2.k};M1=Q1+r*k$$
$$e=P3.c1;r=\frac{e-Q2.c1}{c1.l};M2=Q2+r*l$$

then I used Mathematica to find minimum for
$$||M2-M1||^2 + (||P1-C2|| - R)^2 + (||P3-C1|| - R)^2$$

with this result {7.46-25, {R -> 96.26, s -> 96.12, t -> 74.64} which is right result.

Looks good!
How do I solve for parameters R,s,t without using Mathematica solver? Can you please tell what are some other methods how to calculate parameters R,s,t. As I have written here I want to implement this as max script.

I have no idea, since I am not familiar with max script.
Most mathematical packages have a minimization function, which is what you need.
I do not see a way to do it without a minimizer.
 

FAQ: How to calculate center coordinates of two reverse arcs in 3D space

How do you determine the center coordinates of two reverse arcs in 3D space?

The center coordinates of two reverse arcs in 3D space can be determined by finding the intersection point of the two arcs. This can be done by solving the equations of the two arcs simultaneously, using techniques such as elimination or substitution.

What information is needed to calculate the center coordinates of two reverse arcs in 3D space?

To calculate the center coordinates of two reverse arcs in 3D space, you will need the equations of the two arcs, which can be represented in the form of parametric equations or implicit equations. You will also need to know the direction and radius of each arc.

Are there any specific formulas or algorithms for calculating the center coordinates of two reverse arcs in 3D space?

Yes, there are specific formulas and algorithms for calculating the center coordinates of two reverse arcs in 3D space. These formulas may vary depending on the form of the equations of the arcs and the specific geometric properties of the arcs. It is recommended to consult a math or geometry reference for the appropriate formula for your specific scenario.

Can the center coordinates of two reverse arcs in 3D space be calculated by hand?

Yes, the center coordinates of two reverse arcs in 3D space can be calculated by hand using the appropriate formulas or algorithms. However, for more complex or larger sets of arcs, it may be more efficient to use a computer or calculator.

Is it necessary to calculate the center coordinates of two reverse arcs in 3D space in some scientific fields?

Yes, determining the center coordinates of two reverse arcs in 3D space can be important in various scientific fields such as physics, engineering, and geometry. It can be used in the design and analysis of structures, motion trajectories, and other applications that involve curved paths in 3D space.

Back
Top