
I've amended stickworks.py a little to show how the basic ideas of differential calculus might be spelled out in Python. First: Take a traditional classroom Polynomial with enough roots to make it wiggle up and down (just come up with some factors), then tweak the vertical scale to keep VPython from zooming out 3 miles just to take in the view. def snakeywakey(x): """ Polynomial with x-axis crossings at 3,2,-3,-7, with scaler to keep y-values under control (from a plotting point of view) """ return 0.01 * (x-3)*(x-2)*(x+3)*(x+7) Second: Include a generic derivative taker that expects a function as input, and returns a function that evaluates to approximately df(x)/dx at any x, assuming whatever you need about continuity and so on. def deriv(f, h=1e-5): """ Generic df(x)/dx approximator (discrete h) """ def funk(x): return (f(x+h)-f(x))/h return funk Third: Graph them together in two different colors. See how a diving slope means a negative derivative, while a leveling off means derivative = 0 (crossing x axis) and so on. Eyeballing the two curves together is a big part of "getting" that the green guy is talking about the *slope* of the red guy at the same x. # domain generators d1 = dgen(-8, 0.1) d2 = dgen(-8, 0.1) axes(-8,5,0) deriv_snakeywakey = deriv(snakeywakey) graph1 = xyplotter(d1, snakeywakey) graph2 = xyplotter(d2, deriv_snakeywakey) Edge.color = (1,0,0) # make 4th degree snakeywakey red for i in xrange(130): graph1.next() Edge.color = (0,1,0) # make its 3rd degree derivative green for i in xrange(130): graph2.next() Here's a link to the picture (in reality, you can zoom in and rotate, look from all points of view -- part of our "beyond flatland" campaign, designed to remind people why we don't prefer the flatlanders' calculators to our flatscreen computers). http://www.4dsolutions.net/ocn/python/pycalculus.png
== RESTART ================================ import stickworks Visual 2005-01-08 stickworks.testmemore()
Documentation: """ Some infrastructure for working with Vectors and Edges, including an xyplotter generator and axes maker. By Kirby Urner, Sept 13, 2006 Updated Sept 29, 2006: make color Edge class-level attribute add funky derivative demo refactor a bit Code: http://www.4dsolutions.net/ocn/python/stickworks.py For colorized source: http://www.4dsolutions.net/cgi-bin/py2html.cgi?script=/ocn/python/stickworks... Some relevant discussion: http://mail.python.org/pipermail/edu-sig/2006-September/007145.html http://mail.python.org/pipermail/edu-sig/2006-September/007149.html http://mail.python.org/pipermail/edu-sig/2006-September/007150.html http://mail.python.org/pipermail/edu-sig/2006-September/007312.html """ Kirby

Here's a link to the picture (in reality, you can zoom in and rotate, look from all points of view -- part of our "beyond flatland" campaign, designed to remind people why we don't prefer the flatlanders' calculators to our flatscreen computers).
RE: http://www.4dsolutions.net/ocn/graphics/pycalculus.png <-- different Colleague notified me the above URL was 404. Fixed. Plus added 2nd derivative (cyan), to source code and picture as well. Time for a blog post? Related chatter with math teachers: http://mathforum.org/kb/thread.jspa?threadID=1459250&tstart=0 Kirby

kirby urner wrote:
Related chatter with math teachers: http://mathforum.org/kb/thread.jspa?threadID=1459250&tstart=0
I go there and hear you talking to a community of math teachers as if you were an official ambassodor of Python and edu-sig, and as if we were all on the bangwagon of "gnu math" and "__rib__ syntax" here. My inituition failed to failed me again. I don't see anything terribly wrong with a "gnu math" meme or even __rib__, if you must. But you are bullshitting them that there is a cohesive community around these particular Kirby-centric semantics here. Just as you bullshit us that there is a legion of "gnu math" teachers out there awaiting your next instruction. You are taking something open and public, and narrowing it, and appropriating it. I am an active participant of edu-sig (too active for some), so all I can demand is that you not purport to speak for me. Consider this that demand. More generally, I wish you would stop this flim-flam business. Or do it more elegantly, at least. Art

