Example with fancy labelling of lines

Hi everyone,

I’ve created a script to draw a “multiplication parabola” (see below). This makes use of some of the more complex line labeling and symbol plotting features.

To multiply two numbers (between 0 and 12), draw a line from the first number on the left hand side of the parabola to the second number on the right hand side. Where the line intersects the Y axis is the answer. In the example, 8x11=88.

Some of you might be interested in the maths of this, but I am posting this more to highlight some of the newish symbol and label plotting features GMT has (I don’t know how long these have been in GMT, but they’re new to me :slight_smile: ).

The script is here:

draw_parabola.txt (1.4 KB)

4 Likes

Very interesting. Would you be willing to share some of the maths behind it?

Does this help? Basically, you’ve got a straight line from cartesian coordinates (-x,x^2) to (y,y^2) and you want to work out where the line intercepts the y-axis. It would make a good problem for high school students I reckon.

Very cool usage of annotated lines :sunny:

Very interesting. Thanks for sharing!