Anybody got any suggestions for a “stupid-simple” Python graphics package? I don’t need or want a “swiss-army knife” package that “can do anything graphical that you can possibly imagine, as long as you don’t mind spending days/weeks/months learning every nook and cranny of the code, and using dozens, if not hundreds, of lines of setup code to accomplish even the most trivial task”. I just want a simple, functional package that will let me do something essentially like this:
import InsertNameOfMyDreamGraphicsLibraryHere as g
MyGraphicsWindow=g.MakeGraphicsWindow(HorizontalSize, VerticalSize, BackgroundColor)
X=MyFunctionThatGeneratesXValues()
Y=MyFunctionThatGeneratesYValues()
Color=MyFunctionToSelectAColor()
MyGraphicsWindow.PlotPoint(X,Y,Color)
and get exactly what that code describes: A window on the screen with a “Color”-colored dot located at point X,Y in it.
Just as important (and where John Zelle’s “Graphics.py” package, which I was attempting to use falls down - HARD) is the ability to do this with potentially ridiculous numbers of points without taking a performance hit (in either time, or memory used). Zelle’s package is simple enough, and can accomplish the task, but it slows to a crawl - No, make that a “sub-crawl” (Might even be more accurate to say that it just plain lapses into an all-out coma…) and starts gulping RAM like they’re planning on outlawing it tomorrow once you get past a certain number of points. (as of yet, it’s not clearly established what that number is, and frankly, I don’t care, other than to note that it’s apparently a good deal lower than the number of points I’m trying to work with)
That’s all I need. Nothing else. No scaling, no animation, no rotation, no shape-drawing or 3-D projections, no zoom/pan action that’ll let you look at the dot from any angle imaginable by man, god, or creatures from Dimension X - nothing but the ability to place a dot of a specified color at a specified X,Y point in a window. A few “add-ons” like “DrawALine()” or “DrawACircle()” might eventually come in handy now and then (and honestly, would be trivial to build up from the “make a dot” functionality I need most), but even they would be far beyond what I actually want/need for my task.
Is this REALLY so big an ask??? I’m starting to think so, seeing as how every graphics package I come across is either ridiculously bloated and tries to do absolutely everything, with a learning-curve that resembles a climb up the north face of K2 before you can do anything at all with it, and requires idiotic amounts of setup code (which can’t be generated without who-knows-how-long spent slogging through picking up the idiosyncrasies of the particular package, rather than getting on with completing the task you’re actually trying to accomplish) or is (or in the face of any real “challenge”, such as a large number of points, becomes) so slow as to be effectively unusable.
40-some years ago, the capability I’m looking for was built into the comparatively primitive language (AppleSoft BASIC) that came baked into the ROMs of every Apple //e ever made, fergawdsake! If you wanted to draw a green dot on the screen at X=12,Y=38, the following line is THE COMPLETE PROGRAM NEEDED TO DO IT - no add-ons/plugins, no “helper code”, no callouts to assembly/machine language code, no extensive setup - Just this one lonesome line of code accomplished the task, and did so without slowing down to the point of wondering if it would complete within my lifetime when done many times:
10 HGR : HCOLOR=1 : HPLOT(12,38)
(And before somebody raises the “Yeah, but there was assembly code underlying it” concept, indeed there was - and when you looked at that underlying assembly code, it was crazy-simple, consisting of bumping a couple of soft switches (by reading from a specific trio of bytes in memory) for the HGR statement, moving the input values (the HColor value, and the values 12 and 38) into known locations for easy access, and doing a nearly trivial “Since X is 12 and Y is 38, that means means we need to tickle this particular byte in memory” calculation - a task that was accomplished with a bit more than a dozen Assembly Language instructions - before doing a shift and a bitwise OR on the calculated byte. Task complete.)
Yet 40-odd years later, in python, a language that’s touted as being light-years ahead of anything (Other than perhaps C) that was available back then, I can’t find a way to do this trivially simple task without needing (at least) an add-on module and who-knows-how-many lines of setup code before I can start to think about putting my first dot on the screen! This is “progress”?
Gah… pardon my rant - This topic (not being able to find a useful tool to do a task in Python that’s basically trivia in almost any other language) is a “string” that, when pulled, almost always ends up with me getting so frustrated I can’t help but rage about it… (Yes, the project COULD be done in a language other than Python, and I’d say it would probably be easier, since it’s likely that I’d be more skilled in that other language than I am in Python) however, that decision isn’t mine to make, so Python it is, whether I like it or don’t)
Does anyone know of a Python graphics package that fits my requirements? If so, PLEASE clue me in!