nr.c4d.math¶
Functions¶
-
nr.c4d.math.vmin(a, b, copy=True)[source]¶ Combines the lowest components of the two vectors a and b into a new vector.
Parameters: - a – The first vector.
- b – The second vector.
- copy – If True, a copy of a will be created and returned from this function. Otherwise, a will be used and returned directly.
-
nr.c4d.math.vmax(a, b, copy=True)[source]¶ Combines the highest components of the two vectors a and b into a new vector.
Parameters: - a – The first vector.
- b – The second vector.
- copy – If True, a copy of a will be created and returned from this function. Otherwise, a will be used and returned directly.
-
nr.c4d.math.closest_point_on_line(a, b, p)[source]¶ Returns the closest point to p which is on the line through the points a and b.
ZeroDivisionErroris raised if a and b are the same.
-
nr.c4d.math.line_line_intersection(p1, d1, p2, d2, precision=1e-07)[source]¶ Calculates the intersection point of the two lines defined by p1, d1 and p2, d2.
Parameters: - p1 – A point on the first line.
- d1 – The direction of the first line.
- p2 – A point on the second line.
- d2 – The direction of the second line.
- precision – The accepted deviation between the components of the linear factors.
Returns: A
c4d.Vectorif the lines intersect, None otherwise.