def classify_intersection1(s, curve1, tangent1, curve2, tangent2):
    """Image for :func:`._surface_helpers.classify_intersection` docstring."""
    if NO_IMAGES:
        return

    surface1 = bezier.Surface.from_nodes(
        np.asfortranarray(
            [[1.0, 1.75, 2.0, 1.0, 1.5, 1.0], [0.0, 0.25, 1.0, 1.0, 1.5, 2.0]]
        )
    )
    surface2 = bezier.Surface.from_nodes(
        np.asfortranarray(
            [
                [0.0, 1.6875, 2.0, 0.25, 1.25, 0.5],
                [0.0, 0.0625, 0.5, 1.0, 1.25, 2.0],
            ]
        )
    )
    ax = classify_help(s, curve1, surface1, curve2, surface2, 0)
    (int_x,), (int_y,) = curve1.evaluate(s)
    # Remove the alpha from the color
    color1 = ax.patches[0].get_facecolor()[:3]
    color2 = ax.patches[1].get_facecolor()[:3]
    ax.plot(
        [int_x, int_x + tangent1[0, 0]],
        [int_y, int_y + tangent1[1, 0]],
        color=color1,
        linestyle="dashed",
    )
    ax.plot(
        [int_x, int_x + tangent2[0, 0]],
        [int_y, int_y + tangent2[1, 0]],
        color=color2,
        linestyle="dashed",
    )
    ax.plot([int_x], [int_y], color=color1, linestyle="None", marker="o")
    ax.axis("scaled")
    ax.set_xlim(-0.125, 2.125)
    ax.set_ylim(-0.125, 1.125)
    save_image(ax.figure, "classify_intersection1.png")
def classify_intersection1 ( s , curve1 , tangent1 , curve2 , tangent2 ) : if NO_IMAGES : return surface1 = bezier . Surface . from_nodes ( np . asfortranarray ( [ [ 1.0 , 1.75 , 2.0 , 1.0 , 1.5 , 1.0 ] , [ 0.0 , 0.25 , 1.0 , 1.0 , 1.5 , 2.0 ] ] ) ) surface2 = bezier . Surface . from_nodes ( np . asfortranarray ( [ [ 0.0 , 1.6875 , 2.0 , 0.25 , 1.25 , 0.5 ] , [ 0.0 , 0.0625 , 0.5 , 1.0 , 1.25 , 2.0 ] , ] ) ) ax = classify_help ( s , curve1 , surface1 , curve2 , surface2 , 0 ) ( int_x , ) , ( int_y , ) = curve1 . evaluate ( s ) color1 = ax . patches [ 0 ] . get_facecolor ( ) [ : 3 ] color2 = ax . patches [ 1 ] . get_facecolor ( ) [ : 3 ] ax . plot ( [ int_x , int_x + tangent1 [ 0 , 0 ] ] , [ int_y , int_y + tangent1 [ 1 , 0 ] ] , color = color1 , linestyle = "dashed" , ) ax . plot ( [ int_x , int_x + tangent2 [ 0 , 0 ] ] , [ int_y , int_y + tangent2 [ 1 , 0 ] ] , color = color2 , linestyle = "dashed" , ) ax . plot ( [ int_x ] , [ int_y ] , color = color1 , linestyle = "None" , marker = "o" ) ax . axis ( "scaled" ) ax . set_xlim ( - 0.125 , 2.125 ) ax . set_ylim ( - 0.125 , 1.125 ) save_image ( ax . figure , "classify_intersection1.png" )
Image for :func:`._surface_helpers.classify_intersection` docstring.