Home |
Search |
Today's Posts |
|
Metalworking (rec.crafts.metalworking) Discuss various aspects of working with metal, such as machining, welding, metal joining, screwing, casting, hardening/tempering, blacksmithing/forging, spinning and hammer work, sheet metal work. |
Reply |
|
LinkBack | Thread Tools | Display Modes |
#1
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
I need help with math and geometry theory. I need to know how to calculate
the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. |
#2
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
"Karl Townsend" wrote in message anews.com... I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. When you say "start point and end point" do you mean the length of the chord? Do you know the angle? |
#3
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
When you say "start point and end point" do you mean the length of the chord? Do you know the angle? Start point is an X, Y coordinate End point is a second X, Y coordinate Arc center is a third X, Y coordinate. You can find the angle to a point on the arc by Arcsine(deltaX/radius). radius is the distance between either start point or end point and arc center. Karl |
#4
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
s=r*angle in radians
YOu have the x,y of each point. Assume the lowest pt in y is at 0 degrees (to the right of the center) The angle can be deduced from : Dy (height, or y distance) = r * sin(angle), so angle = 1/arcsin (Dy) -You'll need trig tables or a sci. calculator. Distance along arc, then, is r*angle (degrees/57.3) This was my basic approach. But the sine function gives the angle within a given quadrant. Then, i had to test each angle for which quadrant to know how many 90 degrees to add. The result is a total mess. I'm hoping for a more elegant approach. Karl |
#5
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
Karl Townsend wrote:
I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. s=r*angle in radians YOu have the x,y of each point. Assume the lowest pt in y is at 0 degrees (to the right of the center) The angle can be deduced from : Dy (height, or y distance) = r * sin(angle), so angle = 1/arcsin (Dy) -You'll need trig tables or a sci. calculator. Distance along arc, then, is r*angle (degrees/57.3) Now, distance along the arc is not the same as distance away. Dx^2 + Dy^2 = h^2, where h is the distance away. So, square up the increment in x, same in y, add 'em together then take the sqrt of that number. And it's not 7am here yet, so I could be all screwed up / mark |
#6
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
On Thu, 12 Mar 2009 08:16:11 -0500, Karl Townsend wrote:
I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. I cannot see how this is hard, as written. You know the radius - it's distance between one end and the centre. You want to know what angle from that line will give you X along the arc, right? That's X over 2*pi*radius in radians - do the math and convert to degrees. The above from memory of grade-school trig some decades ago; contents may have settled/become dis-ordered. |
#7
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
On Mar 12, 9:16*am, "Karl Townsend"
wrote: I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. |
#8
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
"Karl Townsend" wrote in message anews.com... I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. Don't know if this is what you're looking for, but it worked for me. My situation is that I had to calculate the actual distance of curbing along both sides of a 2,000 long street. The distance is going to be different along the outside of the street and the inside of the street. Both distances were going to be different than a straight line from start to end of street. It didn't mean a lot of difference mathematically, but my boss was impressed that I figured out how to calculate it so accurately. (Google was not mentioned, just that I worked hard at achieving the results.) BTW, sagitta is a word that comes in there somewhere. Play with it and see. It allows you to enter variables that spits out the unknown. http://www.1728.com/circsect.htm HTH Steve |
#9
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
Karl Townsend wrote:
I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. Arc length when you know the chord length and the radius: Chord Length = SQRT( (X0-X1)^2 + (Y0-Y1)^2 ) Angle in Radians = 2 * ARCSIN( (Chord Length) / (2 * Arc Radius) ) Arc Length = Arc Radius * Angle in Radians -- Steve Walker (remove wallet to reply) |
#10
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
Karl Townsend writes:
I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. This is harder than anyone thinks because the system may be rotated. It will work to "change coordinates" (*) to put the arc center at (0,0), and the start point at some (x,0). Then the coordinates of the end point will be at a known angle by an inverse trig function of the second point's coordinates. Divide the angle by 2pi radians to get the fraction of the circumference of the given radius. You can also calculate the angle directly with vector arithmetic. The book _Graphics Gems_ is a cookbook for this stuff: http://www.acm.org/tog/GraphicsGems/ (*) Change coordinates = that stuff you never learned in algebra class because short skirts were in style. |
#11
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
"Richard J Kinch" wrote in message . .. Karl Townsend writes: I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. This is harder than anyone thinks because the system may be rotated. I'm glad somebody thought it wasn't that easy. I got a good solution by brute force, but don't know the theory behind it. I made 12 equal spaced radii at 30 degree intervals around the circle. For each point, I recorded the sine ratio, sin result from the computer, cosine ratio, cosine result from the computer. (Tan gives divide by 0 errors) By inspection I can see: IF delta Y (point-arc center) =0 then cos(deltaX/radius) gives the result IF delta Y 0 then (360 - cos(deltaX/radius) gives the result. Do this for both points, then subtract to get the angle. Works for any angle, any point in space. Piece of cake. of course getting it programmed into the CNC control will take effort. Karl |
#12
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
On Fri, 13 Mar 2009 17:40:17 -0500, "Karl Townsend"
wrote: "Richard J Kinch" wrote in message ... Karl Townsend writes: I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. This is harder than anyone thinks because the system may be rotated. I'm glad somebody thought it wasn't that easy. I got a good solution by brute force, but don't know the theory behind it. I made 12 equal spaced radii at 30 degree intervals around the circle. For each point, I recorded the sine ratio, sin result from the computer, cosine ratio, cosine result from the computer. (Tan gives divide by 0 errors) By inspection I can see: IF delta Y (point-arc center) =0 then cos(deltaX/radius) gives the result IF delta Y 0 then (360 - cos(deltaX/radius) gives the result. Do this for both points, then subtract to get the angle. Works for any angle, any point in space. Piece of cake. of course getting it programmed into the CNC control will take effort. Karl I don't know what programming language you're using but look for a two argument arctangent function in the list of available math functions. In C, it's atan2(y,x). These functions will return the proper angle/quadrant, regardless of the signs of the arguments, x and y. Some examples... atan2(1,0) = 90 degrees atan2(0,-1) = 180 atan2(-1,0) = 270 atan2(-1,-1) = 225 |
#13
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
I don't know what programming language you're using but look for a two argument arctangent function in the list of available math functions. In C, it's atan2(y,x). .... Shoot, I knew there was an easy way. My control language doesn't have this function. It has the ability to call a small C function that you write. Now that I'm nearly done, it would be more work to do this. Thanks for the tip. Karl |
#14
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
On Fri, 13 Mar 2009 18:48:35 -0500, Karl Townsend
wrote: I don't know what programming language you're using but look for a two argument arctangent function in the list of available math functions. In C, it's atan2(y,x). ... Shoot, I knew there was an easy way. My control language doesn't have this function. It has the ability to call a small C function that you write. Now that I'm nearly done, it would be more work to do this. Thanks for the tip. Karl There is a wiki page for that too: http://en.wikipedia.org/wiki/Atan2 May give you some info to muse over... -- Leon Fisk Grand Rapids MI/Zone 5b Remove no.spam for email |
#15
Posted to rec.crafts.metalworking
|
|||
|
|||
math problem distance along an arc
"Karl Townsend" wrote in
anews.com: I need help with math and geometry theory. I need to know how to calculate the distance along an arc given the start point, end point, and arc center. (A full circle is 2*pi*r) I also need to find the point on an arc that is X distance away. So far, I have a messy solution involving sines and cosines with IF statements for which quadranttoo determine the fraction of a full circle. There must be an elegant solution. Background on what I'm doing: I'm writing a custom Gcode for my CNC control to read the Z distance on a laser displacement sensor every given increment along the arc. http://www.handymath.com/cgi-bin/arc18.cgi?submit=Entry Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
shop math problem | Metalworking | |||
Triangle math problem | Home Repair | |||
Interesting Math Problem | Metalworking | |||
Interesting Math Problem | Metalworking | |||
math problem | Metalworking |