Home Forums Nazca Questions and Answers Drawing line with mathematical function Reply To: Drawing line with mathematical function


Dear Cameron,

A correct observation; You can play with x, y, and w at the same time to get what you need.

For the geometrical path length of a parametric curve along (x, y) some calculus is required:

length = integral [ sqrt (x(t)^2 + y(t)^2) * dt ], t from t=0 to t=1

Analytically you may have the integral already, then that would be the most accurate solution. Otherwise take the sum of the line segments for a set of finite dt sections for t along [0, 1], where you need to set a criterion that ensures you obtain a sufficiently close approximation of the length. Perhaps scipy.integrate is of use.