VPython

VPython

Infobox programming language
name =Visual (Python Mod)

paradigm = Multi-paradigm
year = 2000
designer = David Scherer
developer = Open-Source
latest_release_version = See vpython.org
latest_release_date = [Recent Developments]
typing = Strong, dynamic ("duck")
implementations = cPython
dialects =
influenced_by = Python
influenced =
operating_system = Cross-platform
license = Open-Source
website = [http://www.vpython.org www.vpython.org]

VPython was created in 2000 as the result of an independent project undertaken by David Scherer, a sophomore at Carnegie Mellon University.VPython is the Python programming language plus a 3D graphics module called Visual. VPython allows users to create objects such as spheres and cones in 3D space and displays these objects in a window. Real-time, navigable 3D animations are generated as a side effect of computations. This makes it easy to create simple visualizations, allowing programmers to focus more on the computational aspect of their programs. The simplicity of VPython has made it a tool for the illustration of simple physics, especially in the educational environment.

History

In 1985, the cT programming language was created by researchers at Carnegie Mellon University in Pittsburgh. Contributors to the project included David Andersen, Bruce Sherwood, Judith Sherwood, and Kevin Whitley. The cT programming language was largely spawned from the TUTOR (1965) and the MicroTutor (1977) programming languages. Although cT had many applications, its primary usage was 2D graphics for the classroom setting. It was especially well suited for physics. In 1997, students at Carnegie Mellon were taught cT in a new introductory physics [http://www4.ncsu.edu/~rwchabay/mi course] created by Ruth Chabay and Bruce Sherwood. In 1998, David Scherer entered the university as a freshman and enrolled in one of the introductory physics classes that used cT. Although cT offered a relatively easy 2D graphics programming environment, Scherer saw the possibility of creating an even better tool. In the spring and summer of 2000, with the assistance of David Andersen, Ruth Chabay, Ari Heitner, Ian Peters, and Bruce Sherwood, Scherer created Visual, a module for Python that was not only easier to use than the cT programming language, but also rendered objects in Three Dimensions. The combination of Python plus Visual is called VPython. Further development of the cT programming language was ended and the newly created VPython was used in its place. Since VPython's creation, several versions have been released to the public. The current version in development is 4.beta15. Some of the major developments in this release include textures and transparency. More details on features currently in development may be seen [http://www.vpython.org/webdoc/texture-opacity-lighting.htm here] .

Usage

VPython is a simple rendering tool for 3D objects and graphs. Its main use has been in education, but it has also been used in commercial or research settings. VPython was first used in introductory physics courses at Carnegie Mellon and then spread to other universities and eventually high schools, especially in connection with the [http://www4.ncsu.edu/~rwchabay/mi Matter & Interactions curriculum] .

Objects

See the article on Python for Python syntax. This article will address several of the objects that are VPython specific. Click [http://www.vpython.org/webdoc/index.html here] for the complete documentation. The cylinder object is a good example of a simple VPython object. Here is an example of a simple cylinder as given in VPython's documentation:

from visual import * #import the visual module

rod = cylinder(pos=(0,2,1), axis=(5,0,0), radius=1)

Some similar objects offered by the VPython 3D rendering engine are the [http://www.vpython.org/webdoc/visual/cone.html cone] , [http://www.vpython.org/webdoc/visual/sphere.html sphere] , and [http://www.vpython.org/webdoc/visual/box.html box] objects. In addition to solid objects, VPython offers graphing tools as well. Here is an example of a simple graph in VPython as given in its documentation:

from visual.graph import * # import graphing features funct1 = gcurve(color=color.cyan) # a connected curve object for x in arange(0., 8.1, 0.1): # x goes from 0 to 8 funct1.plot(pos=(x,5.*cos(2.*x)*exp(-0.2*x))) # plot

References

*http://www.vpython.org/
*http://www.vpython.org/cTsource/cToverview.html
*http://wiki.python.org/moin/VPython

*Scherer, D., Dubois, P., & Sherwood, B. (2000). VPython: 3D Interactive Scientific Graphics for Students, Computing in Science and Engineering, Sept./Oct. 2000, 82-88.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Langage Python — Python (langage) Pour les articles homonymes, voir Python. Python …   Wikipédia en Français

  • Langage de programmation Python — Python (langage) Pour les articles homonymes, voir Python. Python …   Wikipédia en Français

  • Langage python — Python (langage) Pour les articles homonymes, voir Python. Python …   Wikipédia en Français

  • Python (langage) — Pour les articles homonymes, voir Python. Python …   Wikipédia en Français

  • Python (programming language) — Python (langage) Pour les articles homonymes, voir Python. Python …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”