On 9/30/06, Arthur <ajsiegel@optonline.net> wrote:
kirby urner wrote:
Related chatter with math teachers: http://mathforum.org/kb/thread.jspa?threadID=1459250&tstart=0
I go there and hear you talking to a community of math teachers as if you were an official ambassodor of Python and edu-sig, and as if we were all on the bangwagon of "gnu math" and "__rib__ syntax" here.
But we both know: edu-sig and the Math Forum are both public archives, so if I were really doing something too slimey, that'd be evident to everybody pretty I'm trying to impress (not you though) darned quick. My story is pretty easy. I programmed my friend's dad's HP in high school, dove into programming at Princeton (APL terminals in Firestone and dorm basement), took lots of engineering and math, aside from majoring in philosophy, and ended up a career geek for the NGOs and GOs (a little commercial sector). As a former Jersey City high school math teacher, I'm still interested in pedagogy, and from my years of pro programming, know that a *lot* of kids would groove on math more if it could be taught more like a computer science. That's what I'm already up to, plus having the most active Bucky site on the net (BFI didn't exist, no Bob Gray's site -- Chris Fearnley with his FAQ was one of the first). Only then do I come across Python.
My inituition failed to failed me again.
I don't see anything terribly wrong with a "gnu math" meme or even __rib__, if you must. But you are bullshitting them that there is a cohesive community around these particular Kirby-centric semantics here. Just as you bullshit us that there is a legion of "gnu math" teachers out there awaiting your next instruction.
"Better'n ENRON's Bull" could be my bumber sticker? Accusing me of BS is an OK sin, but there's plenty to spread around, if you want to start pointing fingers.
You are taking something open and public, and narrowing it, and appropriating it.
Absolutely. My right and freedom. No apologies. Go for it.
I am an active participant of edu-sig (too active for some), so all I can demand is that you not purport to speak for me. Consider this that demand.
So considered. Not a problem. There's an irony here. I'm always writing this for a huge invisible public school army, making America great, but in practice I'm this super exclusive army of none. That's just some kind of geometric pattern, of the type we study in Bucky type Synergetics (I say "Bucky type" because there's a Haken guy who wrote some Springer-Verlag type stuff that ain't like ours).
More generally, I wish you would stop this flim-flam business. Or do it more elegantly, at least.
Art
Oh yeah, easy for you to say. I had this red and black jacket in London, very loud by English standards. As I was preparing to address the London Knowledge Lab in a state of high jet lag, I ordered beer and potato (just trying to blend in). So a baked potato is called a Jacket Potato over there, or so they tell me. I could just see a gleam in the waitresses eye, as she coasted by asking loudly "so how's your Jacket?" I bet she was obliquely referring to my loud coat, now on the back of my chair. I was so much the tourist. In other words: elegant isn't always my style. Kirby

