Как интегрировать кривую в двумерном пространстве, параметризованную полиномом?Python

Программы на Python
Anonymous
Как интегрировать кривую в двумерном пространстве, параметризованную полиномом?

Сообщение Anonymous »


У меня есть простая кривая в 2D-пространстве. that is parameterized by a polynomial as a function of and I would like to know the length of that curve. How do I accomplish that? I looked into

Код: Выделить всё

scipy.integrate
and

Код: Выделить всё

numpy.polyint
but I didn't manage to find a solution. It seems that both of them are only able to integrate over a 1D polynomial. Here is an example for a curve:

Код: Выделить всё

import numpy as np
from scipy import integrate

x0, y0 = 0.0, 0.0
vx, vy = 0.1, 0.1
ax, ay = -0.0001, 0
coeff = np.array([[ax, ay], [vx, vy], [x0, y0]])

pos = lambda t: np.polyval(coeff, t)


Источник: https://stackoverflow.com/questions/605 ... -a-polynom

Вернуться в «Python»