[HN Gopher] Circles do not exist ___________________________________________________________________ Circles do not exist Author : ingve Score : 128 points Date : 2023-09-19 19:44 UTC (3 hours ago) (HTM) web link (nibblestew.blogspot.com) (TXT) w3m dump (nibblestew.blogspot.com) | andy_threos_io wrote: | Real world manufacturing machines (CNCs) are using G codes. Like | most laser cutters and engraves, Ex. LaserGrbl software for laser | machines. | | G codes in fact have command for arcs. | | G02 establishes a mode for clockwise circular arcs. G03 | establishes a mode for counter-clockwise circular arcs. | retrocryptid wrote: | I think the OP's concern was that they couldn't upload G-Code, | they could only upload PDFs. And because PDFs don't encode | circles, a mechanistic translation to G-Code can't convert it | into a G-Code circle, only a curve that emulates a circle. | | So... you know... note to self... when designing a laser | cutter, allow the user to upload G-Code. | mindslight wrote: | > _The only way to create a proper circle is to have a raster | image like the one above._ | | _facepalm_. A raster image can 't express a circle either - it's | also just an approximation. | | Same thing with a printout, for that matter. Maybe you could | claim some kind of radial plotter is a true circle, but even | there we're talking about pigment being absorbed along individual | paper fibers. | | In reality, all the mathematical shapes are just abstractions to | be approximated. | ars wrote: | You completely missed his point. Pick a DPI, make a raster | circle - it's accurate to the DPI you pick. Now use a Bezier to | make that circle (and rasterize it to that DPI). It's not | accurate to that DPI. | NotYourLawyer wrote: | >Furthermore, the human vision system is a bit weird and perfect | circles look vertically elongated. You have to make them non- | circular for people to consider them properly circular. | | Just like how cows don't look like cows on film![0] | | [0] https://www.youtube.com/watch?v=KbkNul4wQH0 | tantalor wrote: | Time Cube's ineffable Truth. 'Cubeless Word' is not Truth. | Word justifies all human evil. Time Cube is a test for | Truth. Circle measure is slop bucket. | Terr_ wrote: | Tacking on another quote-for-amusement: | | > "This is why you're taking less field work? Because you're | reading 'On Circles, Volume 12'?" | | > "I wrote it." | | > "Unsurprising." | | > "I have to rewrite it. All twelve volumes [...] our physics | framework was completely wrong!" | | > "Even about, like, circles?" | | > Ikora turns to look Chalco in the eye. "Especially about | circles." | | [0] https://www.ishtar-collective.net/entries/vesper-of-radius | syspec wrote: | > Furthermore, the human vision system is a bit weird and perfect | circles look vertically elongated. You have to make them non- | circular for people to consider them properly circular. | | Does any one have a link to a perfect circle, I'd love to see if | it has the proposed effect on me. | titzer wrote: | Look at a coffee cup. | kanzenryu2 wrote: | That's just a circular argument | neilk wrote: | 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/bezier-circle/ | | P.S. of course, a display intended for the human eye has much | looser tolerances than a gear or wheel. | robocat wrote: | > most people can't accurately eyeball a perfect circle anyway. | | https://lessonstream.com/the-story-of-mr-os-circle/ | jprete wrote: | 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. | klysm wrote: | Using a PDF where 0.03% matters is insane no? | anamexis wrote: | Yes, that's the point. | | 1. PDF is to become a standard CAD interchange format. | | 2. Using PDF where 0.03% matters is insane. | | 3. If CAD requires 0.03% tolerance, then using PDF as a | standard CAD interchange format is insane. | | I would imagine you generally want arbitrary precision for | CAD. | Nevermark wrote: | Absolutely! | | I cannot imagine a CAD system that can't symbolically | represent what is actually desired. The model and its | spec should be one and the same. | | Approximations also open the door to different precision | versions. Not helpful when different parts from different | sources need to be consistent. | | Models that approximate/vary from the ideal spec, created | intentionally to match manufacturing limitations, are ok. | TheRealPomax wrote: | 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. | nine_k wrote: | If a Bezier-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. | itishappy wrote: | 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. | raphlinus wrote: | The actual formula is O(n^6) scaling, and for circles it's | very easy to achieve that. So a circle divided into 16ths has | 4096 times less error than one in quarters and one made of | 1024 nodes is a (binary) billion times better. | | This is true for curve fitting of arbitrary curves, not just | circles, though arbitrary curve fitting is a bit tricky (it | requires solving quartic equations). I personally think you | can take this as evidence that cubic Beziers are "good | enough" for all practical tasks requiring curve | representation, though for specific applications there might | be other representations that work better. | hwayne wrote: | Or just use the ellipse (E) in Inkscape, set the start/end to | 0, and hold down ctrl. Then inkscape will generate a | `<circle>` svg element. | Puts wrote: | "The only primitives they have are straight line segments, | rectangles and Bezier curves. The only way to create a proper | circle is to have a raster image like the one above." | | Is this really an accurate conclusion? Just because there are no | primitives for a circle - postscript is still a programming | language so you can also plot a proper circle with trigonometry? | masfuerte wrote: | I was under the impression that the postscript in a pdf isn't a | programming language. It is pre-executed so that only drawing | primitives remain. But I could be wrong. | Pxtl wrote: | Also, I'd wager that you could get something closer to a circle | with a naive bezier implementation than with a naive raster | implementation, as long as you were willing to spend as much | resources on storing curve nodes as you would on raster data. I | mean, it's not like a rastered circle would make a good wheel | either considering that technically every line on it is | orthogonal. | CharlesW wrote: | > _Just because there are no primitives for a circle..._ | | Is a 360deg arc not a circle? %!PS | /newpath 100 100 50 0 360 arc stroke showpage | Puts wrote: | Yes, but as someone else commented the arc is internally | based on bezier 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 bezier curves. | retrocryptid wrote: | 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.) | Puts wrote: | Don't get me wrong. I'm not questioning the usefulness of | beziers. 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. :) | edgarvaldes wrote: | I very like this kind of blog posts: simple, clear, to the point. | I don't need to summarize it myself, I dont need to wonder if the | preamble, history, anecdata, midjourney pics and diagrams are | really necessary to understand the main topic. | codexb wrote: | 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. | bee_rider wrote: | 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." | swores wrote: | 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.) | rustyminnow wrote: | Yeah but that chart is saved as a PNG which is like, pretty | low on the scale. I don't think we can trust anything on | there. | notatoad wrote: | i think that comic is from an earlier time when making PDFs | was harder. | b800h wrote: | 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. | retrocryptid wrote: | I think the point of Plato's endless yammering wasn't that they | don't exist, but that you can't prove they exist and no one | seems to have found one. | goatlover wrote: | I thought his point was that the forms are memories of the | divine because the material world does not provide such | forms. You leave the cave when you stop being dominated by | your senses and use your reason to apprehend universals. | NegativeLatency wrote: | Especially if space is quantized | Karellen wrote: | Even if space isn't quantized, matter is. | carlosjobim wrote: | > There is no such thing as a perfect circle | | A spinning movement has to be a perfect circle, no? | diogenes4 wrote: | Depends on your definition of existence, i suppose, which greek | ontology is notoriously bad at tackling. | mcphage wrote: | That laser cutter might take PDF files as input, but it certainly | isn't the case with all laser cutters. | TheRealPomax wrote: | But did you know that one of the cases PDF is being considered | (and, based on Internet rumors, is already being used) is as an | interchange format for CAD drawings? Now it suddenly starts | mattering. | | Not really? It's considered as _an_ interchange format, not as | _the_ interchange format. If you have CAD /CAM work for parts | that need precision machining measured in tenths or less, you're | not using machines that accept PDF to begin with. | hinkley wrote: | For 3d printing. | | Lathes do circles all the time. But it would be difficult to | rotate either the head or the bed around an arbitrary axis in | order to print a proper circle. | jstanley wrote: | The article has nothing to do with 3d printing. | [deleted] | rolph wrote: | https://www.physicsforums.com/threads/the-planck-circle-prob... | jackmott42 wrote: | 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. | retrocryptid wrote: | But the OP mentioned it EXPLICITLY matters in his use case. | Telling someone their use case doesn't matter is sort of a | reddit thing to do. | Sharlin wrote: | 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! | pfdietz wrote: | I was expecting this to be another "They have played us for | absolute fools" meme. | susam wrote: | The first programming language I learnt to program in was Logo, | namely IBM/LCSI PC Logo. It too did not have any command to draw | curves or circles. However, we were taught to draw a "circle" | using code like this: REPEAT 360 [FD 1 RT 1] | | It is easy to realise that the above code does not attempt to | draw a circle. These instructions specify a | triacosiahexeacontagon instead. Indeed circles did not exist! | | Screenshot: https://susam.net/blog/fd-100.html#circles | carrozo wrote: | Not really related to the article but this reminded me of a | beautiful quote I've had in my notes for many years: | | _" To travel a circle is to journey over the same ground time | and time again. To travel a circle wisely is to journey over the | same ground as it is for the first time. In this way, the | ordinary becomes extraordinary, and the circle, a path to where | you wish to be. And when you notice at last that the path has | circled back into itself, you realize that where you wish to be | is where you have already been ... and always were."_ | nick-of-time wrote: | I recommend anyone who finds this topic interesting watch the | video _The Continuity of Splines_. It 's a detailed discussion of | how you derive Bezier and higher-order curves to serve your | purposes. | | https://www.youtube.com/watch?v=jvPPXbo87ds | wizofaus wrote: | Doesn't PS have "arc"? | fooofw wrote: | I was curious, so I looked up arc in the PostScript Language | Reference [1]. It contains the following (p. 530): | | > The arc is represented internally by one or more cubic Bezier | curves (see curveto) approximating the required shape. This is | done with sufficient accuracy to produce a faithful rendition | of the required arc. However, a program that reads the | constructed path using pathforall will encounter curveto | segments where arcs were specified originally. | | [1] https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf | CharlesW wrote: | > _The arc is represented internally by one or more cubic | Bezier curves..._ | | But that's a rendering implementation detail, no? Isn't the | precision and accuracy of any digital or physical | manifestation of a circle limited by implementation details | and physics? | fooofw wrote: | Yes, I agree completely. | Sharlin wrote: | Yes, but as the article notes, there are applications where | you need a circle way more precise than one approximated by | just a few Bezier curves. Although you could argue that any | finite precision can be achieved by simply using more | Bezier curves. | proto_codex wrote: | fact: circles are actually squares that have successfully | deceived you. You have been bested by a shape. | GuB-42 wrote: | That's a well known conspiracy theory that has been proven | wrong long ago. You can't square the circle. | | Don't be so irrational. | retrocryptid wrote: | But squares are really just diamonds which have been squished a | bit. | hinkley wrote: | So you're saying you don't have to square a circle because it | already is? | thfuran wrote: | Well I have to say, that really freed up my weekend. | johnnyworker wrote: | Sorry for not just quoting the bit about the straight line not | existing in nature, but I could not bring myself to reduce it all | to just that. In 1952 I spoke of the | civilization of make-believe, the one we must shake off, myself, | the the first of all! I spoke of columns of gray men on the march | toward sterility and self-destruction. The same year I | used the term "transautomation" to show the way beyond the | rationalism of technocrats toward a new creation in harmony with | the laws of nature. In 1953 I realized that the straight | line leads to the downfall of mankind. But the straight | line has become an absolute tyranny. The straight line is | something cowardly drawn with a rule, without thought or feeling; | it is a line which does not exist in nature. And that the | line is the rotten foundation of our doomed civilization. | Even if there are certain places where it is recognized that this | line is rapidly leading to perdition, its course continues to be | plotted. The straight line is the only sterile line, the | only line which does not suit man as the image of God. | The straight line is the forbidden fruit. The straight | line is the curse of our civilization. Any design | undertaken with the straight line will be stillborn. Today we are | witnessing the triumph of rationalist knowhow and yet, at the | same time, we find ourselves confronted with emptiness. An | aesthetic void, desert of uniformity, criminal sterility, loss of | creative power. Even creativity is prefabricated. | We have become impotent. We are no longer able to create. That is | our real illiteracy. | | - Friedensreich Hundertwasser, "Mouldiness Manifesto: Against | rationalism in architecture" | | https://www.sfu.ca/~andrewf/MOULDINESS_MANIFESTO.htm | NegativeK wrote: | > 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 a laser cutter. And... Circular motion | doesn't spring forth naturally from gantry CNC laser cutters -- | they're rectilinear in design. It's circles not existing all the | way down. | | Using it as a CAD format with inherent fundamental shapes missing | seems kind of funny, though. | itishappy wrote: | 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! | photonerd wrote: | Observable is pushing it. Technically observable, sure, but | ~1dpi misplaced is... unlikely to be noticeable. | | Plus, if that level of accuracy is required simply adding | more nodes improves accuracy exponentially. | | Not least, the "standard" approximation really should be | updated in software, as modern 4-node approximations are down | to 0.005%, almost an order of magnitude better. | ars wrote: | If you are misplaced by 1dpi, then your "1200 dpi" is | actually 600 dpi. | | If you got a machine that's accurate to 1200 dpi presumably | you want 1200 dpi and not 600. | itishappy wrote: | Oh, I completely agree! "Observable" is pushing the limits | of the word past absurdity. 1200dpi would put the | resolution of the system at just twice the wavelength of | their laser. I feel like that's about the limit of what's | possible due to physics [citation needed]. I'm fairly | confident their actual performance is less. | Animats wrote: | PDF for CAD is silly. The problem is that laser cutters tend to | take 2D vector image data as input, rather than G-Code like real | CNC machines. You can definitely express a circular path in | G-Code, and you expect a milling machine to cut one accurate to | the precision of the mechanical parts of the machine. But laser | cutter software is to some extent derived from printer | technology. You can raster scan a picture onto a surface with a | laser cutter. | mitthrowaway2 wrote: | Agreed. PDF for CAD has its place, but its place is shop | drawings read by humans, not as a machine interchange format. | Many laser cutters will accept other vector formats, like DXF, | which do have precise representation for circles. | crote wrote: | DXF seems to be reasonably common for laser cutters. It at | least supports arcs! | | I don't think many laser cutters use raster scanning, though. | That's going to leave some really nasty artifacts. You really | want to cut continuous lines like, well, lines. | Animats wrote: | Laser engraving is usually raster scan, and most laser | cutters can do both line cutting and raster scanning. | waffletower wrote: | I thought the article would go further and posit that Circles do | not exist in reality as they are approximations of a mathematical | ideal. But the author does present the raster image as a bonafide | circle, rather than the approximation that it truly is -- more | resolved than others or not. A zoomed in excerpt of the author's | rasterized circle approximation clearly shows that scale is key | in perception of reified ideals: https://ibb.co/P1KwLDm | pkulak wrote: | That statement is just one of a million in the "calculus does | not exist" realm, and is not nearly as interesting as this | article was. | waffletower wrote: | I don't think the statement attempted to invalidate the | article, there are many gems inside, such as the idea that | human perception elongates the vertical axis, etc. | namru1620 wrote: | You wouldn't happen to have a link handy about that | vertical axis perception thing would you, I l'm super | curious about it. | A_D_E_P_T wrote: | That's true in a sense, but you've got to go way down. At a | fine enough level --- say, at the level of atoms --- all | material things are granular, and circular or spherical things | are built stepwise from material building blocks, as though | from pixels. Thus even very "smooth" things are rough and | granular. | | Further: There are no circular (2D) molecules; nature prefers | hexagons and other polygons for that. Even the proton isn't | perfectly spherical. Whether the electron and other subatomic | particles are perfectly spherical cannot, as yet, be | determined. (The electron seemingly has a diameter far below | the Planck Length.) | | There are no very large circles or spheres, either. All | astronomical bodies are somewhat flattened. | | So I dare say perfect circles and spheres do not really exist, | save as idealized mathematical objects. | diogenes4 wrote: | Very aggressive claim for solely talking about bezier | representation. | accrual wrote: | That's pretty interesting. I'll now be doubting every circle I | walk by, questioning if it's even real or just some | approximation. | BillinghamJ wrote: | Perfect shapes do not exist on a physical level, so they're all | approximations | | https://factmyth.com/factoids/there-are-no-straight-lines-or... | goatlover wrote: | What about black holes? Do non-rotating ones create perfect | spheres? | nerdponx wrote: | Circles also don't exist in the core geospatial data library | GEOS. You have to approximate them with a polygon that has a | lot of vertices. | mbfg wrote: | circles exist with NURBs, iirc. Now at some point you have to | turn on individual pixels, so .... | Sharlin wrote: | Not if you use a vector display! | choonway wrote: | but until then, figuring out micron level tolerances over | meters can be done with perfect circles using Non Uniform | Rational B(Basis)-Splines. | ks2048 wrote: | Article says "Furthermore, the human vision system is a bit weird | and perfect circles look vertically elongated. You have to make | them non-circular for people to consider them properly circular." | | Anyone have a reference for this? ___________________________________________________________________ (page generated 2023-09-19 23:00 UTC)