Menu

#64 Notation for Splines

Future
pending
nobody
2
2018-12-30
2011-07-03
No

Dear Maintainers,

I'd like to propose a new notation (syntactic sugar) for control points in paths with splines.

At the moment you have to write

...                           
(point a) .. controls (control point 1)
and (control point 2) ..
(point b) .. ...                          

A common requirement is that the resulting curve be continuous at the "fixed" points, in this case (point a) and (point b). In tikz this may be done by defining the fixed points first and then contructing the control points to the left and to the right of the fixed points:

\path (some coordinate) coordinate (point a)
+ (angle:-1) coordinate (left control point of a)
+ (angle:2)  coordinate (right control point of a)
...;    

\draw (start of path) .. controls (some control point) 
and (left control point of a) .. (point a) 
.. controls (right control point of a)
and (left control point of b) ..
(point b) ...;

This is a bit cumbersome. It would be nicer if you could write:

\path (start of path) .. controls (some control point)
continuation (point a) controlled by +(angle:-1)
and +(angle:2) ..
continuation (point b) with control points ....

Of course a terser notation is also possible. It would be even better it was possible to also define the control points of the first "goto" in the path and close the path using the first control point of that path. For example:

\path continuation (start point) controlled by +(angle1:-1)
and +(angle1:2)
continuation (point a) controlled by +(angle2:-2)
and +(angle2:1)
cycle;

I'd appreciate it if you would consider this notation (or equivalent) in future releases.

Thanks in advance for your time.

Regards,

Marc van Dongen

Discussion

  • Till Tantau

    Till Tantau - 2013-09-30
    • Group: --> Future
    • Priority: 5 --> 2
     
  • Till Tantau

    Till Tantau - 2013-09-30
    • status: open --> pending