Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Use case enquiry

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
05:35 AM

08-16-2019
05:35 AM

Good day

Any advice on the following use case would be appreciated.

I'm designing 2 non round variable pitch cams.

Most of the calculations I've done in Excel but have gotten stuck on finding the angle of rotation of the second cam so that a vector of the cam passes through a point.

I can do a Matrix translation and rotation on the vector but need to find that angle.

There is a measured geometrical solution in CAD that works, but it takes very long to make changes so would like another solution.

Math can be found here, above my pay grade, but I though Mathcad might be easier.

Express if possible, I do not have Mathcad, but this is a once-off so can do trial if required.

Thanks

Trenton

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
02:42 PM

08-19-2019
02:42 PM

From your last post it looks like you are finally interested in the coordinates of the points Q and R, not necessarily in the angles.

You could calculate the coordinated directly like this and of course you could use the point coordinates to calculate the angles:

Again those calculations could be done in Excel as well.

11 REPLIES 11

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
05:57 AM

08-16-2019
05:57 AM

Re: Use case enquiry

So the input values are A,B,C, h and k and the value you are looking for is the angle beta (one of the two solutions possible) as given in the in the first answer of the stackexchange thread you point to?

Sure it would be easy to do in Mathcad or Prime,

but it should be as easy to do in Excel. Excel offers ARCCOS() or ACOS(), ARCTAN() or ATAN() and the square root SQRT. What else would you need more?

If you are looking for a free calculation program you may want to explore GeoGebra (Classic 6 or 5) -> https://www.geogebra.org/download

BTW, I also wonder if A,B and C really are the most natural input values for your real world problem.

I also wonder if the formula given in the stackexchange thread is fully correct. It sure misses the absolute value of C and it only returns one value while the task has two solutions.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
06:12 AM

08-16-2019
06:12 AM

Re: Use case enquiry

Oh, I think I see it now, (3) is the solution for the angle. I thought I had to sub (3) into (1) but that is for the line that I don't really need.

I don't need to use A,B or C as I have R as another vector perpendicular to the one that has to pass through the point.

Thanks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
06:58 AM

08-16-2019
06:58 AM

Re: Use case enquiry

I am not really sure if I understand but I guess it means that you realized that you can quite easy do it in Excel, too?

BTW, I added something to my answer above

R is not a vector but a length and I guess that your input simply are the cartesian (x,y) coordinates of two points. One of them should rotate around the origin. Or is the input values the polar coordinates (r,theta) of one or even both points? In case you haven't found out yourself how to do it you sure should provide a concrete example with all the numerics - preferably one where you already know the two solution angles.

Or maybe your input values really are just the fixed point and the radius and you are just looking for the information where to position the rotatable cam. This would mean three input values and two outputs.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
07:13 AM

08-16-2019
07:13 AM

Re: Use case enquiry

Yes, it seems to work fine in excel, I did not completely understand the solution.

Thank you for your amendment, I will go over it and might be able to use it as I understand Mathcad can drive geometry in Creo.

In my implementation R is the length of the translation vector before and after the rotation matrix.

I'm trying it now to find the ratios of the 2 cams and plot the curves, looks ok so far.

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-16-2019
08:13 AM

08-16-2019
08:13 AM

Re: Use case enquiry

Concerning the formulas from the stackexchange thread a few remarks:

1) As already mentioned when it comes to the calculation of R it should read |C| instead of just C

2) Instead of arctan(k/h) you should use ARCTAN2(h,k) or ATAN2(h,k). Otherwise you would get a wrong result in case h is negative.

3) the formula in (3) gives you the angle of the moveable cam with respect to the horizontal line pointing to the right (as usual for polar coordinates). Hope this is the angle you need. You get the second possible solution if you replace the minus in front of arccos for a plus sign.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
06:11 AM

08-19-2019
06:11 AM

Re: Use case enquiry

I cannot seem to get it working right.

I tried the method below and it works perfectly, but I would need to use a solver for x(Q) in excel.

Not sure why the stackexchange eqn does not work or what I've done wrong with it.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
07:30 AM

08-19-2019
07:30 AM

Re: Use case enquiry

I have no idea what you think that is not working. I don't know what the last equation in your screenshot should show.

When I assume r=95 and the coordinates of T, the formula from stockexchange gives you both angles (see my remark about the second solution in my answer above) you asked for.

If you need the coordinates of R and Q - thats quite easy to accomplish. See the screenshot of a Mathcad implementation. The results are pretty the same as what I see in your Geogebra screenshot.

AS explained in my previous answer - because the abscissa of T is negative it is important that you use ATAN2 (or ARCTAN2) and not atan (or arctan).

It should be easy to implement the formulas in Excel and there is no need to solve an equation.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
02:42 PM

08-19-2019
02:42 PM

From your last post it looks like you are finally interested in the coordinates of the points Q and R, not necessarily in the angles.

You could calculate the coordinated directly like this and of course you could use the point coordinates to calculate the angles:

Again those calculations could be done in Excel as well.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
04:52 PM

08-19-2019
04:52 PM

Re: Use case enquiry

Thank you very much.

I really appreciate your insightful input. I like the last implementation and will investigate where I buggered up.

Trenton

Top Tags