Posts

Showing posts from October, 2026

Historical Note

 One of the joys of doing this piece of work, at a relaxed pace compared with my days of working, is the side roads that one can follow. The simplest curve drawing method of the piecewise cubic family is the osculatory method.  I called it the cubic Bessel method when I was helping to create NAG Graphics.  I think the names are synonymous and indeed it can also be called parabolic blending.  See for example the OrcaFlex dynamic analysis software (https://www.orcina.com/orcaflex/) I think parabolic blending is a good term.  I always thought of osculatory interpolation as a linear blending of two quadratic interpolants. Suppose we have 4 points (x1,y1), (x2,y2), (x3,y3) and (x4,y4). To find the interpolant in the interval [x1,x2], we linearly blend the quadratics that fit first to (x1,y1), (x2,y2) and (x3,y3) and then to (x2,y2), (x3,y3) and (x4,y4). Historically the term 'osculatory method' was commonly used.  In my 1980 IMA paper, I cited a paper by Ackland...

Curve drawing in GHOST-80

Image
 At the Computer Centre at Leicester, the main graphics package was GHOST, and later its successor GHOST-80.  I helped many users with their GHOST programs and helped to run the GHOST User Group established by the Director, David Fisher.  After some searching, and help from my friend Professor David Duce, of Oxford Brookes, I have been able to borrow the Culham Laboratory GHOST-80 manual.  There is an example program which demonstrates the two curve drawing routines, CURVEO and CURVEM.  The former is rotationally invariant, the latter gives a single-valued curve from single-valued data.  The manual does not specify the algorithm used, other than to say they are piecewise cubics.  I thought it might be interesting to run my R software on the dataset from the GHOST-80 manual.  First, for reference, here are the plots from the GHOST-80 manual. Here is the data: X: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Y: 5, 10, 39, 38, 25.5, 21,21, 21, 21, 11, 5 The singl...

Using SVG to create plots

 Curve drawing by straight line approximation is an instance of vector graphics.  The appropriate format for describing vector graphics is Scalable Vector Graphics (SVG).  This generates a drawing directly from the straight lines and so the rasterisation is generated at the time of display.  This is in contrast to describing the drawing as an image, say PNG, where the rasterisation is generated prior to display.  A major effect of this is that SVG drawings scale nicely when zooming in, whereas PNG images increasingly show the pixellation. I have previously used PDF to create vector graphics from R but it is possible to use SVG  This post describes the process - which is unfortunately rather tortuous. Step 1: A drawing in R can be saved in SVG format by adding the command 'ggsave("file.svg")' at the end of the program. Step 2: Move the SVG file to Google Drive.  This is done by logging in to Google Drive in a web browser and selecting 'My Drive'.  ...