我正在创建一个可以模拟电场线的python脚本,但箭头图中出现的箭头太大了.我已经尝试过更改单位和比例,但是matplotlib上的文档对我来说也没有意义......当系统中只有一次充电时,这似乎只是一个主要问题,但是箭头仍然略显过大任何数量的指控.箭头往往在所有情况下都过大,但最明显的只有一个粒子.
import matplotlib.pyplot as plt
import numpy as np
import sympy as sym
import astropy as astro
k = 9 * 10 ** 9
def get_inputs():
inputs_loop = False
while inputs_loop is False:
""""
get inputs
"""
inputs_loop = True
particles_loop = False
while particles_loop is False:
try:
particles_loop = True
"""
get n particles with n charges.
"""
num_particles = int(raw_input('How many particles are in the system? '))
parts = []
for i in range(num_particles):
parts.append([float(raw_input("What is the charge …Run Code Online (Sandbox Code Playgroud)