From: Bruce S. <Bru...@nc...> - 2011-02-21 02:21:21
Attachments:
motor.jpg
|
At vpython.org are installers for VPython 5.50 which include a powerful new "extrusion" object developed by Kadir Haldenbilen and me. The basic idea is that you prepare a 2D shape which you then extrude along a path that is like the pos attribute of a curve object: extrusion(pos=...., shape=....) Libraries of common shapes and paths are provided (rectangle, circle, arc, star, etc.). Included are tools for creating complex gears, and shapes made from text. The 2D shape can be prepared using "constructive geometry" supported by the Polygon module (which is imported by VPython and included with the Windows and Mac installers). Polygon objects consist of closed contours (lists of points in the xy plane), and these objects can be combined. For example, if R is a Polygon object representing a rectangle, and C is a Polygon object representing a circle that lies within the boundary of the rectangle, then R-C is a 2D shape consisting of a rectangle with a hole in it, which can be extruded along a path by using the extrusion object. If the circle lies partly outside the rectangle, R-C is a rectangle with a portion of a circle cut out of the edge. The implementation of the extrusion object is quite fast and efficient, so that not only is it easy to create quite complex objects, but it is also feasible to make the object change dynamically by altering the path, the scale factors along the path, the amount of twist along the path, or even the extruded shape. After installing VPython 5.50, you are encouraged to run the new example program extrusion_overview.py which is an interactive tutorial on the extrusion object and also an interesting demonstration of the tutorial possibilities of VPython. Kadir Haldenbilen has contributed new example programs electric_motor.py (the program which produced the attached image), differential_gear.py, conch.py, medusa.py, and extruded_columns.py that illustrate some uses of the new extrusion object. He has also contributed some useful new materials: shiny, chrome, blazed, silver, bricks, ice, glass, and BlueMarble (earth with clouds), and the example program material_test.py has been revised to display all the materials now available. The text object now uses the extrusion object for its display, but the extrusion object does not make the text object obsolete, because the text object emphasizes text-related information such as line widths, etc. The shapes.text() routine supplies the necessary information to the text object, and this additional information can be used by you should you wish to do so. The curve object has been updated to permit using paths obtained from the new paths library. For the benefit of Linux users who might not have installed the Polygon, FontTools, and ttfquery modules that are needed by the 3D text object and by the new extrusion object, the imports have been rearranged in such a way that if you don’t have the necessary modules installed you can still run VPython, but without being able to use text and extrusion objects. A long-standing bug has been fixed in keyboard handling on the Mac, in which each keypress generated two events, the first one correct and the second one garbage. The tutorial program extrusion_overview.py made it clear that the default font height of 13 of label text was not actually consistent across Windows, Mac, and Linux. The text has been adjusted so that labels look quite similar on all platforms. Bruce Sherwood |
From: C A. R. <an...@ex...> - 2011-02-21 02:35:17
|
On Sun, Feb 20, 2011 at 8:21 PM, Bruce Sherwood <Bru...@nc...> wrote: > At vpython.org are installers for VPython 5.50 which include a > powerful new "extrusion" object developed by Kadir Haldenbilen and me. > The basic idea is that you prepare a 2D shape which you then extrude > along a path that is like the pos attribute of a curve object: > > extrusion(pos=...., shape=....) > > Libraries of common shapes and paths are provided (rectangle, circle, > arc, star, etc.). Included are tools for creating complex gears, and > shapes made from text. nice work, this is an incredibly useful addition. seems like you could almost crack out a full scale solid modeling app using vpython at this point ... anyways great job; though i don't get to play with it as much as i'd like currently, visual continuous to be one of my favorite projects. C Anthony |
From: Bruce S. <Bru...@nc...> - 2011-02-21 03:00:50
|
What's missing is 3D constructive geometry for Python. Kadir Haldenbilen identified the excellent Polygon module which does constructive geometry for 2D contours, which led to the text and extrusion objects which we developed together. But I gather there isn't an equivalent 3D package. An example of an application that does offer constructive 3D geometry (for example, subtract a sphere from a cube) is Pov-ray, but that's not something that runs in real time. Bruce Sherwood On Sun, Feb 20, 2011 at 7:35 PM, C Anthony Risinger <an...@ex...> wrote: > On Sun, Feb 20, 2011 at 8:21 PM, Bruce Sherwood <Bru...@nc...> wrote: >> At vpython.org are installers for VPython 5.50 which include a >> powerful new "extrusion" object developed by Kadir Haldenbilen and me. >> The basic idea is that you prepare a 2D shape which you then extrude >> along a path that is like the pos attribute of a curve object: >> >> extrusion(pos=...., shape=....) >> >> Libraries of common shapes and paths are provided (rectangle, circle, >> arc, star, etc.). Included are tools for creating complex gears, and >> shapes made from text. > > nice work, this is an incredibly useful addition. > > seems like you could almost crack out a full scale solid modeling app > using vpython at this point ... > > anyways great job; though i don't get to play with it as much as i'd > like currently, visual continuous to be one of my favorite projects. > > C Anthony > |
From: gary r. <gr...@bi...> - 2011-02-21 03:40:01
|
Another thing that's missing is support for 64 bit Windows. I'm not desperate for this myself as I'm currently not involved in teaching, but the fraction of 64 bit installations out there is only going to increase. Gary R. On Mon, Feb 21, 2011 at 2:00 PM, Bruce Sherwood <Bru...@nc...> wrote: > What's missing is 3D constructive geometry for Python. Kadir > Haldenbilen identified the excellent Polygon module which does > constructive geometry for 2D contours, which led to the text and > extrusion objects which we developed together. But I gather there > isn't an equivalent 3D package. An example of an application that does > offer constructive 3D geometry (for example, subtract a sphere from a > cube) is Pov-ray, but that's not something that runs in real time. > > Bruce Sherwood > > On Sun, Feb 20, 2011 at 7:35 PM, C Anthony Risinger <an...@ex...> wrote: >> On Sun, Feb 20, 2011 at 8:21 PM, Bruce Sherwood <Bru...@nc...> wrote: >>> At vpython.org are installers for VPython 5.50 which include a >>> powerful new "extrusion" object developed by Kadir Haldenbilen and me. >>> The basic idea is that you prepare a 2D shape which you then extrude >>> along a path that is like the pos attribute of a curve object: >>> >>> extrusion(pos=...., shape=....) >>> >>> Libraries of common shapes and paths are provided (rectangle, circle, >>> arc, star, etc.). Included are tools for creating complex gears, and >>> shapes made from text. >> >> nice work, this is an incredibly useful addition. >> >> seems like you could almost crack out a full scale solid modeling app >> using vpython at this point ... >> >> anyways great job; though i don't get to play with it as much as i'd >> like currently, visual continuous to be one of my favorite projects. >> >> C Anthony >> > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2011-02-21 03:55:57
|
It's true that support for 64-bit machines is relevant, not just on Windows but also on Mac and Linux. VPython programs run nicely as 32-bit programs on Windows, so it's not an urgent problem. Perhaps more of an issue is that people have had difficulties trying to build VPython from source on 64-bit Linux. But the really big scary menacing problem is the Mac. For important reasons, VPython uses the Carbon framework on the Mac (for creating a window and interacting with it). Carbon will not be available on 64-bit Macs, and Cocoa for major threading reasons poses a serious implementation challenge. Whether Apple goes completely to 64 bits, or Python becomes available for the Mac only as a 64-bit program, VPython as a pure Mac program is dead unless someone can figure out how to run it in the Cocoa environment. An out presumably is to retreat to what used to be the case, that VPython would run only within the X11 world on the Mac, not as a native-mode application. That's a problem, because many Mac users were very uncomfortable with that approach when we used it in the past. As far as teaching goes, a 64-bit version is almost completely irrelevant, given the relatively undemanding applications that are typically encountered in courses, at least until you get to very advanced classes. But those of us involved in the development of VPython have always had the desire to support other kinds of usage, especially research, and in fact there is a significant amount of use of VPython in the research community. Bruce Sherwood On Sun, Feb 20, 2011 at 8:36 PM, gary ruben <gar...@gm...> wrote: > Another thing that's missing is support for 64 bit Windows. I'm not > desperate for this myself as I'm currently not involved in teaching, > but the fraction of 64 bit installations out there is only going to > increase. > > Gary R. |
From: Dan A. <dal...@ea...> - 2011-07-20 02:56:41
|
Does vPython have a way to do a mouse over an object? I was looking for a method like in java where you know which object the mouse is over. May not be doable with a 3D display model. -d |
From: Bruce S. <Bru...@nc...> - 2011-07-20 03:21:08
|
There's nothing built-in. I suppose you could constantly interrogate scene.mouse.ray and figure out what was pointed at. Bruce Sherwood On Tue, Jul 19, 2011 at 8:55 PM, Dan Aldrich <dal...@ea...> wrote: > Does vPython have a way to do a mouse over an object? I was looking > for a method like in java where you know which object the mouse is > over. May not be doable with a 3D display model. > > -d > > > > ------------------------------------------------------------------------------ > 10 Tips for Better Web Security > Learn 10 ways to better secure your business today. Topics covered include: > Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, > security Microsoft Exchange, secure Instant Messaging, and much more. > http://www.accelacomm.com/jaw/sfnl/114/51426210/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |