web analytics


As Sigray has mentioned, why do we need processing power? Well, a couple reasons.

First, let’s look at the numbers we returned in yesterday’s exercise.

This is the raw data, carried out to the last available decimal place, and this is the plot of those line segments.

Looks pretty curvy, doesn’t it? It’s not. It’s nine line segments. And that is at the resolution of the actual calculations. Most machine tools don’t have the ability to deal with anything past three digits, so you get these values instead. (As always, click to embiggenate)

Those values plot the red line. At this resolution it almost appears to be one line.

But it isn’t. Truncating the numbers to three digits past the decimal introduces an error. And that error is a nightmare to someone who needs a critical dimension on a part.

As we can see from the images below, the very first section shows the difference between the path of the black (accurate) line, and the red (Rounded off) line. Yes, it is fractions of a thousandth of an inch, but it matters. Also, the next photo shows the same relationship just three arc segments in, and the red and black lines have changed positions. The part cut in this manner would fail any stringent quality control test. it would be like asking for a golf ball and getting an egg.

In order to not automatically generate these errors, even machines that only have S3 or S4 digits (The number of digits past the decimal) use a different system for display and cutting, called “Floating point”. This allows the machine to cut far more accurately than the actual resolution of the machine, but it costs processing power. And that’s not all.

Let’s go back to the etch a sketch for a moment. If you could very carefully turn both knobs at exactly the same speed, the line you drew would be 45 degrees. If you turned one handle 3 times for every time you turned the other handle four, you would have an angle of about 36.87 degrees. And that is another thing the control has to do. It doesn’t just have to figure out where it has to go, it has to use the servos to get it there. The ratio of the distance travelled in X to the distance travelled in Y, the servos have to move in that ratio, regardless of speed, and they have to also constantly monitor the location so they know when to stop.

OK, now for a simple circle

If we don’t care that the circle has to be perfectly round, and “Almost” round will do, then the math is really simple.

Any grade school kid can make a circle with a piece of string, a pin, and a pencil. The circle’s radius is the length of the string. I’m sure you remember the process, here’s a picture.

Now, instead of the string, let’s take an imaginary string that’s just the radius of the circle, anchor one end at the center of the circle, and rotate it a degree at a time.
The X will be the horizontal line, and the Y will be the vertical line. Starting at the bottom, the first point of our plot will be x 5″, y 0″.

As always, click to embiggenate.

Now the nine red lines represent nine individual movements of our “String” of one degree each. The copy paste from the spreadsheet, below, will show what each line means. (Clarification: The spreadsheet solves for the endpoint of the red line, so we can get those line segments that make the “Circle” made up of 360 line segments.)


You can see that the first line, one degree away, has only a very tiny motion from zero in y. And the amout it moves in from X is also very tiny. But the more degrees you move, the closer the Y gets to 5, and the closer the X gets to zero. At 45 degreees, shown in green on the plot, the X and Y distance are exactly the same; at 90, the x becomes zero and the Y becomes 5″.

Anyone still with me?

As soon as I get home

I will write a post with illustrations that gives the extremely down and dirty “How to cut a sort of a circle using only cartesian coordinates”. For now I’m jammed in a hotel room waiting for a customer to get ready for me.

« Prev - Next »