You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(15) |
Oct
(32) |
Nov
(35) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(46) |
Feb
(22) |
Mar
(65) |
Apr
(49) |
May
(22) |
Jun
(29) |
Jul
(51) |
Aug
(34) |
Sep
(32) |
Oct
(46) |
Nov
(30) |
Dec
(32) |
2002 |
Jan
(48) |
Feb
(4) |
Mar
(20) |
Apr
(28) |
May
(13) |
Jun
(34) |
Jul
(51) |
Aug
(15) |
Sep
(15) |
Oct
(35) |
Nov
(15) |
Dec
(20) |
2003 |
Jan
(31) |
Feb
(111) |
Mar
(41) |
Apr
(28) |
May
(36) |
Jun
(29) |
Jul
(27) |
Aug
(29) |
Sep
(47) |
Oct
(28) |
Nov
(7) |
Dec
(26) |
2004 |
Jan
(44) |
Feb
(9) |
Mar
(17) |
Apr
(26) |
May
(58) |
Jun
(13) |
Jul
(44) |
Aug
(64) |
Sep
(30) |
Oct
(11) |
Nov
(21) |
Dec
(28) |
2005 |
Jan
(29) |
Feb
(11) |
Mar
(11) |
Apr
(22) |
May
(85) |
Jun
(46) |
Jul
(17) |
Aug
(18) |
Sep
(14) |
Oct
(22) |
Nov
(1) |
Dec
(45) |
2006 |
Jan
(20) |
Feb
(36) |
Mar
(18) |
Apr
(24) |
May
(21) |
Jun
(48) |
Jul
(23) |
Aug
(20) |
Sep
(10) |
Oct
(41) |
Nov
(46) |
Dec
(40) |
2007 |
Jan
(40) |
Feb
(20) |
Mar
(13) |
Apr
(6) |
May
(24) |
Jun
(31) |
Jul
(30) |
Aug
(11) |
Sep
(11) |
Oct
(10) |
Nov
(56) |
Dec
(64) |
2008 |
Jan
(64) |
Feb
(22) |
Mar
(63) |
Apr
(28) |
May
(25) |
Jun
(36) |
Jul
(11) |
Aug
(9) |
Sep
(14) |
Oct
(41) |
Nov
(46) |
Dec
(130) |
2009 |
Jan
(95) |
Feb
(41) |
Mar
(24) |
Apr
(35) |
May
(53) |
Jun
(67) |
Jul
(48) |
Aug
(48) |
Sep
(86) |
Oct
(75) |
Nov
(64) |
Dec
(52) |
2010 |
Jan
(57) |
Feb
(31) |
Mar
(28) |
Apr
(40) |
May
(25) |
Jun
(42) |
Jul
(79) |
Aug
(31) |
Sep
(49) |
Oct
(66) |
Nov
(38) |
Dec
(25) |
2011 |
Jan
(29) |
Feb
(18) |
Mar
(44) |
Apr
(6) |
May
(28) |
Jun
(31) |
Jul
(36) |
Aug
(24) |
Sep
(30) |
Oct
(23) |
Nov
(21) |
Dec
(27) |
2012 |
Jan
(14) |
Feb
(11) |
Mar
(2) |
Apr
(48) |
May
(7) |
Jun
(32) |
Jul
(22) |
Aug
(25) |
Sep
(31) |
Oct
(32) |
Nov
(21) |
Dec
(17) |
2013 |
Jan
(44) |
Feb
(27) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(5) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bruce S. <Bru...@nc...> - 2012-11-10 23:19:00
|
Today for the first time I was able to run all of the standard VPython programs with a version of VPython based on wxPython. There's still some polishing to be done before a release, but I'm delighted to have gotten this far. Remember that one thing this will lead to is a version that uses Cocoa on the Mac and can therefore permit running on a 64-bit Python. Another thing it should make possible is being able to put a 3D graphics canvas in a window that also has native buttons, sliders, etc., and with native pull-down menus. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2012-11-10 02:45:06
|
Perhaps this is what you're looking for: from visual import * from visual.graph import * # From the VPython Help: # If you say g = gcurve(), g.gcurve is # a curve object used to represent the gcurve. # Every gdisplay has the attribute "display". d = gdisplay() g = gcurve() g.plot(pos=(2,1)) g.plot(pos=(5,3)) d.display.mouse.getclick() g.gcurve.pos = [(1,3), (4,1)] Bruce Sherwood On Fri, Nov 9, 2012 at 6:02 PM, Brian Stephanik <bri...@gm...> wrote: > I have a question on how to perfrom a specific task in VPython. I hope I'm > asking the right list. > > I'm trying to get the visual.graph module to be able to dynamically update a > curve. For example, I'd like to graph a function f(x) + c, where c is able > to be manipulated by the user, perhaps via a slider control. I can't seem to > get VPython to *change* a graph, only to draw new ones (it seems histograms > are able to do this, but not the other plot types?). And the gcurve object > doesn't seem to respond to setting .visible=False, thus allowing me to > create a new one and re-draw. > > Thanks for considering, > > Brian > > > Brian Stephanik > Graduate Student > Department of Physics > University of Washington > bs...@uw... |
From: Brian S. <bri...@gm...> - 2012-11-10 01:03:48
|
I have a question on how to perfrom a specific task in VPython. I hope I'm asking the right list. I'm trying to get the visual.graph module to be able to dynamically update a curve. For example, I'd like to graph a function f(x) + c, where c is able to be manipulated by the user, perhaps via a slider control. I can't seem to get VPython to *change* a graph, only to draw new ones (it seems histograms are able to do this, but not the other plot types?). And the gcurve object doesn't seem to respond to setting .visible=False, thus allowing me to create a new one and re-draw. Thanks for considering, Brian Brian Stephanik Graduate Student Department of Physics University of Washington bs...@uw... |
From: Bruce S. <Bru...@nc...> - 2012-11-07 18:38:14
|
Progress report on basing VPython on wxPython: All objects display, in multiple windows, and all mouse interactions work. The major known issues not yet addressed are GetProcAddress, a platform-dependent function for invoking extensions to OpenGL, and font issues. None of this is in a public repository yet. Bruce Sherwood |
From: C A. R. <an...@xt...> - 2012-11-06 04:51:49
|
On Sat, Oct 20, 2012 at 9:47 PM, Mark Adam <dre...@gm...> wrote: > On Sat, Oct 20, 2012 at 7:23 PM, Bruce Sherwood <Bru...@nc...> wrote: > >> As for "VPython attracts young programmers", I've been disappointed >> that Brandmeyer was the only new person, young or old, to get deeply >> involved with VPython development after its creation. > > I meant that 3-d graphics, in the easy way that vpython makes it, adds > a very cool "gee-wiz" factor that is hard to beat. Young programmers > eat that stuff up, and it acts as a magnet that attracts more > development. perhaps a bit random... vpython is actually the reason i forced myself to learn python. i was indeed fascinated by the simplicity and power of it all, and my foray was a re-implementation of [ruby] gltail that i sadly never finished, albeit learned a ton... been lurking on the list ever since... something like 3-4 years or so. i suppose i'm not suuuuper young @ 25yo; i've been a full-time developer for ~5-6yrs -- the last two purely python -- i credit portions of the latter to vpython's alluring brilliance, and the rest to python's own inherent magnificence. sadly i have not contributed much of anything concrete, due mostly to the ever-lasting-excuse "lack-of-time" and "other-projects" and [...], but i recently gave a demo of vpython for ~45 other developers (Perl/PHP/JS primarily) at work that was extremely well received -- spheres orbiting a "gravity well" -- where each sphere represents (and responds+morphs to) events/messages occurring on the company -wide message queue (rabbitmq)... so after little more than ~200 lines of glue and glitz, i demo'ed a real-time visualization of human "busy-ness"... the events in question were ~600 call center agent status changes (hold/waiting/busy/incoming/cool-down/etc) from a facility several hundred miles away. needless to say, and despite it's obvious simplicity and/or lack of any real practical use, it still irradiated onlookers with "very cool `gee-wiz` factor" and piqued the interest of everyone around -- non-developers alike -- and ultimately led to some chatter/buzzing/exploring the possibilities. apologies on the length; hopefully a little success story at the very least! even my 3yo son asks me to "play the balls" for him pretty often still, and doing so gets many-a-"wows" and "that's cool dad" sent my way :) visual-python FTW! -- C Anthony |
From: Bruce S. <Bru...@nc...> - 2012-10-21 04:13:11
|
Well, I may be completely oblivious and ignorant, but I really can't imagine that there was some "split" involving VPython. The Python developers rather quickly on the scale of things decided to make 1/2 be 0.5, for their own internal reasons. I think that the change had little to do with the request from someone (me) who at that time had no standing whatsoever, for the sake of something called VPython, which at the time had close to zero users and was hardly known. It was impossible for Python to make an immediate change, due to backward compatibility issues. In my view that community has done an admirable job in dealing with this issue, even though it has taken much longer than one would prefer. There could have been some kind of split between integer-oriented computer scientists and floating-point-oriented computational scientists, but about the major development numpy (and its predecessors), not the minor development VPython. One could make cogent arguments for numpy having been part of Python. Despite that, there is a flourishing community of scientific Python users, the most visible component being scipy.org and the Sage project. In recent years there have been two whole issues of the journal "Computers in Science and Engineering" devoted to Python. A few years ago one of the astrophysics groups at NCSU abandoned the numerical package they had been using and switched to Python. Etc. All of which says that the computational modeling folk were not pushed away from Python by some hypothesized resistance from Guido and fellow developers. Bruce Sherwood |
From: Mark A. <dre...@gm...> - 2012-10-21 02:47:12
|
On Sat, Oct 20, 2012 at 7:23 PM, Bruce Sherwood <Bru...@nc...> wrote: > Soon it became evident that a significant stumbling block was the fact > that in Python, as in so many languages (but not JavaScript) 1/2 was > 0, not 0.5. This caused lots of trouble for our physics students, so I > proposed to the Python community that 1/2 be 0.5 instead of 0. That > was a trigger for lots of debate among Python developers, who > eventually found that they had their own reasons for making the > change. Thanks for the recollection. The reason I said it was a significant break, is that with that debate/faction, [my sense was] a fork between physicists, who were looking at high-level programming languages as both a pedagogical tool and modeling tool (beyond its historical use as a calculating tool), and the computer science crowd, who were looking at languages from a completely different light within both CS theory and programming language design (in which Python was a recent and novel contribution), occurred because of an unresolved debate about the importance of floating point (for the Phys crowd) and historical "prejudices" in comp science crowd about having unambiguous "round numbers". To me, this was a bit split, and although it was relegated to the __future__ and is the default in python3, the "future", if you will, still hasn't seemed to have happened yet. > There has never been a "VPython development community". I understand that it has been small, but I don't know if you're aware how much silent support you guys had in the simulation and modeling crowd. Though they weren't participating directly in vpython development, they were waiting in the background -- hedging for a major language adoption, so that they could [re-]invest their "holdings", so to speak. Much like a bunch of financial investors eyeing at a new country which is evaluating a choice at instituting a democratic, free-market system. Judging from your message, I don't think you ever saw that, but yet I know that it was there. I think Guido sensed it, but in the end his computer science bias simply won. With that win, many turned away. > So the "VPython development community" has fluctuated between 1 and 2 > people, and this infinitesimal group never "receded from the > python-dev community", of which it was never a part. This is the source of my lament, Bruce -- it was on the verge of becoming a major synthesis and collaboration between two major groups (comp sci and physics/modeling). > As for "VPython attracts young programmers", I've been disappointed > that Brandmeyer was the only new person, young or old, to get deeply > involved with VPython development after its creation. I meant that 3-d graphics, in the easy way that vpython makes it, adds a very cool "gee-wiz" factor that is hard to beat. Young programmers eat that stuff up, and it acts as a magnet that attracts more development. > I don't understand your pessimism, that one must abandon multiplatform > or speed or API. I mean that the OS carries its *own* event model and sits between python user-space and the hardware. It has its *own* ideas of how I/O should be scheduled, managed, and accessed (that is the *business* of the OS after all!). This makes it difficult to be multi-platform without sacrificing either raw speed or consistent API abstraction (two ends of the hardware <--> user "stack"). > As for a unified operating environment, I'll point to GlowScript > (glowscript.org), which is very similar to VPython but runs in a > browser. It is based on Javascript (or optionally CoffeeScript) and > uses in place of OpenGL (used by VPython) the similar 3D graphics > library WebGL, which is part of current browsers. GlowScript now has > capabilities roughly comparable to VPython. Not coincidentally, it has > been built by David Scherer and me, though Scherer has not been able > to work on it for some months, being deeply involved in his new > company (foundationdb.com). It has been a great joy to work in an > environment where thanks to being browser-based it was truly trivial > for GlowScript to work automatically on Windows, Mac, and Linux. I've been following your developments with glowscript and with all the hype of HTML5 and WebGL. I like those experiments, because I think it keeps vpython in the public consciousness to some degree, but I really think WebGL will go the way of VRML (remember that?); i.e. a powerful tool that no one knows how to exploit properly. ...Which bring me to the (real) point underlying all of this. As you might remember, I was at the Santa Fe Complex, trying to develop a tool to make this nascent phenomenon of "hackerspaces" work -- a tool to link people and projects together in a visual way, solving once and for all the scaling problem that happens when you get to about a 1000 objects. Slashdot, digg, del.icio.us, etc. -- all have suffered from the "paucity of dimensionality" that HTML is. Current HTML offers about 2.3 (fractal dimensions) of representing linked data (i.e. "hypertext"). VPython (or WebGL, in theory), could break the web about of the 2-d box and create a 3d *Presentation* layer for the WWW allowing the visual cortex to make relationships between data rather than hand-crafting RDF. I call this Internet II, and if I could just get the event-model understood in VPython, I would have a working demo in short order, but that has been driving me up the wall because the paradigm between my "python self" and my "vpython self" is currently dissociated for reasons I've been alluding to. Anyway, you don't need to break time away from vpython development, but I do think it would re-vamp the web out of its current suburbia and re-ignite the creative economy. Thanks for your time, MarkJ Gothenburg, Nebraska |
From: Bruce S. <Bru...@nc...> - 2012-10-21 00:23:24
|
I can correct the history. David Scherer created VPython in the spring of 2000 while a sophomore at Carnegie Mellon. The year before, he had taken intro physics from Ruth Chabay and me (see matterandinteractions.org), in which we had students write programs in the 2D programming language cT I had created. Scherer proposed a much improved 3D programming environment which, amid lots of discussion with Chabay and me, he implemented. Soon it became evident that a significant stumbling block was the fact that in Python, as in so many languages (but not JavaScript) 1/2 was 0, not 0.5. This caused lots of trouble for our physics students, so I proposed to the Python community that 1/2 be 0.5 instead of 0. That was a trigger for lots of debate among Python developers, who eventually found that they had their own reasons for making the change. There has never been a "VPython development community". in 2001 Scherer went off and founded a successful business. In 2002 I moved to North Carolina State University, where an undergraduate student, Jonathan Brandmeyer, got interested and made large contributions to the further development and maintenance of VPython until he graduated. In 2008 VPython needed significant work, and quite fortuitously Scherer, between building companies, volunteered to work again on VPython, and for about a year we collaborated on what became VPython 5.0 before he started a second company. All during these 12 years I have been involved in development and maintenance, and for the past 4 years I've been the only major developer. (From time to time various people have contributed in important but relatively small-scale ways.) So the "VPython development community" has fluctuated between 1 and 2 people, and this infinitesimal group never "receded from the python-dev community", of which it was never a part. As for "VPython attracts young programmers", I've been disappointed that Brandmeyer was the only new person, young or old, to get deeply involved with VPython development after its creation. I don't understand your pessimism, that one must abandon multiplatform or speed or API. I would certainly like to see higher Python execution speed, and I realize there are efforts under way. The new VPython will certainly continue to be multiplatform, with the same API except for rate being obligatory rather than optional. As for a unified operating environment, I'll point to GlowScript (glowscript.org), which is very similar to VPython but runs in a browser. It is based on Javascript (or optionally CoffeeScript) and uses in place of OpenGL (used by VPython) the similar 3D graphics library WebGL, which is part of current browsers. GlowScript now has capabilities roughly comparable to VPython. Not coincidentally, it has been built by David Scherer and me, though Scherer has not been able to work on it for some months, being deeply involved in his new company (foundationdb.com). It has been a great joy to work in an environment where thanks to being browser-based it was truly trivial for GlowScript to work automatically on Windows, Mac, and Linux. There was a recent event quite parallel to the 1/2 = 0.5 issue. In JavaScript you cube a value x by writing Math.pow(x,3). Yuck. The CoffeeScript developers had been considering whether to implement x**3, and the additional arguments I presented pushed them over the edge. There is a new CoffeeScript compiler to be released soon, CoffeeScript Redux, which implements x**3. Here is a link to that discussion: https://github.com/jashkenas/coffee-script/pull/2026 Bruce Sherwood |
From: Mark A. <dre...@gm...> - 2012-10-20 23:33:22
|
On Fri, Oct 19, 2012 at 11:03 PM, Bruce Sherwood <Bru...@nc...> wrote: > I'm curious: I don't know what you're referring to when you say that > the problem is Guido not accepting "visual as part of the standard > library". What old debate are you referring to? (Incidentally, Guido > has always said nice things to me about visual.) I'll try to look it up, but is was about float division. It seems trivial but I remember afterwards how a whole segment of the python community seem to disappear. That is, before the faction VPython and Python were in the same group, but afterwards VPython receded from the python-dev community. > I agree that making visual a part of the standard library would make > sense. But the problem I'm trying to address wouldn't have been helped > by visual being in the standard library -- there would still be the > serious Carbon/Cocoa problem to be solved. Yes, but I think the way VPython attracts young programmers, that there would be a whole support network. > Incidentally, you might be mildly amused by the "fancy footwork" I > alluded to. Briefly, when the user program invokes the visual module, > I set up the interact loop (Cocoa on the Mac), then I import the > user's program! This makes Cocoa the primary thread (and only thread), > which is a requirement of Cocoa. This also means that any user > statements preceding the visual import will be executed twice, which > is unlikely to be a problem (and can be documented), and no statements > in the visual module will be executed twice because once a module is > imported in a session, executable statements are not re-executed by a > later import in the same session. Thanks, that is interesting. I have been debating some of the abstract parts of these issues in the thread on event loops and asynchronous support in Python (happening recently in the python-ideas list with Guido). I think one of these has to be given up [multi-platform, speed, abstracted (uniform) API] -- at least until there's a unified pythonOS that is also a WebOS... Mark |
From: liming x. <lm...@gm...> - 2012-10-20 21:18:37
|
Dear All: My name is Liming Xiu. I am a professional in the field of VLSI circuit design. I am the inventor of an important frequency synthesis architecture: Flying-Adder frequency synthesis architecture. You can google seach this technology by using key word “Flying-Adder frequency synthesis architecture” or “Flying-Adder frequency PLL”. This invention is summarized in my newly published book: “Nanometer Frequency Synthesis beyond the Phase Locked Loop” http://www.wiley.com/WileyCDA/Section/id-WILEY2_SEARCH_RESULT.html?query=xiu One of the key components in this technology is the Flying-Adder circuit. Although this circuit was invented in later 1990 and has been used in commercial products for over a decade and generates over one billion dollar revenue, the circuit itself is not familiar to many circuit designers. The key reason is that this circuit is very complex, it is hard to be understood. Thus, I want to use VPython to illustrate the working principle of this circuit so that designers can see the working of this circuit visually. I have decent programming experience in C and Perl, but not in Object Oriented Program such as Python and VPython. In the past few months, I have studied the Python and VPython by reading books and studying examples. But when I start to model this Flying-Adder circuit, I am feeling the pain now :-) I wonder if anyone in this mail list could help me on this project? This project is to model a real circuit that has been used in numerous commercial VLSI chips. The details can be found in chapter four of the above mentioned book. This project is a 2D programming. Thus, it should be a simple case for people who are familiar with VPython. If you are willing to help me, I will not ask too much time from you. May be ~ 30 minutes every a few days. The circuit will be explained step by step and the code will be constructed step by step, accordingly. Please send me email, lm...@gm..., if you are interested in helping me. Thanks in advance Liming Xiu By the way, below is the code that is built by Bruce Sherwood for me (thanks, Bruce). It is the very first part of this project. ------------------------------------------------------------------------------------ from __future__ import division from visual import * N = 8 # fov = field of view; small fov means camera far from scene display(width=1200, height=640, range=8, fov=0.01, title='Flying-Adder Syntheszier Input Signals', background=color.gray(0.5) ) pulses = [] k = 5 T = 2*pi/k dx = T/N colors = [color.red, color.green, color.blue, color.yellow, color.cyan, color.magenta,color.orange, color.white] for i in range(N): pulses.append(curve( x = arange(-10,10,0.01),radius=0.04,color=colors[i])) # multiply by 0.99 to guard against possible ceil glitch; -0.25 to center the pulse vertically pulses[i].y = 0.5*ceil(0.99*sin( k*(pulses[i].x+i*dx)))+N/2-i*N/8-0.75 t = 0 dt = T/800 while True: rate(200) for p in pulses: p.x += dt t += dt if t >= T: t = 0 for p in pulses: p.x -= T |
From: Bruce S. <Bru...@nc...> - 2012-10-19 17:00:37
|
I leave this extension to you. You've already structured your program appropriately by starting to create a list of displays. Just create all 8 displays, and in the animation loop loop over these displays to update all 8 pulse trains (displaced as you say). Bruce Sherwood On Fri, Oct 19, 2012 at 10:35 AM, liming xiu <lm...@gm...> wrote: > Dear Bruce: > > Thanks. It looks great! > > Can I ask you one more favor: > > I want to create 8 of these clock pulse trains, from screen top to > bottom ( the screen can be made bigger). > > 1. All the 8 pulse trains have save frequency (same T). > 2. Time-wise, each pulse trains is delayed from its previous one by > (1/8)T. In other words, the second one is (1/8)T behind the first one, > the third one is (1/8)T behind the second one. > 3. They all move from left to right. > > Can you help me on this? > > Thanks in advance! > > > > > > On Fri, Oct 19, 2012 at 11:14 AM, Bruce Sherwood > <Bru...@nc...> wrote: >> That's a clever way to make a pulse train; I wouldn't have thought of >> using the math ceil function. Here's one way to animate the pulse >> train, moving to the right. I set the range to 9 so that the pulses >> fill the screen. I move the display's center to the left until one >> period has elapsed, when I reset the center to the origin: >> >> from visual import * >> >> g = [] >> g.append(display(x = 0, y = 100, width=1000, height=400, range=9)) >> >> g[0].title="Second try" >> >> k = 5 >> T = 2*pi/k >> c = curve( x = arange(-10,10,0.01), >> display=g[0],radius=0.07,color=color.yellow ) # Draw a pulse train >> c.y = ceil(sin( k*c.x )) >> >> t = 0 >> dt = T/20 >> while True: >> rate(100) >> g[0].center.x -= dt >> t += dt >> if t >= T: >> g[0].center.x = 0 >> t = 0 >> >> You might wish to disable userspin and userzoom to prevent the viewer >> from messing up the display. >> >> Just in case you hadn't noticed it, I'll comment that in your original >> program you don't need a loop at the end to keep the display alive. >> When you come to the end of a VPython program, the display remains on >> the screen and you can zoom and rotate. >> >> Bruce Sherwood >> >> On Fri, Oct 19, 2012 at 9:39 AM, liming xiu <lm...@gm...> wrote: >>> Hi, >>> >>> I am new to VPython. I want to use this tool to do a project for my work. >>> >>> I create a clock pulse train using the few lines below. >>> >>> ---------------------------------------------------- >>> from visual import * >>> >>> g = [] >>> g.append(display(x = 0, y = 100, width=1000, height=400)) >>> >>> g[0].title="First try" >>> >>> c = curve( x = arange(-10,10,0.01), >>> display=g[0],radius=0.07,color=color.yellow ) # Draw a helix >>> c.y = ceil(sin( 5.0*c.x )) >>> >>> while True: >>> rate(5) |
From: Bruce S. <Bru...@nc...> - 2012-10-19 16:56:26
|
Some time ago I mentioned my intention to build a version of VPython that uses wxPython to create the window, establish an OpenGL context in that window, and handle keyboard and mouse events. This would make it possible to discard the existing three platform-specific C++ components for dealing with these tasks (Windows, Macintosh, Linux), because wxPython, based on wxWidgets, is platform-independent. The need for this is somewhat urgent, because the Mac version of VPython is based on the Carbon framework, which is no longer fully supported. In particular, Carbon cannot be used with 64-bit applications (one must use Cocoa), which means that at the moment it is impossible to build a native-Mac (not Unix) version of VPython for the Mac that can run with a 64-bit version of Python, and until very recently there seemed to be no way to base VPython on Cocoa, for technical reasons (see below). I'm pleased to say that I've managed to get a basic wxPython-based version to work, with the platform-specific C++ components replaced by pure Python code. There are many remaining details to deal with, but I'm able to display an animation, and to rotate and zoom the scene. Progress. Looking ahead, here are some comments about what a wxPython-based version of VPython will look like. First, it is likely that all animations will have to contain a rate or sleep statement. This is due to a very technical issue. Cocoa requires that Cocoa itself be the primary thread, whereas the current VPython makes Carbon be the secondary thread. To turn this architecture inside-out required some fancy footwork, and the summary statement is that the visual module and your user code are likely to be in a single thread, with no multithreading. This simplifies the VPython architecture, but requires the user to use rate (or sleep) to allow VPython to render the scene periodically. Without a rate statement in an animation loop, nothing will appear on the screen until you exit the loop, and then you'll see only the final state of the display. I judge that the need for rate isn't serious, because almost all animations necessarily contain a rate statement anyway, to make the animation run at a roughly machine-independent speed. Experience with GlowScript (glowscript.org), which also requires use of rate (because JavaScript doesn't have threads), suggests that requiring a rate statement isn't a significant burden. Second, it should be possible to place a 3D animation anywhere in the window, place other wxPython widgets in the same window (e.g. buttons, sliders, text, etc.), and create normal pull-down menus for the window. This suggests that VPython should have two new objects, a "window" object (to hold menus and the various widgets), and a "canvas" object (to provide the OpenGL context for the 3D animations. The existing VPython "display" object would remain as a device that creates a "window" object and places a "canvas" in the window in such a way as to fill the window, as is the case currently. Third, there currently does not exist a version of wxPython for Python 3.x, just 2.x, but on May 24, 2012, there was news that this is forthcoming: http://www.blog.pythonlibrary.org/2012/05/24/wxpython-for-python-3-is-almost-here/ Fourth, presumably the new VPython will have the version number 6.00, to emphasize a change in the definition of VPython, namely the necessity to use rate in animations. Bruce Sherwood |
From: liming x. <lm...@gm...> - 2012-10-19 16:35:22
|
Dear Bruce: Thanks. It looks great! Can I ask you one more favor: I want to create 8 of these clock pulse trains, from screen top to bottom ( the screen can be made bigger). 1. All the 8 pulse trains have save frequency (same T). 2. Time-wise, each pulse trains is delayed from its previous one by (1/8)T. In other words, the second one is (1/8)T behind the first one, the third one is (1/8)T behind the second one. 3. They all move from left to right. Can you help me on this? Thanks in advance! On Fri, Oct 19, 2012 at 11:14 AM, Bruce Sherwood <Bru...@nc...> wrote: > That's a clever way to make a pulse train; I wouldn't have thought of > using the math ceil function. Here's one way to animate the pulse > train, moving to the right. I set the range to 9 so that the pulses > fill the screen. I move the display's center to the left until one > period has elapsed, when I reset the center to the origin: > > from visual import * > > g = [] > g.append(display(x = 0, y = 100, width=1000, height=400, range=9)) > > g[0].title="Second try" > > k = 5 > T = 2*pi/k > c = curve( x = arange(-10,10,0.01), > display=g[0],radius=0.07,color=color.yellow ) # Draw a pulse train > c.y = ceil(sin( k*c.x )) > > t = 0 > dt = T/20 > while True: > rate(100) > g[0].center.x -= dt > t += dt > if t >= T: > g[0].center.x = 0 > t = 0 > > You might wish to disable userspin and userzoom to prevent the viewer > from messing up the display. > > Just in case you hadn't noticed it, I'll comment that in your original > program you don't need a loop at the end to keep the display alive. > When you come to the end of a VPython program, the display remains on > the screen and you can zoom and rotate. > > Bruce Sherwood > > On Fri, Oct 19, 2012 at 9:39 AM, liming xiu <lm...@gm...> wrote: >> Hi, >> >> I am new to VPython. I want to use this tool to do a project for my work. >> >> I create a clock pulse train using the few lines below. >> >> ---------------------------------------------------- >> from visual import * >> >> g = [] >> g.append(display(x = 0, y = 100, width=1000, height=400)) >> >> g[0].title="First try" >> >> c = curve( x = arange(-10,10,0.01), >> display=g[0],radius=0.07,color=color.yellow ) # Draw a helix >> c.y = ceil(sin( 5.0*c.x )) >> >> while True: >> rate(5) |
From: Bruce S. <Bru...@nc...> - 2012-10-19 16:14:36
|
That's a clever way to make a pulse train; I wouldn't have thought of using the math ceil function. Here's one way to animate the pulse train, moving to the right. I set the range to 9 so that the pulses fill the screen. I move the display's center to the left until one period has elapsed, when I reset the center to the origin: from visual import * g = [] g.append(display(x = 0, y = 100, width=1000, height=400, range=9)) g[0].title="Second try" k = 5 T = 2*pi/k c = curve( x = arange(-10,10,0.01), display=g[0],radius=0.07,color=color.yellow ) # Draw a pulse train c.y = ceil(sin( k*c.x )) t = 0 dt = T/20 while True: rate(100) g[0].center.x -= dt t += dt if t >= T: g[0].center.x = 0 t = 0 You might wish to disable userspin and userzoom to prevent the viewer from messing up the display. Just in case you hadn't noticed it, I'll comment that in your original program you don't need a loop at the end to keep the display alive. When you come to the end of a VPython program, the display remains on the screen and you can zoom and rotate. Bruce Sherwood On Fri, Oct 19, 2012 at 9:39 AM, liming xiu <lm...@gm...> wrote: > Hi, > > I am new to VPython. I want to use this tool to do a project for my work. > > I create a clock pulse train using the few lines below. > > ---------------------------------------------------- > from visual import * > > g = [] > g.append(display(x = 0, y = 100, width=1000, height=400)) > > g[0].title="First try" > > c = curve( x = arange(-10,10,0.01), > display=g[0],radius=0.07,color=color.yellow ) # Draw a helix > c.y = ceil(sin( 5.0*c.x )) > > while True: > rate(5) |
From: liming x. <lm...@gm...> - 2012-10-19 15:39:59
|
Hi, I am new to VPython. I want to use this tool to do a project for my work. I create a clock pulse train using the few lines below. ---------------------------------------------------- from visual import * g = [] g.append(display(x = 0, y = 100, width=1000, height=400)) g[0].title="First try" c = curve( x = arange(-10,10,0.01), display=g[0],radius=0.07,color=color.yellow ) # Draw a helix c.y = ceil(sin( 5.0*c.x )) while True: rate(5) ----------------------------------------------------- Now I want to make the pulse train moving, from left to right, continuously. The points disapper from the right, then emerge from the left, ... Can someone help me? Thanks in advance. |
From: Kevin K. <ka...@so...> - 2012-10-17 16:38:23
|
Although I don't have a Windows machine, and so can't check that the executables are functional, they are certainly accessible from the links at http://www.lfd.uci.edu/~gohlke/pythonlibs/#vpython If you are having trouble with the downloads from there, the problem is most likely at your end, and getting yet another link is not likely to help you much. |
From: Osemeka O. <aba...@gm...> - 2012-10-17 06:20:42
|
Hi Bruce and Gary, Thanks for replying. The links in your replies, however, are basically the same on the vpython website and they all give me the same results--> Using Opera: Connection closed by remote server Check that the address is spelled correctly, or try searching for the site. Using Google Chrome: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. It was also unsuccessful using internet explorer. It seems that link is the only way to get those files. could someone please upload it to a file sharing site (like mediafire for instance) so I could get to it? would that be okay? Thanks Abasiemeka On Tue, Oct 16, 2012 at 3:44 PM, Bruce Sherwood <Bru...@nc...> wrote: > The link on the vpython.org Windows download page works for me. It's > basically the same as http://www.lfd.uci.edu/~gohlke/pythonlibs/, but > in the form http://www.lfd.uci.edu/~gohlke/pythonlibs/#vpython which > takes you directly to the VPython installers. > > Bruce Sherwood > > On Tue, Oct 16, 2012 at 3:47 AM, gary ruben <gr...@bi...> wrote: >> Wow, I hadn't realised Christoph had successfully built VPython for >> 64bit Windows until I read this, so a big thanks as I've been unable >> to run VPython for a couple of years. Here are his packages and >> VPython works well: >> http://www.lfd.uci.edu/~gohlke/pythonlibs/ >> >> Gary R >> >> On 16 October 2012 19:26, Osemeka Osuagwu <aba...@gm...> wrote: >>> Hello all, >>> Please is there a standalone installer for vpython for 64bit windows >>> 7? I've not been able to start using vpython because I cant even get >>> it on my system. The link on the Vpython website to Christopher >>> Gohlke's 64bit package is broken. Please assist me. >>> >>> --Abasiemeka >>> >>> ------------------------------------------------------------------------------ >>> Don't let slow site performance ruin your business. Deploy New Relic APM >>> Deploy New Relic app performance management and know exactly >>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>> http://p.sf.net/sfu/newrelic-dev2dev >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2012-10-16 14:44:50
|
The link on the vpython.org Windows download page works for me. It's basically the same as http://www.lfd.uci.edu/~gohlke/pythonlibs/, but in the form http://www.lfd.uci.edu/~gohlke/pythonlibs/#vpython which takes you directly to the VPython installers. Bruce Sherwood On Tue, Oct 16, 2012 at 3:47 AM, gary ruben <gr...@bi...> wrote: > Wow, I hadn't realised Christoph had successfully built VPython for > 64bit Windows until I read this, so a big thanks as I've been unable > to run VPython for a couple of years. Here are his packages and > VPython works well: > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > Gary R > > On 16 October 2012 19:26, Osemeka Osuagwu <aba...@gm...> wrote: >> Hello all, >> Please is there a standalone installer for vpython for 64bit windows >> 7? I've not been able to start using vpython because I cant even get >> it on my system. The link on the Vpython website to Christopher >> Gohlke's 64bit package is broken. Please assist me. >> >> --Abasiemeka >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: gary r. <gr...@bi...> - 2012-10-16 09:47:40
|
Wow, I hadn't realised Christoph had successfully built VPython for 64bit Windows until I read this, so a big thanks as I've been unable to run VPython for a couple of years. Here are his packages and VPython works well: http://www.lfd.uci.edu/~gohlke/pythonlibs/ Gary R On 16 October 2012 19:26, Osemeka Osuagwu <aba...@gm...> wrote: > Hello all, > Please is there a standalone installer for vpython for 64bit windows > 7? I've not been able to start using vpython because I cant even get > it on my system. The link on the Vpython website to Christopher > Gohlke's 64bit package is broken. Please assist me. > > --Abasiemeka > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Osemeka O. <aba...@gm...> - 2012-10-16 08:26:34
|
Hello all, Please is there a standalone installer for vpython for 64bit windows 7? I've not been able to start using vpython because I cant even get it on my system. The link on the Vpython website to Christopher Gohlke's 64bit package is broken. Please assist me. --Abasiemeka |
From: Poul R. <Pou...@sk...> - 2012-10-14 20:14:50
|
Oh, yes, I'm sorry, I missed a 'g' in gcurve! Poul Riis from time import * from math import * import visual.graph as visualgraph spiralgraph=visualgraph.gdisplay(title='Spiral', ytitle='x', xtitle='y', x=0, y=0, width=800, height=800, foreground=visualgraph.color.black, background=visualgraph.color.white) spiralplot = visualgraph.curve(color=visualgraph.color.red,display=spiralgraph) spiralplot.plot(pos=(-15,-15)) spiralplot.plot(pos=(15,-15)) spiralplot.plot(pos=(15,15)) spiralplot.plot(pos=(-15,15)) spiralplot.plot(pos=(-15,-15)) for i in range(0,3600): t=pi*i/360 x=t*cos(t) y=t*sin(t) spiralplot.plot(pos=(x,y)) sleep(0.001) |
From: Bruce S. <Bru...@nc...> - 2012-10-14 20:12:17
|
What did you change? That is, what do you mean by "now"? Presumably you didn't get such a very strange message before making some change. Maybe you need to reinstall visual? Bruce Sherwood On Sun, Oct 14, 2012 at 12:32 PM, Poul Riis <Pou...@sk...> wrote: > Even worse now: > > Running the program below now results in the following error message: > > Traceback (most recent call last): > File "C:\pr\python\spiral.py", line 11 > spiralplot = > visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph) > File "C:\Python32\lib\site-packages\vis\primitives.py", line 82, in > __init__ > if not _other: self.init_defaults(keywords) > File "C:\Python32\lib\site-packages\vis\primitives.py", line 175, in > init_defaults > self.material = self.display.material > AttributeError: 'gdisplay' object has no attribute 'material' > > > > > > import visual.graph as visualgraph > from time import * > from math import * > > spiralgraph=visualgraph.gdisplay(title='Spiral', ytitle='x', xtitle='y', > x=0, y=0, > width=800, height=800, > foreground=visualgraph.color.black, > background=visualgraph.color.white) > spiralplot = > visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph) > spiralplot.plot(pos=(-15,-15)) > spiralplot.plot(pos=(15,-15)) > spiralplot.plot(pos=(15,15)) > spiralplot.plot(pos=(-15,15)) > spiralplot.plot(pos=(-15,-15)) > for i in range(0,3600): > t=pi*i/360 > x=t*cos(t) > y=t*sin(t) > spiralplot.plot(pos=(x,y)) > sleep(0.001) > > > > > Poul Riis |
From: Poul R. <Pou...@sk...> - 2012-10-14 18:32:35
|
Even worse now: Running the program below now results in the following error message: Traceback (most recent call last): File "C:\pr\python\spiral.py", line 11 spiralplot = visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph) File "C:\Python32\lib\site-packages\vis\primitives.py", line 82, in __init__ if not _other: self.init_defaults(keywords) File "C:\Python32\lib\site-packages\vis\primitives.py", line 175, in init_defaults self.material = self.display.material AttributeError: 'gdisplay' object has no attribute 'material' import visual.graph as visualgraph from time import * from math import * spiralgraph=visualgraph.gdisplay(title='Spiral', ytitle='x', xtitle='y', x=0, y=0, width=800, height=800, foreground=visualgraph.color.black, background=visualgraph.color.white) spiralplot = visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph) spiralplot.plot(pos=(-15,-15)) spiralplot.plot(pos=(15,-15)) spiralplot.plot(pos=(15,15)) spiralplot.plot(pos=(-15,15)) spiralplot.plot(pos=(-15,-15)) for i in range(0,3600): t=pi*i/360 x=t*cos(t) y=t*sin(t) spiralplot.plot(pos=(x,y)) sleep(0.001) Poul Riis |
From: Poul R. <Pou...@sk...> - 2012-10-14 14:22:10
|
This iss excellent - thank you! Best regards, Poul Riis Bru...@nc... writes: >from __future__ import division, print_function >from visual import * >scene.title = 'Spiral' >scene.width = scene.height = 800 >scene.background = color.white >scene.foreground = color.black >scale = 1 >xaxis = curve(pos=[(-scale,0),(scale,0)], color=color.gray(.5)) >yaxis = curve(pos=[(0,-scale),(0,scale)], color=color.gray(.5)) >xlabel = label(pos=(0.95*scale,-0.05*scale), text='x', box=0) >ylabel = label(pos=(0.05*scale,0.95*scale), text='y', box=0) > >p = points(color=color.blue) >kr = 1 >kt = 1 >t = 0 >dt = pi/360 >while True: >rate(1000) >r = kr*t >theta = kt*t >x = r*cos(theta) >y = r*sin(theta) >t += dt >m = max([x,y]) >if m > scale: >scale = 1.05*m >xlabel.pos = (0.95*scale,-0.05*scale) >ylabel.pos = (0.05*scale,0.95*scale) >xaxis.pos = [(-scale,0),(scale,0)] >yaxis.pos = [(0,-scale),(0,scale)] >p.append(pos=(x,y)) |
From: Bruce S. <Bru...@nc...> - 2012-10-13 22:59:41
|
The easiest way to achieve autoscaling with x and y scales equal is to not use graphing. Here is the basic idea: from __future__ import division, print_function from visual import * scene.title = 'Spiral' scene.width = scene.height = 800 scene.background = color.white scene.foreground = color.black scale = 1 xaxis = curve(pos=[(-scale,0),(scale,0)], color=color.gray(.5)) yaxis = curve(pos=[(0,-scale),(0,scale)], color=color.gray(.5)) xlabel = label(pos=(0.95*scale,-0.05*scale), text='x', box=0) ylabel = label(pos=(0.05*scale,0.95*scale), text='y', box=0) p = points(color=color.blue) kr = 1 kt = 1 t = 0 dt = pi/360 while True: rate(1000) r = kr*t theta = kt*t x = r*cos(theta) y = r*sin(theta) t += dt m = max([x,y]) if m > scale: scale = 1.05*m xlabel.pos = (0.95*scale,-0.05*scale) ylabel.pos = (0.05*scale,0.95*scale) xaxis.pos = [(-scale,0),(scale,0)] yaxis.pos = [(0,-scale),(0,scale)] p.append(pos=(x,y)) You could also include in the x and y labels the value of "scale". Bruce Sherwood |