From: Arthur S. <aj...@ix...> - 2001-10-14 14:34:30
|
The implementation - for reasons I don't understand - has the arrow shaft dependent upon the arrow length. Length times .1 as the default. I am looking to override this behavior - to achieve a constant shaft in an interactive environment where the arrow length might change dynamically. Would think that a "normalization" routine would work - dynamically divide by arrow.length. But haven't had success. Anyone have ideas on this? Art |
From: Bruce S. <ba...@an...> - 2001-10-14 14:55:45
|
As the documentation says, the shaft width is proportional to arrow length only as a default (which can also be invoked by setting shaft width to zero). If you specify the shaft width explicitly, that's the shaft width you get. Do you have a suggestion of how to reword the documentation to make this more clear? Bruce Sherwood --On Sunday, October 14, 2001 10:34 -0400 Arthur Siegel <aj...@ix...> wrote: > The implementation - for reasons I don't understand - has the arrow shaft > dependent upon the arrow length. Length times .1 as the default. > > I am looking to override this behavior - to achieve a constant shaft in an > interactive environment where the arrow length might change dynamically. > Would think that a "normalization" routine would work - dynamically divide > by arrow.length. > But haven't had success. |
From: Arthur S. <aj...@ix...> - 2001-10-14 15:31:29
|
The docs are fine. But I am not getting the behavior I expect. If I set a specific fixed shaftwidth, that is my *initial* width. But the width varies as the length varies interactively. I believe the behavior I am referring to can be seen in the cross_product demo where the shaftwidth is initially set to a constant, but varies in the interactive scene. Am I missing something? Art ----- Original Message ----- From: "Bruce Sherwood" <ba...@an...> To: <vis...@li...> Sent: Sunday, October 14, 2001 10:59 AM Subject: Re: [Visualpython-users] arrow shaftwidth question > As the documentation says, the shaft width is proportional to arrow length > only as a default (which can also be invoked by setting shaft width to > zero). If you specify the shaft width explicitly, that's the shaft width > you get. Do you have a suggestion of how to reword the documentation to > make this more clear? > > Bruce Sherwood > > --On Sunday, October 14, 2001 10:34 -0400 Arthur Siegel <aj...@ix...> > wrote: > > > The implementation - for reasons I don't understand - has the arrow shaft > > dependent upon the arrow length. Length times .1 as the default. > > > > I am looking to override this behavior - to achieve a constant shaft in an > > interactive environment where the arrow length might change dynamically. > > Would think that a "normalization" routine would work - dynamically divide > > by arrow.length. > > But haven't had success. > > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Arthur S. <aj...@ix...> - 2001-10-14 15:49:19
|
From the docs for arrow: "If headlength becomes larger than half the length of the arrow, or the shaft becomes thinner than 1/50 the length, the entire arrow is scaled accordingly." I suspect my issue is in there somewhere. I will play with setting headlength to a constant and see how that behaves. Art ----- Original Message ----- From: "Bruce Sherwood" <ba...@an...> To: <vis...@li...> Sent: Sunday, October 14, 2001 10:59 AM Subject: Re: [Visualpython-users] arrow shaftwidth question > As the documentation says, the shaft width is proportional to arrow length > only as a default (which can also be invoked by setting shaft width to > zero). If you specify the shaft width explicitly, that's the shaft width > you get. Do you have a suggestion of how to reword the documentation to > make this more clear? > > Bruce Sherwood > > --On Sunday, October 14, 2001 10:34 -0400 Arthur Siegel <aj...@ix...> > wrote: > > > The implementation - for reasons I don't understand - has the arrow shaft > > dependent upon the arrow length. Length times .1 as the default. > > > > I am looking to override this behavior - to achieve a constant shaft in an > > interactive environment where the arrow length might change dynamically. > > Would think that a "normalization" routine would work - dynamically divide > > by arrow.length. > > But haven't had success. > > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <ba...@an...> - 2001-10-14 16:03:50
|
That indeed is probably it. As you said in another note, this behavior can be seen in the cross-product demo: when an arrow gets very short, we shrink the whole thing. The reason for doing this is to provide some visual cue as long as possible for there being an arrow present. If we were to keep the shaft width fixed for very short arrows, we wouldn't be able to show an arrow-like object. It is of course possible that there is some other solution to this; perhaps someone can suggest a better solution to the problem of very short arrows. Bruce Sherwood --On Sunday, October 14, 2001 11:49 -0400 Arthur Siegel <aj...@ix...> wrote: > "If headlength becomes larger than half the length of the arrow, > or the shaft becomes thinner than 1/50 the length, the entire > arrow is scaled accordingly." |
From: Arthur S. <aj...@ix...> - 2001-10-14 18:35:39
|
My solution at this point has been to alter the "min" settings in the arrow C code to something that works better for me, and recompile. My wish is either to be able to set the min/max settings from Python, or to allow some override of the min/max behavior. As it stands writing to shaftwidth does not seem to take, once the min/max conditions have set in. Art ----- Original Message ----- From: "Bruce Sherwood" <ba...@an...> To: <vis...@li...> Sent: Sunday, October 14, 2001 12:07 PM Subject: Re: [Visualpython-users] arrow shaftwidth question > That indeed is probably it. As you said in another note, this behavior can > be seen in the cross-product demo: when an arrow gets very short, we shrink > the whole thing. The reason for doing this is to provide some visual cue as > long as possible for there being an arrow present. If we were to keep the > shaft width fixed for very short arrows, we wouldn't be able to show an > arrow-like object. > > It is of course possible that there is some other solution to this; perhaps > someone can suggest a better solution to the problem of very short arrows. > > Bruce Sherwood > > --On Sunday, October 14, 2001 11:49 -0400 Arthur Siegel <aj...@ix...> > wrote: > > > "If headlength becomes larger than half the length of the arrow, > > or the shaft becomes thinner than 1/50 the length, the entire > > arrow is scaled accordingly." > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <ba...@an...> - 2001-10-14 22:05:54
|
I realize that it is difficult to express graphics in words, but can you say more about your needs, and how additional attributes of the arrow object might meet them? I'll try to express graphics in words about the current situation. If the arrow is so short that the head length is a large fraction of the arrow length (equal to or greater than half, currently), the whole arrow, shaft width and head, are shrunk to retain the shape of an arrow (rather than turning into a cone). Bruce Sherwood --On Sunday, October 14, 2001 14:36 -0400 Arthur Siegel <aj...@ix...> wrote: > My solution at this point has been to alter the "min" settings in > the arrow C code to something that works better for me, and > recompile. > > My wish is either to be able to set the min/max settings from > Python, or to allow some override of the min/max behavior. > As it stands writing to shaftwidth does not seem to take, once > the min/max conditions have set in. > > Art |
From: Arthur S. <aj...@ix...> - 2001-10-14 23:13:13
|
My particular problem is a different situation - the long arrow (versus the short arrow). In this case, if the length is more than 50 times the shaftwidth, there is automatic rescaling - the shaft thickens. You can also see this phenom in the crossproduct demo. It is not clear exactly how the rescaling works. It is clear that in some of my constructions, its not quite what I want. My issue is the lack of control of the specifics. The issue, since my app is dynamic, is that the rescaling kicks in suddenly and is somewhat jarring visually. Why 50 times - when 25 or 100 might work much better in a particular situation. Or none, if that happens to work in a particular instance. The default behavior is probably reasonable. The inability to override the defaults in a meaningful way, is frustrating. Wondering out loud if Python2.2 will allow me to sub-class the arrow and get closer to what I want. Also wishing I had a better handle on Python extension stuff in C. Wondering out loud if giving the configure the ability to set the min/max settings from Python is a big or little thing. Art ----- Original Message ----- From: "Bruce Sherwood" <ba...@an...> To: <vis...@li...> Sent: Sunday, October 14, 2001 6:09 PM Subject: Re: [Visualpython-users] arrow shaftwidth question > I realize that it is difficult to express graphics in words, but can you > say more about your needs, and how additional attributes of the arrow > object might meet them? > > I'll try to express graphics in words about the current situation. If the > arrow is so short that the head length is a large fraction of the arrow > length (equal to or greater than half, currently), the whole arrow, shaft > width and head, are shrunk to retain the shape of an arrow (rather than > turning into a cone). > > Bruce Sherwood > > --On Sunday, October 14, 2001 14:36 -0400 Arthur Siegel <aj...@ix...> > wrote: > > > My solution at this point has been to alter the "min" settings in > > the arrow C code to something that works better for me, and > > recompile. > > > > My wish is either to be able to set the min/max settings from > > Python, or to allow some override of the min/max behavior. > > As it stands writing to shaftwidth does not seem to take, once > > the min/max conditions have set in. > > > > Art > > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: David A. <dm...@an...> - 2001-10-16 14:42:02
|
I've built visual for Redhat Linux 7.1, Python 2.1.1 and updated our Web page accordingly. Included are all the pieces required to install Python 2.1.1, Numeric, libgtkglarea and visual. Also included is the source RPM for visual, plus the python and libgtkglarea pieces required to build visual. |
From: David A. <dm...@an...> - 2001-10-16 15:31:20
|
I should have mentioned, this version also includes idlefork, an enhanced version of the IDLE integrated development environment. |
From: Michael Katz-H. <mi...@go...> - 2001-10-16 20:36:24
|
I get the following error upon running python2 and then doing an from visual import *... Python 2.1.1 (#1, Aug 28 2001, 19:51:39) [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 Type "copyright", "credits" or "license" for more information. >>> from visual import * Visual-2001-10-15 WARNING: Python C API version mismatch for module cvisual: This Python has API version 1010, module cvisual has version 1007. Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.1/site-packages/visual/__init__.py", line 18, in ? from cvisual import vector, mag, norm, cross, rotate, faces ImportError: cannot import name faces I thought this was fixed? -Michael On Tue, 16 Oct 2001, David Andersen wrote: > I've built visual for Redhat Linux 7.1, Python 2.1.1 and updated our Web > page accordingly. > > Included are all the pieces required to install Python 2.1.1, Numeric, > libgtkglarea and visual. > > Also included is the source RPM for visual, plus the python and > libgtkglarea pieces required to build visual. > > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > -- /-------------------------------------------------------------\ | Michael Katz-Hyman mz...@an... | | Pittsburgh, PA USA http://www.andrew.cmu.edu/~mzk | \-------------------------------------------------------------/ |
From: Ari H. <ahe...@an...> - 2001-10-16 20:43:25
|
On Tue, Oct 16, 2001 at 04:36:17PM -0400, Michael Katz-Hyman wrote: > I get the following error upon running python2 and then doing an > from visual import *... > > Python 2.1.1 (#1, Aug 28 2001, 19:51:39) > [GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on linux2 > Type "copyright", "credits" or "license" for more information. > >>> from visual import * > Visual-2001-10-15 > WARNING: Python C API version mismatch for module cvisual: > This Python has API version 1010, module cvisual has version 1007. This is not the problem. It can be ignored. > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.1/site-packages/visual/__init__.py", line 18, in > ? > from cvisual import vector, mag, norm, cross, rotate, faces > ImportError: cannot import name faces This is the real problem. > > I thought this was fixed? > Apparantly it rebroke itself :) DMA can fix it tho. Dave, can you also verify that the correct Makefile made it into (and remained in) CVS? Ari |
From: David A. <dm...@an...> - 2001-10-18 13:41:18
|
I don't get it. I can't reproduce this problem. I've even re-installed Linux to get a completely clean system, then installed python2.1 and visual from our Web site - works just fine. The first error message you are getting indicates that somehow you've got the wrong version of /usr/lib/python2.1/site-packages/cvisualmodule.so - is is possible you copied this in from someplace else? Did you install python2.1 from our Web site or did you get it from somewhere else? |