CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > MetalWorking Machines > General Metal Working Machines


General Metal Working Machines General discussions of all metal working machines from drill presses to band-saws.


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-29-2011, 01:15 PM
JEST's Avatar  
Join Date: Nov 2006
Location: United States
Posts: 50
JEST is on a distinguished road
Trig/math help!

I am losing my mind trying to write an equation to track a point.

I have a triangle with 2 constant sides (both length and originating point)

The point I need to track moves according to the length of the 3rd side.

"b" does not move or change.

"c" does not change in length, but does swing in relation to the length of "a"

I need to calculate the vertical change and the horizontal change along the arc.
Attached Thumbnails
Click image for larger version

Name:	temp.JPG‎
Views:	87
Size:	6.2 KB
ID:	125108  
Reply With Quote

  #2   Ban this user!
Old 01-29-2011, 11:22 PM
 
Join Date: Jan 2006
Location: New Zealand
Posts: 88
nick mulder is on a distinguished road

Firstly, with respect to what point ?

Secondly, we need to know the angle that B is with respect to A - or the height of point BC above A - or... and so on - basically chasing the tail of that circle/triangle in trig world

Once you know one of those you can find the angle C is with respect to the BC point as a function of length A - another bit of simple trig and away you go ...
Reply With Quote

  #3   Ban this user!
Old 01-30-2011, 09:09 AM
JEST's Avatar  
Join Date: Nov 2006
Location: United States
Posts: 50
JEST is on a distinguished road

Better description.

side "a"
Equation variable
Always known and used to control location of point "B"
a= 14.7717 @180 (or 0)
(Due to leverage requirements, "a" is never less than 15.5, hence never sees 180)


side "b"
These end points are stationary (C & A)

side "c"
is a constant 27.625 length.
only end point "B" can move


Angle C (minor)
16.033 never moves or changes


I need to return the current X & Y location for any given length of side "a".
Attached Thumbnails
Click image for larger version

Name:	anglePoint.jpg‎
Views:	46
Size:	22.7 KB
ID:	125203  
Reply With Quote

  #4   Ban this user!
Old 01-30-2011, 10:45 AM
UUU UUU is offline
 
Join Date: Apr 2010
Location: UK
Posts: 226
UUU is on a distinguished road

I found it quite hard to deliver formulas to derive your X and Y positions from an input variable "a", as you get some messy quadratic equations and i gave up trying to do it that way.

So I thought it would be easier to start with Y and derive values for X and for "a", using and excel spreadsheet. You can use the "Goal seek"" feature to find the value of Y which gets you any required value of "a".

So in a spreadsheet, Column A has your Y input values, Column B has a formula for X and Column C has a formula for "a".

I've done this with the "origin" as point A, so all X and Y values derive from there.

Having put column labels into cells A1, B1 and C1, we can put a first value for Y into Cell A2 - I've put the initial Y value of -3.625

Then put the formula into cell B2 of =-((27.625^2-A2^2)^0.5)
This gets you a result for X of -27.38612788

Then put the formula into cell C2 of =((A2+3.625)^2+(B2+12.61448)^2)^0.5
This gets you the result for "a" of 14.77164788

You'll see my formulas have arrived at the same starting value of a as you have. Using "Goal seek" You can get Y = 0.243277 X = -27.6239 for a = 15.5 and Y = 2.132851 and X = -27.5425 for a = 16
Reply With Quote

  #5   Ban this user!
Old 01-30-2011, 11:11 AM
JEST's Avatar  
Join Date: Nov 2006
Location: United States
Posts: 50
JEST is on a distinguished road

I found it quite hard to deliver formulas to derive your X and Y positions from an input variable "a", as you get some messy quadratic equations and i gave up trying to do it that way.
No kidding!

I need to go turn wrenches for awhile.
Looking forward to trying your idea.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-30-2011, 02:31 PM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

See if you can determine this by looking up equations of ellipses. I can't but that's what you have, an ellipse.
Reply With Quote

  #7   Ban this user!
Old 01-31-2011, 07:17 AM
UUU UUU is offline
 
Join Date: Apr 2010
Location: UK
Posts: 226
UUU is on a distinguished road

I'm working on it being a circle, since the centre A is point that does not move, and the point B, on the circumference is a fixed distance "c" from the centre.

Since I've selected point A as the origin of my coordinate system, I'm using the formula X^2 + Y^2 = r^2 (again where ^2 means squared). This is the basis of the formula in cell B2 of my Excel example, I can work out X, if I know r and Y.
Reply With Quote

  #8   Ban this user!
Old 01-31-2011, 07:33 AM
JEST's Avatar  
Join Date: Nov 2006
Location: United States
Posts: 50
JEST is on a distinguished road

Finally got some time to look at your formula.

It doesn't quite work. It solves for "side a", given X/Y. The equation must use "side a" to find X/Y.

Maybe this will help understand the application.

Position is determined by commanding motion to side a.
Encoder feedback is from side a position.

I need to crunch numbers to apply an offset to an axis readout.

