Live data from Hacker News

Circles do not exist

nibblestew.blogspot.com

51–60 of 217 posts

Re: Circles do not exist

#51
post #27
post #20

If you use the standard way to approximate a circle with Bezier curves, it will differ from a true circle by about 0.03%. The human eye is not capable of seeing the difference, and, as the OP mentioned, most people can't accurately eyeball a perfect circle anyway. This post shows the math behind that, and then shows that it could be made even better with a few different choices. https://spencermortensen.com/articles/…

I think the OP is really just frustrated with the idea that CAD will use PDF and, in that application, 0.03% deviation can be too much.

Using a PDF where 0.03% matters is insane no?

Re: Circles do not exist

#53

> This is a laser cutter that takes its "print jobs" as a PDF file and uses its vector drawing commands to drive the cutting head. This means that it is impossible to use it to print a wheel. You'd need to attach the output to a lathe and sand it down to be round so it actually functions as a wheel rather than as a vibration source. Respectfully, I don't think you're limited by the PDF format if you're talking about…

Epilog claims (up to) 1200dpi resolution. Another comment mentioned the "standard bezier curve representation" is accurate to 0.03%. This means errors should start being observable with a circle as small as 3in. These are probably wildly optimistic assumptions, but it's still 10x smaller than the bed of their largest unit, and there's nothing to stop people from creating arcs of circles with radii even bigger than that!

Re: Circles do not exist

#54
post #25

Earlier quoted context omitted.

Yes, but as someone else commented the arc is internally based on bézier curves. How accurate thee circle would be by plotting is probably dependent on the trigonometric table built in to the postscript interpreter, but at least it would be mathematically possible to make an accurate circle where it's actually not even possible to express a perfect circle with bézier curves.

In theory you could, when you were converting from PS to G-Code NOT emulate the arc with bezier curves, but convert them into g-code circles. This would likely cause the laser cutter to cut something that looked SLIGHTLY different than the rendered PDF. But anyone who's worked in the field long enough knows that WYSIWYG is a lie (albeit a very useful lie.)

Don't get me wrong. I'm not questioning the usefulness of béziers. I'm questioning the authors notion that postscript inherently is incapable of expressing accurate circles just because the language don't have built in primitives for them. :)

Re: Circles do not exist

#55

If you play the game Quake 3 Arena, which was, I think, the first game to use bezier curves in 3d rendering, so that a column or arch could dynamically adjust how many polygons are used depending on view distance, the columns are visibly not round! Not something most people notice unless they are looking for it.

And these days GPUs have programmable tessellation shaders so they can semi-automatically make up more geometry as needed.

I remember the Q3A Beziers were advertised as if the game rendered actual Beziers (which would in principle be possible in software but not on hardware… of the day, anyway), rather than just doing dynamic LoD approximation with your bog-standard triangles!

Re: Circles do not exist

#56
post #22

This surprisingly less philosophical than I was expecting. There is no such thing as a perfect circle, it's a platonic ideal and lives in the Nous.

> There is no such thing as a perfect circle

A spinning movement has to be a perfect circle, no?

Re: Circles do not exist

#57
post #20

If you use the standard way to approximate a circle with Bezier curves, it will differ from a true circle by about 0.03%. The human eye is not capable of seeing the difference, and, as the OP mentioned, most people can't accurately eyeball a perfect circle anyway. This post shows the math behind that, and then shows that it could be made even better with a few different choices. https://spencermortensen.com/articles/…

If a Bézier-based circles with four nodes are too rough, I suppose a circle with 16 or 24 or 128 nodes can be made smooth enough to exceed the laser cutter's margin of error.

If you want to produce a highly regular circle in Inkscape, draw a polygon with many nodes (say, 24), convert it to path, then make all nodes smooth and symmetric.

Re: Circles do not exist

#58
post #57
post #20

If you use the standard way to approximate a circle with Bezier curves, it will differ from a true circle by about 0.03%. The human eye is not capable of seeing the difference, and, as the OP mentioned, most people can't accurately eyeball a perfect circle anyway. This post shows the math behind that, and then shows that it could be made even better with a few different choices. https://spencermortensen.com/articles/…

If a Bézier-based circles with four nodes are too rough, I suppose a circle with 16 or 24 or 128 nodes can be made smooth enough to exceed the laser cutter's margin of error. If you want to produce a highly regular circle in Inkscape, draw a polygon with many nodes (say, 24), convert it to path, then make all nodes smooth and symmetric.

Like floating point errors, the representation can (in theory) be as precise as we like but that's not something most users are willing/able to adjust.

Re: Circles do not exist

#59
post #45

As someone who's spent a decent amount of time writing "output to pdf" routines, I would never in a million years choose pdf as an interchange format for anything at all.

Unfortunately PDF is, like, one of the most reassuring file formats. https://xkcd.com/1301/ What would you put at the top? .PS is pretty fancy, although, just because it is probably saying “this is basically a PDF but from the olden days.”

That comic is about what file types people choose to put what types of information (e.g. PDFs don't often get used for memes, and gifs don't often get used for scientific research papers). It's not even trying to make a point about the quality of the file formats themselves.

(I assume when you wrote "most reassuring" you were instead interpreting it as a comic about the file types' ability to accurately hold the information a user wants them to hold, because "reassuring" as pertains to the comic's actual meaning would be completely irrelevant to this topic of whether or not PDF makes a good interchange format.)

Re: Circles do not exist

#60
post #27
post #20

If you use the standard way to approximate a circle with Bezier curves, it will differ from a true circle by about 0.03%. The human eye is not capable of seeing the difference, and, as the OP mentioned, most people can't accurately eyeball a perfect circle anyway. This post shows the math behind that, and then shows that it could be made even better with a few different choices. https://spencermortensen.com/articles/…

I think the OP is really just frustrated with the idea that CAD will use PDF and, in that application, 0.03% deviation can be too much.

if being off by 3 units on a 10,000 unit circle actually matters, you have stricter requirements than most industry bodies. If you're fabricating parts that have tolerances measured in 1/10th of a thou, the machines you use absolutely don't ask for PDF, they ingest proper control code.
Post reply on HN