On 9/30/06, kirby urner <kirby.urner@gmail.com> wrote:
if it could be taught more like a computer science. That's what I'm already up to, plus having the most active Bucky site on the net (BFI didn't exist, no Bob Gray's site -- Chris Fearnley with his FAQ was one of the first). Only then do I come across Python.
BFI didn't yet exist as a hosted domain on the W3 I should say. Kiyoshi and his Philly friends got the bfi.org moniker secured (John Ferry catching from inside the BFI, then in LA), while I webmastered the first primitive website (still retrievable via archive.org -- note they've so-far kept with the tabs format, plus built something agreeably interactive (the web is less about push, more about pull these days, which I like -- more people publishing their own content, not just passively browsing (of course one wants both active and passive modes)). You'll find me in an old FoxPro Advisor, yakking up Chakovians Coordinates (calling 'em Quadrays), long before I'd stumbled across Python. I'm trying to think how Microsoft could make VFP affordable to schools, for the kind of math-through-programming exercises I'm thinking kids'd love (no, not every kid, and no shame in preferring football). But VFP is already a twisted story by then, having been appropriated by MSFT as a "dBase killer" (Borland went with Ashton-Tate's branding), touting Xbase as one of the Pillars they'd be supporting (right up there with VB and C/C++ I think it was). Obviously BS in retrospect. XBase is not general purpose like VB and not low level like C/C++. It was an early agile, interactive from the beginning, and when upgraded to an OO, was actually more sophisticated than VB -- we *defined* our own classes in a Visual Studio like IDE, didn't just use blackbox DLL objects supplied to us by COM or whatever (though we could use those too, and still do). VFP has always been better than average, by Microsoft's own standards (no shame in having an "average" that you're sometimes "better than" -- I was not saying this to be disparaging of MSFT). Anyway, yes, Chakovian Coordinates, centered at (0,0,0,0). Tom Ace chimed in with some 4x4 rotation matrices and wow, we had like this whole little vector algebra thing going on Synergetics-L. Someday, we'd capitalize on that even further. The Gerald de Jong entered my life, all hyped about Java. He flew out to JavaOne. The guy was already a Canada-trained mathematician and C/C++ guru. It's not like he was just cutting teeth. He had this vision of something called Elastic Interval Geometry and counted both Kenneth Snelson and Bucky Fuller as inspirational in that regard. Following Gerald's lead, I saw the wisdom in using a free language, especially one that'd work over the web, so dove into Java pretty seriously. I forget exactly how that connected me to Python, but it did. Linux was hardly usable as a GUI desktop yet, so all this is in Windows, dating back to early DOS, and in my case, yes, even CP/M on a Zorba. My trajectory from FoxPro through Java to Python is well chronicled in a multipart Geometry through Programming paper I published to 4dsolutions.net. I'm always focused on the same Polyhedra, using Chakovians or whatever, but I keep doing it over in a different language. Towards the end, the Scheme Team was generously coaching me on how I might continue my arc (these were the early edu-sig days, plus I was already posting to that same Math Forum forum), and implement the core ideas yet again in that language. I'm not saying it's a bad idea. However, for all my digging into PLT Scheme, I think by this time I was too mired in other paradigms. Lambda Calculus was never my focus, even at Princeton, where a lot of the original work was done (as I learned only later). Here's that multi-part geometry paper (VFP -> Java -> Python arc i.e. not really the Shuttleworth pipeline, especially when you count the early APL and the ongoing J branch, plus I've dabbled in Perl, C and Pascal, plus did FORTRAN for money (the only way I would)): http://www.4dsolutions.net/ocn/oop.html Kirby

kirby urner wrote:
You are taking something open and public, and narrowing it, and appropriating it.
Absolutely. My right and freedom. No apologies. Go for it.
You are free to do it, but not by right. Is it your right to do anything that no one can stop you from doing? Maybe in a schoolyard sense, yes. But not in a grown-up sense. At least in the world according to me.
In other words: elegant isn't always my style.
Believe it or not, I think we are more on the same side, than not. But I am forced to remain adversarial, mostly on the issue of style. Style is malleable, so it becomes a choice, a strategy. Your style - i.e. your strategy - is the basis upon which I am forced to question your seriousness. My style is certainly also open to question. I like to think that my willingness to be abrasive is, at least, a sign of my seriousness. And I am serious. Enough to not feel I need to apologize to anyone for engaging you, which others might see as taking something that is none of my business, and making it my business. I am exercising my citizenship, and am only surpised that others don't feel inclined to do the same. Art

On 9/30/06, Arthur <ajsiegel@optonline.net> wrote:
kirby urner wrote:
You are taking something open and public, and narrowing it, and appropriating it.
Absolutely. My right and freedom. No apologies. Go for it.
You are free to do it, but not by right. Is it your right to do anything that no one can stop you from doing? Maybe in a schoolyard sense, yes. But not in a grown-up sense. At least in the world according to me.
Just going by what's in the Python license. You should be glad I'm as open and public with my special case narrowing as I am. Nothing to keep me from running silent, and just sharing it with my perfect friends. I say "should be glad" because yes, I do think my curriculum writing is high caliber, or I wouldn't be spreading all over cyberspace (I hope in the right file cabinets -- the vista keeps shifting).
In other words: elegant isn't always my style.
Believe it or not, I think we are more on the same side, than not. But I am forced to remain adversarial, mostly on the issue of style. Style is malleable, so it becomes a choice, a strategy. Your style - i.e. your strategy - is the basis upon which I am forced to question your seriousness.
That's your privilege. If it were one road in a lonely town, and one lone red light, you being the light, me racing my engines, then I'd say we were adversaries. But it's a four lane freeway each way, no lights, except what's blinking on my dashboard (the Arthur light keeps flashing a lot, pesky :-D).
My style is certainly also open to question. I like to think that my willingness to be abrasive is, at least, a sign of my seriousness. And I am serious. Enough to not feel I need to apologize to anyone for engaging you, which others might see as taking something that is none of my business, and making it my business. I am exercising my citizenship, and am only surpised that others don't feel inclined to do the same.
Art
Lots of people engage me, if not here on edu-sig that much. You and I go back to Synergetics-L. People engaged me there. I fight with Rybo 24/7 on Synergeo. Rest assured, I get tested a lot, and I don't boast always passing. I boast talents, yes, but my powers are strictly limited (yours too no?). I goof up, lose at ping pong, bomb in chess (means I lose). I remember this time I was on Don's boat (where I just was today), yakking up the amazing superiority of human intelligence over anything mechanized (giving the birdie to AI), while meanwhile fooling around with my cell (the one before this Motorola -- it's all my blog). Just then, it beat me in chess. I can't tell you how humble I felt losing chess to my stupid cell phone. I had to think about the invisible army of engineers behind that performance, all the chess playing acumen that must have gone into this program. That assuaged my ego somewhat (hey, they had an army). Still... pesky device. Kirby
participants (2)
-
Arthur
-
kirby urner