In order to solve for a triangle, at least 2 bits of info are needed.

For a given "side a", an equation must be written to provide the angle of "side a". This is the only adjacent or shared element.

With the angle, and the length, the law of cosines can provide other lengths (hence X/Y location)

For some reason, (exhaustion!) I am unable to translate the formulas to my application
Reply With Quote

  #9   Ban this user!
Old 01-31-2011, 09:42 AM
UUU UUU is offline
 
Join Date: Apr 2010
Location: UK
Posts: 226
UUU is on a distinguished road

This is where I'm using the "Goal Seek" feature in Excel. You're right that as written I have to invent a vaule of Y, and the formulas will give me the correponding values of X and "a". But I can ask Excel what value of Y is needed to get any required value of "a" - that's how I got values of X and Y for "a" = to 15.5 and 16.0

What increments of "a" would you want to calculate - I could generate all the X and Y values for 0.1 changes in "a" from 15.5 upwards if you need them.
Reply With Quote

  #10   Ban this user!
Old 01-31-2011, 10:03 AM
UUU UUU is offline
 
Join Date: Apr 2010
Location: UK
Posts: 226
UUU is on a distinguished road

Here's a table of Y, X and "a" for 0.1 increments of "a":

Y X a
0.6491 -27.6174 15.6
1.0385 -27.6055 15.7
1.4151 -27.5887 15.8
1.7800 -27.5676 15.9
2.1323 -27.5426 16.0
2.4729 -27.5141 16.1
2.8096 -27.4818 16.2
3.1351 -27.4465 16.3
3.4531 -27.4083 16.4
3.7640 -27.3674 16.5
4.0683 -27.3238 16.6
4.3666 -27.2777 16.7
4.6592 -27.2293 16.8
4.9464 -27.1786 16.9
5.2318 -27.1251 17.0
5.5102 -27.0699 17.1
5.7842 -27.0127 17.2
6.0541 -26.9535 17.3
6.3200 -26.8923 17.4
6.5822 -26.8294 17.5
6.8384 -26.7652 17.6
7.0950 -26.6984 17.7
7.3479 -26.6299 17.8
7.5972 -26.5598 17.9
7.8431 -26.4882 18.0
8.0855 -26.4152 18.1
8.3247 -26.3408 18.2
8.5645 -26.2638 18.3
8.7997 -26.1860 18.4
9.0325 -26.1066 18.5
9.2628 -26.0258 18.6
9.4908 -25.9435 18.7
9.7175 -25.8595 18.8
9.9405 -25.7746 18.9
10.1620 -25.6880 19.0
10.3813 -25.6002 19.1
10.6005 -25.5102 19.2
10.8147 -25.4201 19.3
11.0283 -25.3282 19.4
11.2399 -25.2350 19.5
11.4497 -25.1405 19.6
11.6575 -25.0448 19.7
11.8635 -24.9479 19.8
12.0701 -24.8486 19.9
12.2733 -24.7489 20.0
12.4766 -24.6470 20.1
12.6749 -24.5456 20.2
12.8732 -24.4422 20.3
13.0699 -24.3376 20.4
13.2650 -24.2318 20.5
13.4584 -24.1249 20.6
13.6503 -24.0169 20.7
13.8432 -23.9062 20.8
14.0328 -23.7954 20.9
14.2209 -23.6834 21.0
14.4078 -23.5703 21.1
14.5932 -23.4559 21.2
14.7773 -23.3403 21.3
14.9601 -23.2236 21.4
15.1415 -23.1057 21.5
15.3216 -22.9867 21.6
15.5005 -22.8665 21.7
15.6780 -22.7451 21.8
15.8543 -22.6226 21.9
16.0295 -22.4988 22.0
16.2033 -22.3739 22.1
16.3759 -22.2479 22.2
16.5471 -22.1209 22.3
16.7170 -21.9928 22.4
16.8855 -21.8637 22.5
17.0526 -21.7336 22.6
17.2205 -21.6008 22.7
17.3859 -21.4679 22.8
17.5500 -21.3340 22.9
17.7129 -21.1989 23.0
17.8747 -21.0627 23.1
18.0353 -20.9253 23.2
18.1947 -20.7868 23.3
18.3530 -20.6472 23.4
18.5101 -20.5065 23.5
18.6660 -20.3647 23.6
18.8208 -20.2217 23.7
18.9744 -20.0777 23.8
19.1268 -19.9325 23.9
19.2781 -19.7862 24.0
19.4282 -19.6388 24.1
19.5772 -19.4904 24.2
19.7250 -19.3408 24.3
19.8716 -19.1901 24.4
20.0170 -19.0384 24.5
20.1612 -18.8856 24.6
20.3060 -18.7299 24.7
20.4482 -18.5745 24.8
20.5892 -18.4180 24.9
20.7291 -18.2605 25.0
20.8679 -18.1017 25.1
21.0055 -17.9419 25.2
21.1419 -17.7809 25.3
21.2772 -17.6188 25.4
21.4113 -17.4556 25.5
21.5442 -17.2912 25.6
21.6760 -17.1258 25.7
21.8066 -16.9591 25.8
21.9361 -16.7914 25.9
22.0643 -16.6224 26.0
22.1914 -16.4524 26.1
22.3173 -16.2812 26.2
22.4420 -16.1090 26.3
22.5654 -15.9356 26.4
22.6876 -15.7611 26.5
22.8086 -15.5854 26.6
22.9285 -15.4087 26.7
23.0470 -15.2307 26.8
23.1644 -15.0516 26.9
23.2805 -14.8714 27.0
23.3954 -14.6900 27.1
23.5091 -14.5074 27.2
23.6209 -14.3246 27.3
23.7324 -14.1390 27.4
23.8424 -13.9528 27.5
23.9507 -13.7661 27.6
24.0573 -13.5789 27.7
24.1642 -13.3877 27.8
24.2689 -13.1970 27.9
24.3722 -13.0052 28.0
24.4742 -12.8123 28.1
24.5748 -12.6183 28.2
24.6740 -12.4232 28.3
24.7717 -12.2271 28.4
24.8681 -12.0300 28.5
24.9642 -11.8291 28.6
25.0581 -11.6290 28.7
25.1505 -11.4276 28.8
25.2416 -11.2251 28.9
25.3312 -11.0213 29.0
25.4195 -10.8163 29.1
25.5062 -10.6100 29.2
25.5916 -10.4024 29.3
25.6755 -10.1936 29.4
25.7580 -9.9832 29.5
25.8391 -9.7714 29.6
25.9176 -9.5612 29.7
25.9954 -9.3478 29.8
26.0716 -9.1331 29.9
26.1462 -8.9173 30.0
26.2190 -8.7008 30.1
26.2906 -8.4822 30.2
26.3604 -8.2627 30.3
26.4285 -8.0420 30.4
26.4950 -7.8202 30.5
26.5605 -7.5948 30.6
26.6237 -7.3700 30.7
26.6853 -7.1439 30.8
26.7451 -6.9166 30.9
26.8032 -6.6879 31.0
26.8596 -6.4579 31.1
26.9141 -6.2266 31.2
26.9669 -5.9940 31.3
27.0178 -5.7601 31.4
27.0669 -5.5248 31.5
27.1141 -5.2881 31.6
27.1595 -5.0501 31.7
27.2029 -4.8106 31.8
27.2444 -4.5698 31.9
27.2839 -4.3275 32.0
27.3215 -4.0839 32.1
27.3570 -3.8390 32.2
27.3903 -3.5931 32.3
27.4216 -3.3462 32.4
27.4507 -3.0982 32.5
27.4778 -2.8483 32.6
27.5027 -2.5964 32.7
27.5254 -2.3436 32.8
27.5459 -2.0889 32.9
27.5642 -1.8321 33.0
27.5800 -1.5757 33.1
27.5936 -1.3168 33.2
27.6048 -1.0564 33.3
27.6136 -0.7949 33.4
27.6199 -0.5314 33.5
27.6237 -0.2669 33.6
27.6250 -0.0022 33.7
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 01-31-2011, 10:19 AM
JEST's Avatar  
Join Date: Nov 2006
Location: United States
Posts: 50
JEST is on a distinguished road

