From: Magnus Lie Hetland <magnus@he...>  20040727 11:27:24

Andre Wobst <wobsta@...>: > > Hi, >=20 > I'm moving my posting to pyxdevel ... I think its a much better place > to post the following code. (Magnus, you're listing here, don't you? I > think I remember your name from when I looked at the subscriber list > quite some time ago.) Sure. I didn't quite remember myself, which is why I used pyxuser... But, yes, I'm on pyxdevel as well. > On 27.07.04, Andre Wobst wrote: > > Beside that my main concern is, whether its enough to stick on this > > strict assignments. This is quite a limitation. We can't compete to > > MetaPost by that (but we want, don't we?). I'm not sure whether its > > possible to cook it all down to an Equalityfunction: > >=20 > > Equal(b, a + Point(10, 0)) >=20 > I just couldn't resist: A linear equation solver can be easily build > like this. I know  I've thought about this myself in the past, and I've even found code that does this sort of thing. I don't remember exactly where, but it had a variable class and did all the linear equations behind the scenes. Also, numarray (and Numeric) has support for the equation solving part; I guess they could be optional mechanisms for speed, if this is indeed the way to go. > Find some code enclosed. You may consider to go along that line > (just in case you want to spend some time on this issue). I might. This is sort of an issue that crops up every now and then for me (i.e. every time I want to create a figure, basically ;) > I think, a 2dpoint can be build on top of this already by combining > two variables. Certainly. It would also be neat to be able to use parametrized curves in the same system, as in MetaPost; but I guess it's not quite that critical, as you already have support for finding intersections in PyX. > The same for higher dimension points. I'm not totally sure whether a > transformation can be easily integrated in that concept. Well, if we use a general matrixbased version, it's all good. (Haven't looked at your code  it might work just as well.) That is, an affine transform are basically just added terms to the linear equations. And it would be *very* useful to allow them... E.g. "this point rotated around that point by 60 degrees equals this point rotated around that point by 30 degrees" and the like. > My grasp tells me, that a transformation contains another set of > variables (6 for a 2d>2d affine transformation). When multiplying > with a (lazy) point (two variables) the system becomes nonlinear. > I'm kind of confused at the moment ... ;) Hm. No, I don't think so... If you say that one point, transformed by an affine transform, equals another point, all you have is a linear set of two equations in two variables  no? Not sure what you mean by "multiplying with a [...] point" here, though. I may be missing something :] Anyway, writing a system like this based on linear equations is a bit more work than a oneway functionbased one. I'll have a look but I can't promise anything. > Andr=E9 =20 Magnus Lie Hetland "Canned Bread: The greatest thing since sliced http://hetland.org bread!" [from a can in Spongebob Squarepants] 