## Re: [PyX-devel] Re: "smoothed" attribute in PyX

 Re: [PyX-devel] Re: "smoothed" attribute in PyX From: Michael Schindler - 2004-12-07 09:44:03 ```Hello Peter and André, On 06.12.04, Andre Wobst wrote: > > Finally, the diagrams have wiggly lines (roughly sinusoidal) attached > > at either end to represent the velocity operator. It would be great if > > there were a "deformer" which give a wiggly line instead of a cycloid. > > Are there plans to extend the "deformer" functions in the future? Please note that lots of "wiggly" lines can be thought of. A cycloid might look like a sinusoidally wiggled curve if you stretch it tremendously. A precise sinus is something different, however. The main problem with deformers that try to implement a well-defined geometrical thing like a cycloid or a sinus is how to cope with the curvature of the underlying curve. This is something I tried to optimize in the cycloid, and which makes it quite hard to understand (I guess). More deformers with sinus, zig-zag, ... would be nice. > There's another thing worth some thoughts in the design phase of such > a "framework" for feynman diagrams. Stroking arrows at the paths (at > the end or in the middle of a path) should be straight forward. Such > an arrow would be a decorator, not a deformer, by the way. But what I > would take care of from the very beginning are those double lines. I'm > not totally sure how those should be created starting from a > connecting path in the beginning. Should we start to have two paths > for that case. I don't think so ... but I do not have strong arguments > at hand. Do you mean to parallel curves with constant distance to each other? You certainly remember our discussion on the problem of "extending" curved boxes this way. This is, again, the same problem -- and it is a hard one. Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```

 [PyX-devel] Re: "smoothed" attribute in PyX From: Andre Wobst - 2004-12-06 22:40:59 ```Hi Peter, On 30.11.04, Peter Falloon wrote: > Thanks for that, everything works again now! Meanwhile, I hate to > bother you again, but I've decided to try and create a set of feynman > diagrams (of the kind used to calculate weak localization etc, i.e. > cooperons and diffusons and so on). I think ultimately getting a good > set of diagrams would be a very useful application of pyx. The first > step is to create an oval-shaped curve. I've been looking but I don't > see a simple way to do this. Ideally, there would be an optional extra > argument to circle which would allow to elongate along x or y axis. The > other option, which seems much less elegant, is to perform a linear > transformation on the circle, but this doesn't seem to work. Is there a > simple way to generate an oval? No. Its actually what PostScript offers (IIRC). If you want to draw an elipse, you have to transform a circle. However, you can also use bezier curves to nicely build those kind of shapes. > Finally, the diagrams have wiggly lines (roughly sinusoidal) attached > at either end to represent the velocity operator. It would be great if > there were a "deformer" which give a wiggly line instead of a cycloid. > Are there plans to extend the "deformer" functions in the future? (I basically do know how feynman diagrams look like and I even do understand in principle what they stand for -- thanks to Gert!) There are several things to be addressed here. You want to connect nodes. This is something you could make use of connectors. Those nodes are called boxes in the (current) language of PyX. These are graphical objects with a border, where we currently have a limitation to polygons but this is subject of change for the future (i.e. circles and the like should become possible in the future). As soon as you have connection lines, you could take advantage of deformers to create those wiggled lines. (It actually funny, that the cycloid, as we have it now, was originally a replacement for a wiggler (which I mistakeably called wriggler in my implementation) I wrote almost a year ago. It was more or less a design test and an example of what kind of path operations I had in mind that time. I was concentrating on a spring-like design as the real cycloid does it now as well.) The wiggler deformer, as you would like to have it, should be a different deformer than the cycloid. I think its not a good idea to build one huge and complicated deformer which is a huge collection of all kind of strange deform operations. Instead, we should have several small and handy deformers (also in terms of there parameter list), which OTOH could share some code by inheritance between each other. There's another thing worth some thoughts in the design phase of such a "framework" for feynman diagrams. Stroking arrows at the paths (at the end or in the middle of a path) should be straight forward. Such an arrow would be a decorator, not a deformer, by the way. But what I would take care of from the very beginning are those double lines. I'm not totally sure how those should be created starting from a connecting path in the beginning. Should we start to have two paths for that case. I don't think so ... but I do not have strong arguments at hand. Since Michael has spend quite some time in writing the connectors and the cycloid deformer, we might get him (and possibly others) included in the discussion. Thus I'm just cross-posting this answer to pyx-devel. Take it into account when answering, that Peter might not (yet ;-)) be a subscriber of pyx-devel ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ ```
 Re: [PyX-devel] Re: "smoothed" attribute in PyX From: Michael Schindler - 2004-12-07 09:44:03 ```Hello Peter and André, On 06.12.04, Andre Wobst wrote: > > Finally, the diagrams have wiggly lines (roughly sinusoidal) attached > > at either end to represent the velocity operator. It would be great if > > there were a "deformer" which give a wiggly line instead of a cycloid. > > Are there plans to extend the "deformer" functions in the future? Please note that lots of "wiggly" lines can be thought of. A cycloid might look like a sinusoidally wiggled curve if you stretch it tremendously. A precise sinus is something different, however. The main problem with deformers that try to implement a well-defined geometrical thing like a cycloid or a sinus is how to cope with the curvature of the underlying curve. This is something I tried to optimize in the cycloid, and which makes it quite hard to understand (I guess). More deformers with sinus, zig-zag, ... would be nice. > There's another thing worth some thoughts in the design phase of such > a "framework" for feynman diagrams. Stroking arrows at the paths (at > the end or in the middle of a path) should be straight forward. Such > an arrow would be a decorator, not a deformer, by the way. But what I > would take care of from the very beginning are those double lines. I'm > not totally sure how those should be created starting from a > connecting path in the beginning. Should we start to have two paths > for that case. I don't think so ... but I do not have strong arguments > at hand. Do you mean to parallel curves with constant distance to each other? You certainly remember our discussion on the problem of "extending" curved boxes this way. This is, again, the same problem -- and it is a hard one. Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. ```