User talk:Chemoelectric

From Rosetta Code

Filled shapes of any interest to you?

Hi there. As you've just posted a Bezier curve task, thought I'd be cheeky and ask whether filled shapes, as in complex polygons made from straight lines, arcs, and bezier curves, similar to Cubic_bezier_curves and ideally with anti-aliased edges thrown in, might perhaps pique your interest. If not no worries, but I believe it is quite a challenging little problem, and somewhere around #37 on my to-do/wanted list. --Petelomax (talk) 10:40, 7 June 2023 (UTC)

-- Being by my history a font design guy (half-baked maker of some of the fonts Google Fonts used to get started), most of my interest has been more on the analytic side than on the bitmap side, although I DID do ATS code for a whole bunch of the bitmap tasks, including the Xiaolin Wu task. I cannot stand aliased lines. Filling in, though, is something one DOES need to do for a graphical font editor, or for a renderer, so it COULD happen. If it is a piecewise bézier then the problem of whether it is clockwise or counterclockwise and the problem of what is its inside and what is its outside are related analytic problems, so perhaps could come first. :)

I have extremely little graphics programming in my life, oddly enough. I made fonts, and hacked on editors, but never on the graphical interface. And intersection, also strangely, is something I had programmed before only by the method used in the Maxima--but in C, for quadratics and cubics. It was a complicated adventure involving GNU Multiple Precision and the theory of polynomials. :) In Maxima it is trivial but that is because the interesting bits have already been done for us. --Chemoelectric (talk) 11:46, 7 June 2023 (UTC)

-- Heck, I did the Xiaolin Wu task in a handful of languages, it occurs to me. With little interactive programs for Icon dialects, and graphics sometimes involving some handsome projective geometry for others. Because otherwise boring. LOL.--Chemoelectric (talk) 11:53, 7 June 2023 (UTC)

-- Here is something related I HAVE done in the past that you might find interesting, if I or anyone ever make a task of it: Hobby's algorithm for inferring a piecewise cubic Bézier from on-curve points. As used in MetaFont, MetaPost, and presumably in Asymptote. (I did it with approximate solutions in degenerate cases but that was merely a matter of using IEEE arithmetic and the singular value decomposition, rather than making any effort to be "efficient".) --Chemoelectric (talk) 13:20, 7 June 2023 (UTC)

C23 and what we are likely to see

Today I read secondhand of someone complaining in an ACM trade magazine that C23 is going to continue to specify the comparison of pointers only if they point into the same block of memory. The complaint is that this means the computer can crash and burn.

It is really curious this was published in ACM publication, because that sort of thing is exactly what a computer might do, if you try such a thing. :) Oh, sure, it makes perfect sense to do if you are programming a TRS-80, but another architecture might come to a dead halt. Thus we can count on the C standardizers NEVER to specify comparison between pointers in general.

OTOH now every machine uses 2's complement so THAT can finally be standardized. (Though you could already do portable 2's complement in C -- by using unsigned integers.) Chemoelectric (talk) 20:33, 7 June 2023 (UTC)