Make a feedback loop to the draw curve itself (in a one iteration loop) and move the curves on the plane they originated from :
// Find the prim the current point belongs to, then store the point ID // of the first point in that prim int point_prim = pointprims(0, @ptnum)[0]; int first_point_id = primpoints(0, point_prim)[0]; // Use projection attributes stored on the stroke primitive // to move points vector p0_orig = point(0, "stroke_orig", first_point_id); vector p0_proj = point(0, "P", first_point_id); float dist_to_p0 = length(p0_orig - p0_proj); v@P = v@stroke_orig + ( normalize(v@stroke_dir) * dist_to_p0 );