| |
- acos(...)
- acos(x)
Return the arc cosine (measured in radians) of x.
- arange(...)
- arange(start, stop=None, step=1, typecode=None)
Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
- array(...)
- array(sequence, typecode=None, copy=1, savespace=0) will return a new array formed from the given (potentially nested) sequence with type given by typecode. If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence. If copy is zero and sequence is already an array, a reference will be returned. If savespace is nonzero, the new array will maintain its precision in operations.
- arrayrange = arange(...)
- arange(start, stop=None, step=1, typecode=None)
Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
- asin(...)
- asin(x)
Return the arc sine (measured in radians) of x.
- atan(...)
- atan(x)
Return the arc tangent (measured in radians) of x.
- atan2(...)
- atan2(y, x)
Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.
- choose(...)
- choose(a, (b1,b2,...))
- comp(...)
- The scalar projection of arg1 to arg2.
C++ signature:
comp(visual::vector, visual::vector) -> double
- cross(...)
- C++ signature:
cross(boost::python::numeric::array, boost::python::numeric::array) -> boost::python::numeric::array
C++ signature:
cross(boost::python::numeric::array, visual::vector) -> boost::python::numeric::array
C++ signature:
cross(visual::vector, boost::python::numeric::array) -> boost::python::numeric::array
The cross product between two vectors.
C++ signature:
cross(visual::vector, visual::vector) -> visual::vector
- cross_correlate(...)
- cross_correlate(a,v, mode=0)
- degrees(...)
- degrees(x) -> converts angle x from radians to degrees
- diff_angle(...)
- The angle between two vectors, in radians.
C++ signature:
diff_angle(visual::vector, visual::vector) -> double
- draw_spheres(rgbs, radius=10)
- rgbs is a dictionary that maps from an rgb tuple to a
list of color names. rgb values are in the range 0-255.
draws one sphere for each rgb tuple with the given radius,
and returns a list of sphere objects.
the sphere objects have the color names as an attribute.
- empty(...)
- empty((d1,...,dn),typecode='l',savespace=0) will return a new array
of shape (d1,...,dn) and given type with all its entries uninitialized. If savespace is
nonzero, the array will be a spacesaver array. This can be faster than zeros.
- find_biggest_hole(spheres)
- of the web safe colors, find the one whose nearest neighbor
is the farthest. the answer is (51, 51, 255) or #3333ff
which is a nive shade of blue that deserves a name.
- find_closest_sphere(m, spheres)
- given the mouse information in (m), find the closest
sphere that is intersected by the line from the camera
to the mouse click.
- find_nearest_neighbor(s, spheres)
- of the objects in (spheres) find the one closest to s
and return a tuple (distance, closest_object)
- frexp(...)
- frexp(x)
Return the mantissa and exponent of x, as pair (m, e).
m is a float and e is an int, such that x = m * 2.**e.
If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0.
- fromstring(...)
- fromstring(string, typecode='l', count=-1) returns a new 1d array initialized from the raw binary data in string. If count is positive, the new array will have count elements, otherwise it's size is determined by the size of string.
- ldexp(...)
- ldexp(x, i) -> x * (2**i)
- mag(...)
- C++ signature:
mag(boost::python::numeric::array) -> boost::python::api::object
The magnitude of a vector.
C++ signature:
mag(visual::vector) -> double
- mag2(...)
- C++ signature:
mag2(boost::python::numeric::array) -> boost::python::api::object
A vector's magnitude squared.
C++ signature:
mag2(visual::vector) -> double
- main(script, *args)
- create the display and wait for user events
- modf(...)
- modf(x)
Return the fractional and integer parts of x. Both results carry the sign
of x. The integer part is returned as a real.
- norm(...)
- C++ signature:
norm(boost::python::numeric::array) -> boost::python::api::object
Returns the unit vector of its argument.
C++ signature:
norm(visual::vector) -> visual::vector
- pow(...)
- pow(x,y)
Return x**y (x to the power of y).
- proj(...)
- The vector projection of arg1 to arg2.
C++ signature:
proj(visual::vector, visual::vector) -> visual::vector
- radians(...)
- radians(x) -> converts angle x from degrees to radians
- rate(...)
- Pause animation execution for 1/arg seconds.
C++ signature:
rate(double) -> void*
- reshape(...)
- reshape(a, (d1, d2, ..., dn)). Change the shape of a to be an n-dimensional array with dimensions given by d1...dn. Note: the size specified for the new array must be exactly equal to the size of the old one or an error will occur.
- rotate(...)
- C++ signature:
rotate(visual::vector, double angle, visual::vector axis) -> visual::vector
rotate( vector, float angle, vector axis=vector(0,1,0)) -> vector
Rotate a vector about an axis through an angle.
C++ signature:
rotate(visual::vector, double angle) -> visual::vector
- searchsorted = binarysearch(...)
- binarysearch(a,v)
- set_size(spheres, factor=0.69999999999999996)
- for each sphere, find d, the distance to the nearest neighbor
and set radius = factor * d
- take(...)
- take(a, indices, axis=0). Selects the elements in indices from array a along the given axis.
- toggle_label(obj)
- add or remove the label from a color sphere
- zeros(...)
- zeros((d1,...,dn),typecode='l',savespace=0) will return a new array of shape (d1,...,dn) and type typecode with all it's entries initialized to zero. If savespace is nonzero the array will be a spacesaver array.
|