|
def | __init__ (self, I, F) |
|
def | Dx (self) |
|
def | Dy (self) |
|
def | is_horizontal (self) |
|
def | is_vertical (self) |
|
def | slope (self) |
|
def | length (self) |
|
def | fix_visual_size (self, l, xunit=None, yunit=None, pspict=None) |
|
def | exact_length (self) |
|
def | angle (self) |
|
def | numerical_approx (self) |
|
def | orthogonal (self) |
|
def | rotation (self, angle) |
|
def | projection (self, seg) |
|
def | decomposition (self, seg) |
| Return the decomposition of self into a v -component and a normal (to v) component. More...
|
|
def | inner_product (self, other) |
|
def | copy (self) |
|
def | translate (self, v) |
|
def | advised_mark_angle (self, pspict=None) |
|
def | midpoint (self, advised=True) |
|
def | fix_origin (self, P) |
|
def | normalize (self, l=1) |
|
def | __str__ (self) |
|
def | extend (self, other) |
| put the vector other on the end of self More...
|
|
def | __add__ (self, other) |
| add two vectors based on the same point. More...
|
|
def | __sub__ (self, other) |
|
def | __mul__ (self, coef) |
|
def | __rmul__ (self, coef) |
|
def | __div__ (self, coef) |
|
def | __neg__ (self) |
|
def | __eq__ (self, other) |
|
def | is_almost_equal (self, other) |
|
def | __ne__ (self, other) |
|
def | mark_point (self, pspict=None) |
|
def | tikz_code (self, pspict=None) |
|
def | latex_code (self, language=None, pspict=None) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__init__ |
( |
|
self, |
|
|
|
I, |
|
|
|
F |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__add__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
add two vectors based on the same point.
The function checks if the vectors self
and other
are based on the same point. Sometimes, it causes strange problems. When one of the coordinates has the form a=3.00000000000000*cos(0.111111111111111*pi) Checking equalities with that kind of numbers causes OverflowError: Python int too large to convert to C long
If you know that v1
and v2
have the same origin and want to sum them you can also do v1.extend(v2)
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__div__ |
( |
|
self, |
|
|
|
coef |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__eq__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__mul__ |
( |
|
self, |
|
|
|
coef |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__ne__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__neg__ |
( |
|
self | ) |
|
return -self.
That is an affine vector attached to the same point, but
with the opposite direction.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__rmul__ |
( |
|
self, |
|
|
|
coef |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__str__ |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.__sub__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph._bounding_box |
( |
|
self, |
|
|
|
pspict |
|
) |
| |
|
private |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.advised_mark_angle |
( |
|
self, |
|
|
|
pspict = None |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.angle |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.copy |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.decomposition |
( |
|
self, |
|
|
|
seg |
|
) |
| |
Return the decomposition of self
into a v
-component and a normal (to v) component.
INPUT:
v
- a segment or a vector
OUTPUT:
A tuple :
- the first element is the orthogonale component
- the second element is the parallel component
NOTE:
The result does not depend on v
, but only on the direction of v
.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.Dx |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.Dy |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.exact_length |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.extend |
( |
|
self, |
|
|
|
other |
|
) |
| |
put the vector other
on the end of self
This is the usual vector sum, but here we accept two vector that have not the same initial point.
- Returns
- a vector with same initial point as
self
.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.fix_origin |
( |
|
self, |
|
|
|
P |
|
) |
| |
Return the affine vector that is equal to 'self' but attached
to point P.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.fix_visual_size |
( |
|
self, |
|
|
|
l, |
|
|
|
xunit = None , |
|
|
|
yunit = None , |
|
|
|
pspict = None |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.inner_product |
( |
|
self, |
|
|
|
other |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.is_almost_equal |
( |
|
self, |
|
|
|
other |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.is_horizontal |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.is_vertical |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.latex_code |
( |
|
self, |
|
|
|
language = None , |
|
|
|
pspict = None |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.length |
( |
|
self | ) |
|
Return a numerical approximation of the length.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.mark_point |
( |
|
self, |
|
|
|
pspict = None |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.midpoint |
( |
|
self, |
|
|
|
advised = True |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.normalize |
( |
|
self, |
|
|
|
l = 1 |
|
) |
| |
Return a new affine vector with
- same starting point
- same direction (if 'l' is negative, change the direction)
- size l
By default, normalize to 1.
def phystricks.src.AffineVectorGraph.AffineVectorGraph.numerical_approx |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.orthogonal |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.projection |
( |
|
self, |
|
|
|
seg |
|
) |
| |
Return the projection of 'self' on the segment 'seg' (you can also
pass a vector).
def phystricks.src.AffineVectorGraph.AffineVectorGraph.rotation |
( |
|
self, |
|
|
|
angle |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.slope |
( |
|
self | ) |
|
def phystricks.src.AffineVectorGraph.AffineVectorGraph.tikz_code |
( |
|
self, |
|
|
|
pspict = None |
|
) |
| |
def phystricks.src.AffineVectorGraph.AffineVectorGraph.translate |
( |
|
self, |
|
|
|
v |
|
) |
| |
phystricks.src.AffineVectorGraph.AffineVectorGraph.F |
phystricks.src.AffineVectorGraph.AffineVectorGraph.I |
phystricks.src.AffineVectorGraph.AffineVectorGraph.segment |
The documentation for this class was generated from the following file: