cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - You can change your system assigned username to something more personal in your community settings. X

6-Contributor

## 2 Trigonometric function with two unidentified

Hello guys, I am stuck for two days about an issue. I have to create a solution matrix for the following two trigonometric functions.

m*cos(a)+n*cos(b)=x

m*sin(a)+n*sin(b)=y

0<a<180 , 0<b<180

m,n,x,y are constants. a,b are unidentified.

How can I solve x,y as matrix solution?

I will trigger x,y values with FRAME, so at each X.i, Y.i values I have to calculate a,b degrees and draw lines.

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:tasdemirg)

If you limit Theta2, too (positive in the range from 0 to 180°) you have a unique, single solution.

One way to calculate the angles Theta1 and Theta2 based on the coordinates x,y of the endpoint is shown in the picture below:

22 REPLIES 22
24-Ruby IV
(To:tasdemirg)

You would like to create an animation if you use the FRAME variable?

Let us create one frame of this animation!

6-Contributor
(To:ValeryOchkov)

Thank you for your intention @ValeryOchkov

I'll show with sketch in add.

There is K.i matrix. It consists nodes that arm going to reach. Arms are should be rectangular boxes. I wrote the translational and rotational matrix. Arms are working perfrectly fine. But it needs target node in order to calculate teta1 and alpha angles.

For example K.1 is (x,y)=(450,600)

It will calculate these angles then will go to K.2=(460,590), later on K.3=(465,582) and so on.

I will later make K.i matrix with bezier if I can finish this earlier. It has manual nodes added by me now.

I hope I could explained myself clearly. Thank you!

24-Ruby IV
(To:tasdemirg)

May be so

24-Ruby IV
(To:tasdemirg)

6-Contributor
(To:ValeryOchkov)

Thank you really much. I am now trying to understand it. You're the best

21-Topaz II
(To:tasdemirg)

Hi,

The analytical solution gives me these results:

6-Contributor
(To:-MFra-)

When a function with sin and cos, it's easier to make matrix solution. However in my function, there are only cos or sin one function :(. I have to make a general matrix solution. I am sorry I couldn't understand by your point. What do you suggest me to do exactly. I need this kind of solution below:

Sin-cos

21-Topaz II
(To:tasdemirg)

6-Contributor
(To:-MFra-)
Thank you really but I gave it as an example. The actual functions I ask are in The main post. I know this one...
21-Topaz II
(To:tasdemirg)

6-Contributor
(To:-MFra-)

Thank you so much, I am trying to figure it out combine with my functions now.

@-MFra- wrote:

24-Ruby V
(To:tasdemirg)

Your problem normally has two solutions (can be clearly seen in Valerys animation).

So how can you expect a single, linear matrix solution?

24-Ruby IV
(To:Werner_E)

Thanks Werner! This system of two equations has two solutions - x1-y1 and x2-y2:

6-Contributor
(To:Werner_E)

I expected to limit them between 0<teta<180 in order to have one solution.

24-Ruby V
(To:tasdemirg)

In your original question you limited a and b in the range from 0 to 180 degrees and this would not have guaranteed a single unique solution.

Obviously now you are referring to the drawing you posted later. Theta2 has a different meaning (compared to b). Limiting Theta2 can make the solution unique. Nonetheless its still not a linear problem and so you can't solve it with matrix operations.

6-Contributor
(To:Werner_E)

You are right. I'm still ignorant about it. Solutions above are fulfill task. However my point is defining two angle so trigger the system based on those angle. But you're saying it isn't possible due to fact that there will not be unique solution. Isn't there any way to eliminate the solution we don't want?

Let me give you the way in my mind:

if I draw the closed loop in the first zone(+x,+y) and let theta1 won't go below 0 (will be limited 0<theta1<180)

we still cannot avoid to calculate other solution?

24-Ruby IV
(To:tasdemirg)

May be so

24-Ruby V
(To:tasdemirg)

If you limit Theta2, too (positive in the range from 0 to 180°) you have a unique, single solution.

One way to calculate the angles Theta1 and Theta2 based on the coordinates x,y of the endpoint is shown in the picture below:

24-Ruby V
(To:Werner_E)

And here's a small animation using the above formulas

6-Contributor
(To:Werner_E)

I really appreciate this and I feel dumber each time asking you after your precious messages 🙂

a small question: I want to start as Teta1=0 then

I need to do exception for i=0

it will be like;
i=0 --> Theta1=0

i=1..20 Matrix calculated Theta values

24-Ruby V
(To:tasdemirg)

You mean Theta1 = Theta2 = 0? Some sort of rest position?

There is no exception. You simply add the point with the coordinates (L.A+L.B / 0) as first point of your Matrix of K points. You have to decide which way the robot arms should chose to move from rest position to the first point of your curve and at which speed.

You wrote in a previous answer that you have a bunch of points K and intend to connect them via a Bezier curve.

So you may simply ad the start point in front -  maybe even a few more points between the start point and the first regular "K-point". This insertion of points could be done by linear interpolation.

6-Contributor
(To:Werner_E)

I found a sneaky way to make it.

Thank you for everything. I will try to move them with rectangular boxes.

Announcements
Top Tags