03-07-2025, 03:22 AM
(03-06-2025, 04:04 PM)Marcus Wrote: ... I took the liberty and fixed it a bitIt's better to use the parametric line equation when doing things like this.
Code:...
function trunk(x1,y1,x2,y2,t)
'reduce thickness
t = t/1.1
' marcus.
dx = x2 - x1; dy = y2 - y1
d = sqr(dx*dx + dy*dy)
dx = dx/d; dy = dy/d
for i = 1 to d
draw ellipse x1, y1, t, t, true
x1 = x1 + dx; y1 = y1 + dy
next
endfunc
...
Awesome. Thank you, Marcus

Parametric equation in calculus shine
With slopes and integrals, neatly defined
In coding, they help with performance so tight
Solving equations with the speed of light