The more complex ones have 6 variables per proc and need some pre processing to
get those variables. One has a proc for the divisor. But, looking at it all I
could just as well create a proc for initialisation of the curve (pre)process
all the procs needed to get the matrix values and returns an object:
Curve = object
#curve_type: string
dim_seg: int
step: int
end_at: int
divisor: float
matrix: seq[seq[float]]
pointarray: seq[seq[vec]]
proc init_simple3ESC(pointarray, esc):Curve=
var curve = Curve()
curve.dim_seg = 1
curve.... etc
process procs here to obtain matrix data
...
return curve
c = init_simple3ESC(pointarray, 2)
p = getPoint(c, 0.8)
Run
A bit more typing but nicely explicit.
Thanks, I'll look into the macro solution.