I can't insert a spreadsheet as a solution. I have feedback for the length of "side" a.
Simultanious equations will be required to calculate the current location as the axis pivots.

This calculation is not a path I am cutting. It is the angle and location of the cutter. Side c" ends with a 4"D x 15"L, 84 insert cutter.

Side c is the axis. side a controls the location/angle.
Reply With Quote

  #12   Ban this user!
Old 01-31-2011, 10:56 AM
UUU UUU is offline
 
Join Date: Apr 2010
Location: UK
Posts: 226
UUU is on a distinguished road

OK, I've now derived formulas to get direct from "a" to Y, and thence to X. This is using the cosine rule approach you suggested

Leaving column C in the spreadsheet to hold values of "a", we add a formula into cell D2 of =SIN(PI()-ACOS(((13.125^2)+(C2^2)-(27.625^2))/(2*13.125*C2))-ASIN(3.625/13.125))*C2-3.625
This will deliver the value of Y
Then a formula in cell E2 of =-((27.625^2-D2^2)^0.5)
This will deliver the value of X.

The results this gives corresponding values to those using the previous method. You can key values of a into cell C2 to give Y and X. Copying the formulas in D2 and E2 downwards allows you to have a whole column inputs and results.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off the trig help dresda Milltronics 1 11-14-2009 03:41 PM
Fanuc 16M + Trig ? KTD1 Parametric Programing 3 10-15-2008 07:48 AM
Need Help!- Fanuc 16M + Trig KTD1 Fanuc 5 10-09-2008 07:46 AM
Trig help 3axisrookie G-Code Programing 4 04-03-2008 10:16 PM
How to trig out I and J ? vmc4020 G-Code Programing 10 10-11-2006 08:47 AM




All times are GMT -5. The time now is 06:52 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361