我无法设置范围以使圆圈不被切断。我希望有一个人可以帮助我。编辑的代码:我想在 g 线上镜像点“V”。from sympy import symbolsfrom sympy.plotting import plotfrom sympy.plotting import plot_implicitfrom sympy.geometry import Circlefrom sympy import solveimport numpy as np x, y = symbols(['x', 'y'])g = 4*x-3*y+1V = np.array([5,2])n = np.array([4, -3])abs_n = np.linalg.norm(n)hnf_g = abs(g/abs_n)mirrored_V = V - 2*hnf_g.evalf(subs={x:V[0], y:V[1]}) * n/abs_ny_g = solve(g,y)p = plot(y_g[0], show=False, xlim=(-10,10), ylim=(-10,10))p.extend(plot_implicit(Circle(V,1).equation(), var_start_end_x=(x,-10,10), var_start_end_y=(y,-10,10)))p.extend(plot_implicit(Circle(mirrored_V,1).equation(), var_start_end_x=(x,-10,10), var_start_end_y=(y,-10,10)))p.show()新结果:老的:这是整个情节的结果:如果我只看一下隐含的情节:
添加回答
举报
0/150
提交
取消