VPython Reference

From Physics Book
Revision as of 19:31, 5 December 2015 by Canain (talk | contribs) (Created page with "Created by Shuyang Chen VPython reference page for animation functions and constants. This page assumes and only includes basic usage of VPython. == VPython Template == <no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Created by Shuyang Chen

VPython reference page for animation functions and constants. This page assumes and only includes basic usage of VPython.

VPython Template

from __future__ import division
from visual import *

## Constants

## Initialization

## Loop
t = 0
deltat = 1e-10
end = 10

while t < end:
    rate(1000)
    ## Loop Code
    
    t += deltat

VPython Animation Functions

Sphere

Example

ball = sphere(pos=(1,2,3), radius=0.4, color=color.blue)

Parameters

Parameter Type Description
pos vector Position of the sphere
axis vector Orientation of the sphere
color color Color of the sphere
opacity number Opacity of the sphere
make_trail boolean Whether or not to leave behind a trail

A Mathematical Model

What are the mathematical equations that allow us to model this topic. For example [math]\displaystyle{ {\frac{d\vec{p}}{dt}}_{system} = \vec{F}_{net} }[/math] where p is the momentum of the system and F is the net force from the surroundings.

A Computational Model

How do we visualize or predict using this topic. Consider embedding some vpython code here Teach hands-on with GlowScript

Examples

Be sure to show all steps in your solution and include diagrams whenever possible

Simple

Middling

Difficult

Connectedness

  1. How is this topic connected to something that you are interested in?
  2. How is it connected to your major?
  3. Is there an interesting industrial application?

History

Put this idea in historical context. Give the reader the Who, What, When, Where, and Why.

See also

Are there related topics or categories in this wiki resource for the curious reader to explore? How does this topic fit into that context?

Further reading

Books, Articles or other print media on this topic

External links

[1]


References

This section contains the the references you used while writing this page