mrdja.drawing.draw_line_extension_to_plane

mrdja.drawing.draw_line_extension_to_plane(line: ndarray, plane: ndarray, ax=None)[source]

Draws a line in 3D space, and the intersection point of the line and the plane, but this does not draw the plane.

Parameters:
  • line (numpy.ndarray) – A 2x3 numpy array containing the endpoints of the line.

  • plane (numpy.ndarray) – A 4x1 numpy array containing the coefficients of the plane.

Returns:

None

Return type:

None

Example:

>>> import mrdja.geometry as geom
>>> import numpy as np 
>>> import mrdja.drawing as drawing
>>> import matplotlib.pyplot as plt
>>> line = np.array([[0, 0, 0], [1, 1, 1]])
>>> plane = np.array([0, 0, 1, -3])
>>> intersection_point = geom.get_intersection_point_of_line_with_plane(line, plane)
>>> intersection_point
array([3., 3., 3.])
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111, projection='3d')
>>> drawing.draw_line_extension_to_plane(line, plane, ax)
>>> 
>>> drawing.draw_line_extension_to_plane(line, plane)

drawing_draw_line_extension_to_plane_example