Python4Kids New Tutorial: Slider Spliner
Sep 30, 2012, 06:00 (0 Talkback[s])
(Other stories by Brendan Scott)
Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js
In the last tutorial I used the term “quadradic Bezier curve” (which is a particular sort of way of drawing a curved line through three points). A more generic name for this way of drawing curves is “spline”, named after a strip of flexible material used by draftsmen to draw curves, also now called flexicurves). In this tutorial we’re going to learn about the Scale widget (but it looks like a slider) and use it to show how a computer draws those smooth curves.
Our starting point is the canvasCurve program from the previous tutorial, but we’ll jettison the mouse motion stuff, make it a bit larger and just draw a fixed, rather large, unhappy looking spline: