naming is hard

I often have trouble giving meaningful concise names to variables in the programs I write, perhaps because, until I reach for the keyboard, my thinking is largely nonverbal. I suspect that it would be less of a problem for someone more exposed to the accumulated lore of programmer culture; though perhaps not in this case:

I’m thinking of breaking up this process into multiple rounds, to obtain increasing degrees of geometric continuity. The initial nodes would coincide with the input dots but have no defined theta (tangent angle) or kappa (curvature); the first round of replacements determines theta for G¹ continuity, the next round determines kappa (the first derivative of theta) for G² continuity — and subsequent rounds may seek higher degrees of continuity by matching further derivatives.

This means that the node object, instead of exactly two fields called theta and kappa, should have a list of theta and its known derivatives (one more than the current replacement-round needs), and I’m at a loss for a good name for this list.

This entry was posted in curve-fitting, neep-neep. Bookmark the permalink.

4 Responses to naming is hard

  1. Anton says:

    It’s like listing the coefficients of a Taylor polynomial, though here they’re not divided by k!.

  2. Anton says:

    I just thought of a case where relaxation (from the most naïve initial state) could lead to an infinite loop.

  3. Anton says:

    The code uses nautical metaphors, so I’m calling the [theta, kappa …] list rudder. Not gonna start with empty rudders as suggested above, but I have found a couple of cases where an incomplete rudder is appropriate:

    The ends of the stroke, not having enough neighbors to define a three-point circle, initially have empty rudders.

    When a proposed replacement arc violates the pixel rule — no, I don’t think I’ll explain that here.

  4. Anton says:

    This is no longer relevant in my current model.

Leave a Reply to Anton Cancel reply

Your email address will not be published. Required fields are marked *