def draw(win):
win.scene.clear()
win.image.fill(black)
tx = win.dial_x.value()
ty = win.dial_y.value()
tz = win.dial_z.value()
if win.funcs.currentText() == "cos(x) * sin(z)":
f = f1
if win.funcs.currentText() == "2 * cos(x * z)":
f = f2
if win.funcs.currentText() == "exp(sin(sqrt(x^2 + z^2)))":
f = f3
if win.funcs.currentText() == "x^2 / 20 + z^2 / 20":
f = f4
if win.funcs.currentText() == "|sin(x) * sin(z)|":
f = f5
win.image = float_horizon(win.scene.width(), win.scene.height(), win.x_min.value(), win.x_max.value(), win.dx.value(),
win.z_min.value(), win.z_max.value(), win.dz.value(), tx, ty, tz, f, win.image)
pix = QPixmap()
pix.convertFromImage(win.image)
win.scene.addPixmap(pix)
评论列表
文章目录