PyGeo: a dynamic geometry toolkit

Position3

a 3 element vector representing a position in 3d space

Methods defined in Position3

f __init__(self) ...

filter out the non-numeric arguments of a derived class, and send the numeric arguments to the initialization of the vector parent class

f set(self, other) ...

set defining attributes of point to a given point

f polar(self) ...

return the polar coordinates of the point

f distance(self, other) ...

the distance between the point and a second point

f distanceSquared(self, other) ...

the square of the distance between the point and a second point

f homogenous(self) ...

a flat array representing the homogenous coordinates of the point

f transform(self, mat, point) ...

return the given point as 'self' transformed by a given a 4x4 transformation matrix

f onPlane(self, plane) ...

is point on a given plane?

f coPlanar(self, p1, p2, p3) ...

is point coplanar with 3 given points?

f coLinear(self, p1, p2) ...

is point colinear with 2 given points ?

f onLine(self, line) ...

is point on given line?

f toInterpolated(self, p1, p2, r) ...

set the position on a line connecting to given points, based on the interpolation by a given ratio of the distance between the given points

f to_3d(self, harray) ...

set position as the projection from given homogenous coordinates

f toXY(self, point) ...

set position as the origin centered projection of the given point to the plane parallel with the XY plane at unit distance

f fromXY(self, equat, point) ...

set position as the origin centered projection of the given point to the plane represented by the given 4 element array

f toLine(self, p1, p2) ...

move to foot of perpendicular from initial position of self to line connecting p1 & p2 arguments

f toPlane(self, plane) ...

move to foot of perpendicular from initial position of self to plane argument

f toCircle(self, circle) ...

move to point on the given circle's circumference closest to the foot of perpendicular from initial position of self to the circle's plane

f toSphere(self, sphere) ...

move to closest point on surface of sphere argument

f toCentroid(self, p1, p2, p3) ...

move to the centroid of the triangle defined by the 3 point arguments

f toOrthoCenter(self, p1, p2, p3) ...

move to the orthocenter of the triangle defined by the 3 point arguments

f toInCenter(self, p1, p2, p3) ...

move to the center of the circle inscribed in the triangle defined by the 3 point arguments

f toExCenter(self, p1, p2, p3) ...

move to the excenter of the circle exscribed in the triangle defined by the 3 point arguments, and tangent to the side opposite the first point argument

f toOpposite(self, object, point) ...

set postion as antipodal to the given point relative to the given object, i.e. circle or sphere

f toInterSection(self, p11, p12, p21, p22, test=True) ...

set position as the intersection of the line connecting the 1st and 2nd point arguments with that connecting the 3rd and 4th point arugments. Default is to test if lines are slew

f toPlaneIntersection(self, plane, p1, p2, test=False) ...

set to position of intersection of given plane with the line connecting the point arguments. Default is not to test if line is on plane

f toPlaneReflection(self, u, d) ...

move to the reflection of the current position in the plane defined by the 3 element vector representing the planes unit normal and a numeric value representing the plane's distance from the origin

f toSphereCenter(self, p1, p2, p3, p4) ...

set position as the center of the sphere defined by the 4 given points

f toCircumCenter(self, p1, p2, p3) ...

set position as the center of the circle on the 3 given points

f toBisector(self, p1, p2, p3) ...

set position the (interior) bisector of the angle at the 1st point argument formed with the the 2nd and 3rd point arguments

f toExtBisector(self, p1, p2, p3) ...

set position the exterior bisector of the angle at the 1st point argument formed with the the 2nd and 3rd point arguments

f toInvertPoint(self, circle, p1) ...

set position as the inversion of the given point in the given circle, on the circle's plane

f toCrossPoint(self, p1, p2, p3, p4, p1a, p2a, p3a) ...

set position as the crosspoint (equating cross ratios) of the last 3 (ordered) points with the first 4 (ordered) points

f toCircumPoint(self, circle, rad) ...

rotate the current position (assumed to be on the circle's circumference) by the given angle, in radians

f toHarmonic(self, p1, p2, p3) ...

set position as the harmonic with of the 3rd point argument with reespect to the 1st and 2nd point arguments

Methods defined in vector

f __rmul__(...)

f cross(...)

The cross product of this vector and another.

f __abs__(...)

Return the length of this vector.

f __pos__(...)

Returns the vector itself.

f proj(...)

The vector projection of this vector onto another.

f __len__(...)

f __mul__(...)

f __isub__(...)

f comp(...)

The scalar projection of this vector onto another.

f __idiv__(...)

f norm(...)

The unit vector of this vector.

f diff_angle(...)

The angle between this vector and another, in radians.

f astuple(...)

Convert this vector to a tuple. Same as tuple(vector), but much faster.

f __add__(...)

f rotate(...)

Rotate this vector about the specified axis through the specified angle, in radians

f __imul__(...)

f clear(...)

Zero the state of this vector. Potentially useful for reusing a temporary variable.

f __iadd__(...)

f __div__(...)

f __neg__(...)

f __sub__(...)

f dot(...)

The dot product of this vector and another.

Attributes

a mag

<property object at 0x015D18A0>

a mag2

<property object at 0x015D18C8>

a x

<property object at 0x015D1828>

a z

<property object at 0x015D1878>

a y

<property object at 0x015D1850>

See the source for more information.