Quick viewing(Text Mode)

Arxiv:2011.08232V2 [Cs.GR] 28 Jun 2021

Arxiv:2011.08232V2 [Cs.GR] 28 Jun 2021

Conversion Between Cubic Bezier Curves and Catmull–Rom Splines

Soroosh Tayebi Arasteh1,2 · Adam Kalisz1

Abstract Splines are one of the main methods of mathe- and flexible, when implemented in a computer software. Es- matically representing complicated shapes, which have be- pecially with curves, a software engineer is usually presented come the primary technique in the fields of Computer Graph- with a plethora of possible shape representations to choose ics (CG) and Computer-Aided Geometric Design (CAGD) from. The wide range of candidates and their specific advan- for modeling complex surfaces. Among all, Bezier´ and Cat- tages and disadvantages motivate the application of this work. mull–Rom splines are the most common in the sub-fields of A brief overview of the main purpose of curves and splines as engineering. In this paper, we focus on conversion between well as the necessity of a conversion method in engineering cubic Bezier´ and Catmull–Rom curve segments, rather than fields will prepare the reader for the subsequent theory and going through their properties. By deriving the conversion evaluation part within this paper. equations, we aim at converting the original set of the con- Designers in the car industry often need to construct clay trol points of either of the Catmull–Rom or Bezier´ cubic models or sketches of vehicles, where the mathematical rep- curves to a new set of control points, which corresponds to resentation needs to allow for interactive modifications to approximately the same shape as the original curve, when curve properties, such as curvature and continuity. Further- considered as the set of the control points of the other curve. more, one of the key properties of the available mathemati- Due to providing simple linear transformations of control cal representations is the distinction between interpolating points, the method is very simple, efficient, and easy to im- and approximating curves [10]. This property is related to plement, which is further validated in this paper using some whether a curve goes through its Control Points or not and numerical and visual examples. can be observed as one of the main differences between the two shape representations discussed in this work. Indeed, Keywords Bezier´ curves · Catmull–Rom splines · Computer the reason for conducting this research was the need to sup- aided design · port two different curve representations in a common file format, and therefore, the remainder of this paper is focused 1 Introduction on proposing a closed-form conversion equation. Furthermore, according to the German Association of 1.1 Motivation the Automotive Industry (VDA)1, different manufacturers and their subcontractors have different geometric modeling One of the main challenges in computer-aided design is find- systems for curve and surface representations. Thus, another ing a suitable shape representation which is both performant motivating view on exchanging data between different geo- metric modeling systems to compensate differences in the This is the pre-print version. The main article is published in SN : https://link. types of polynomial bases, maximum polynomial degrees springer.com/article/10.1007/s42979-021-00770-x and mesh sizes of curve and surface representations is dis- DOI: https://doi.org/10.1007/s42979-021-00770-x cussed more thoroughly in [14]. Soroosh Tayebi Arasteh and Adam Kalisz have contributed equally to arXiv:2011.08232v3 [cs.GR] 31 Jul 2021 this study. Soroosh Tayebi Arasteh is the corresponding author. 1.2 Engineering Purpose and Related Work

1Department of Electrical, Electronic, and Communication Engineering, As the field of Computer Graphics (CG) develops, techniques Information Technology (LIKE), Friedrich-Alexander-Universitat¨ for modeling complex curves and surfaces are being increas- Erlangen-Nurnberg,¨ Am Wolfsmantel 33, 90158 Erlangen, Germany ingly important. An example may be the rendering of highly 2Harvard Medical School, 25 Shattuck St, Boston, MA 02115, detailed landscapes which need to be subdivided (tessellated) USA depending on the viewing distance to reduce the process- ing time for a geometry that is barely visible from the cur- E-mail: rent camera viewpoint [12, 30]. One of the major techniques [email protected] [email protected] 1 In German: Verband der Automobilindustrie. 2 S.T. Arasteh, et al. to realize such dynamic tessellation is the use 1.3 Paper Structure and Contributions of parametric splines in which a curve is defined by piec- ing together a succession of curve segments, and especially, In this paper, we do not go through the properties and details surfaces defined by stitching together a mosaic of surface of Bezier´ and Catmull–Rom Splines, but rather the aim is patches [1]. to focus on the conversion equations. First, we give a brief explanation of Bezier´ curves in Sec.2 as well as a brief Splines are a mathematical means of representing a com- explanation of Catmull–Rom Splines in Sec.3. Then, we plex curve. For example, it is not possible to define a circle go through the conversion equations in Sec.4. Note that using only a single cubic Bezier´ curve. Therefore, a com- by conversion, we mean conversion of control points of a mon approximation to model a circle is to use four Bezier´ curve to the control points of another curve, which results curve segments [7]. Eventually, a complete path can be de- in approximately the same curve as the curve before conver- fined using a series of points at intervals along the curve sion represents3. In Sec.5, we validate the equations with segments and defining a function that allows to interpolate some numerical and graphical examples. We use bold-face along the curve to retrieve additional points within each inter- notation for vector representation here. Sec.6 discusses the val to be calculated. This is often the first step when creating conversion equations with regard to the real-world applica- procedural virtual worlds, i.e., generating smooth and infi- tions and the limitations and proposes some potential future nite highways using Catmull–Rom splines in games [8]. The work. Finally, the conclusions are stated in Sec.7. impressive power of splines is demonstrated when proce- dural landscapes and roads are combined to create entire virtual city models randomly, as can be seen, for instance 2 Bezier´ Curves in the SceneCity Blender addon2. As seen with the CG ex- amples, it is possible to generate paths and surfaces using There are two basic ways of defining a curve—in terms of splines. In addition, Splines can be used to animate objects or the polygon vertices, and in terms of the polygon sides [10]. virtual cameras along predefined paths [27]. Recently, the re- Even though, the latter is the form, which was originally used search community involved in solving the inverse problem to by Pierre Bezier´ [2–4], we consider the former throughout CG, namely, Computer Vision (CV), increasingly discovers our paper. There are two reasons for developing a formula- splines for recovering the real camera movement from image tion of the Bezier´ curve in terms of polygon vertices rather sequences. In robotics, related research is often concerned than polygon sides. To begin with, the formulation becomes with solving the visual Simultaneous Localization And Map- more elegant. Furthermore, as a general principle, it is better ping (SLAM) problem. However, since cameras usually take to program in terms of absolute vectors rather than a chain of pictures at specific points in time, the resulting estimated relative vectors, irrespective of the particular user interface, trajectory is discrete. Imposing constraints on the camera when transformations such as rotation are to be applied to path using splines has shown advantages in handling a com- the vectors, because rounding errors do not have the cumu- mon image sensor deficiency called rolling shutter, where lative effect which sometimes give rise to poor drawings. the image exhibits a pixel warping deformation (informally This can be particularly noticeable when transformations are often called a Jello Effect) due to a rowwise exposure [5]. performed, for reasons of speed, in a small satellite graphics Describing the camera trajectory using continuous B-splines computer [10]. offers the advantage that any exposure time along the path A parametric Bezier´ curve is defined by its control points. can be interpolated and thus allows for correcting the rolling The curve does not necessarily go through the control points. shutter for both monocular [24] and stereo (RGB-D) [20] There may be 2, 3, 4 or more. For instance, Fig.1 shows cameras. To predict and plan the future paths for Automated a linear, a quadratic, and cubic Bezier´ curve, respectively. Driving Systems (ADS), while taking into account obstacles The figures are drawn using a geometric approach called ”de and driving comfort, it was shown that Bezier´ curves are a Casteljau’s ”. It is the most common approach for reliable solution for an optimal trajectory generation [11, 21]. drawing Bezier´ curves in CAGD. For more details on the This short review of interdisciplinary research contains algorithm, see [9]. many different types of spline representation, such as Bezier´ [7, A cubic Bezier´ curve can be written in a matrix form 11,21], Catmull–Rom [8], B-Splines [20,24] and Non-uniform by expanding the analytic definition of the curve into its Rational B-Spline (NURBS) [12] surfaces. This shows the Bernstein polynomial coefficients, and then writing these relevance of providing conversion methods between the vari- coefficients in a matrix form using the polynomial power ba- 4 ous representations of which one is discussed in this paper. sis [15]. The Bernstein polynomials of degree n are defined by Eq.1. For more details on B ezier´ curves, see [18].

3 To encourage reproducibility, the source code of the project is pub- 2 SceneCity is a procedural city generation addon for Blender avail- licly accessible here: https://github.com/starasteh/bezier catmullrom/ able at: https://www.cgchan.com/ 4 For more information on the Bernstein polynomials, see [9, 16, 28]. Conversion Between Cubic Bezier Curves and Catmull–Rom Splines 3

(a) (b) (c)

Fig. 1: (a) A two-point Bezier´ curve. (b) A three-point (quadratic) Bezier´ curve. (c) A four-point (cubic) Bezier´ curve. Images taken from [19].

Catmull–Rom splines are based on the concept of ”ten- sion”: the higher the tensions, the shorter the tangents at the departure and arrival points. It affects how sharply the curve bends at the (interpolated) control points [29]. When tension is set to 1 (as it often is), the resulting segments between control points will be straight lines. The basic Catmull–Rom curve arrives and departs with tangents equal to half the distance between the two adjacent points. Fig. 2: Catmull–Rom spline interpolation with four points. Image taken 5 from [13]. The matrix form of a Catmull–Rom spline is shown in Eq.4,   n 1  2 3 B (t) = ti(1 − t)n−i (1) CatmullRom(t) = · 1 t t t i,n i 2    0  0 2 0 0 P0 ABezier´ curve uses Bernstein polynomials as basis. A cubic 0 −τ 0 τ 0  P1 (degree 3 or order 4) is represented by the following, ·  . 0   2τ τ − 6 −2(τ − 3) −τ P2 0 3 −τ 4 − τ τ − 4 τ P3 Bezier(t) = ∑ PiBi(t) (4) i=0 3 2 2 3 6 = (1 −t) P0 + 3t(1 −t) P1 + 3t (1 −t)P2 +t P3 where τ is the tension factor . See [17] for the proof of Eq.4 (2) with τ = 1.

    1 0 0 0 P0 4 Conversion   −3 3 0 0 P1 = 1 t t2 t3 ·   ·  . (3)  3 −6 3 0 P2 We will use only cubic splines for both Catmull–Rom and −1 3 −3 1 P3 Bezier´ throughout this paper, as the Catmull–Rom splines are only defined with four control points. It is always possible to concatenate multiple splines to create the desired curve. A 3 Catmull–Rom Splines series of unique cubic polynomials are fitted between each of the data points, with the stipulation that the curve obtained Catmull–Rom splines are a family of cubic interpolating be continuous and appear smooth [22]. As a matter of fact, splines formulated such that the tangent at each point Pi is in industrial applications, it is often found that a particular calculated using the previous and next point on the spline [29]. curve segment is not sufficiently powerful or flexible (i.e., Unlike a Bezier´ curve, a (Centripetal) Catmull–Rom spline is 5 0 defined for only 4 control points (see Fig.2), i.e., a single Cat- Pi,i ∈ {0,1,2,3} show the Catmull–Rom spline control points. mull–Rom segment is cubic. As it is an interpolating spline, 6 In many references, you may find the matrix form of the Cat- mull–Rom splines as, the curve goes, through its control points, P0,P1,P2,P3, and    0  it is only drawn from P1 to P2 (Fig.2). The curve is named 0 2 0 0 P0 1 −1 0 1 0 P0 after Edwin Catmull and Raphael Rom. The principal advan- (t) = · 1 t t2 t3 ·  . 1 (5)CatmullRom  2 −5 4 −1 P0  tage of this technique is that the points along the original 2    2 −1 3 −3 1 P0 set of points also make up the control points for the spline 3 curve [6]. which is the case when τ = 1. 4 S.T. Arasteh, et al. it does not have sufficient degrees of freedom) to adopt a which brings us to Eq. 12. desired shape [10]. Comparing Eq.3 and Eq.4, we wish to find the transfor-  0 6 0 0  mation matrix A in order to convert from Catmull–Rom to 1 −τ 6 τ 0  ·   = A. (12) Bezier,´ 6  0 τ 0 −τ    0  0 0 6 0 0 2 0 0 P0 0  2 3 1 −τ 0 τ 0  P1 1 t t t · ·  . 0  Multiplying this A with our coordinates will give us a proper 2  2τ τ − 6 −2(τ − 3) −τ P2 0 Bezier´ matrix expression again, as in Eq. 13 and Eq. 14. −τ 4 − τ τ − 4 τ P3     (6) 1 0 0 0 P0       1 0 0 0 0 6 0 0 P0  2 3 −3 3 0 0 P1 = 1 t t t ·   · A ·  .  2 3−3 3 0 0 1 −τ 6 τ 0  P1  3 −6 3 0 P2 1 t t t   · ·   ·   (13)  3 −6 3 0 6  0 τ 0 −τ P2 −1 3 −3 1 P3 −1 3 −3 1 0 0 6 0 P3 Consequently, we have,  0    P0 P0 P0 P  P   t t2 t3 · M0 ·  1 =  t t2 t3 · M ·  1   1 1  0  1   (7) 1 0 0 0 P − P P2 P2  2 0  P1 + 0  2 3−3 3 0 0   P3 P3 = 1 t t t   ·  6 · τ . (14)  3 −6 3 0  P3 − P1  0 P2 −  with M and M being the following matrices, −1 3 −3 1  6 · τ  P2  0 2 0 0  0 1 −τ 0 τ 0  Thus, a Catmull–Rom to Bezier´ conversion, based on M = ·   (8) 2  2τ τ − 6 −2(τ − 3) −τ coordinates, requires turning the Catmull–Rom coordinates −τ 4 − τ τ − 4 τ on the left into the Bezier´ coordinates on the right (with τ being our tension factor), according to Eq. 15.  1 0 0 0 −3 3 0 0 M =   · A (9)  P   3 −6 3 0  0  1 P0 P2 − P0 −1 3 −3 1 0  +  P  P1   1 ⇒  6 · τ  (15) The difference is somewhere in the M and M0 matrices, P0   P3 − P1  2 P2 −  since t and the coordinate values are identical. Therefore, we P0  6 · τ  3 CatmullRom P should solve the matrix equation in Eq. 10. 2 Bezier     0 2 0 0 1 0 0 0 In addition, in the same way, a Bezier´ to Catmull–Rom con- 1 −τ 0 τ 0  −3 3 0 0 ·   =   · A version instead requires turning the Bezier´ coordinates on the 2  2τ τ − 6 −2(τ − 3) −τ  3 −6 3 0 left into the Catmull–Rom coordinates on the right. Note that, −τ 4 − τ τ − 4 τ −1 3 −3 1 there is no tension factor this time, because Bezier´ curves (10) do not have any. Converting from Bezier´ to Catmull–Rom We left-multiply both sides by the inverse of the Bezier´ ma- is simply a default-tension Catmull–Rom curve, based on trix, to get rid of the Bezier´ matrix on the right side of the Eq. 16. equals sign, P  P0 + 6 · (P0 − P0 )  −1   0 3 0 1 1 0 0 0 0 2 0 0 P P0  1 ⇒  0  (16) −3 3 0 0 1 −τ 0 τ 0     0    · ·   P2  P3   3 −6 3 0 2  2τ τ − 6 −2(τ − 3) −τ 0 0 0 P3 Bezier P0 + 6 · (P3 − P2) CatmullRom −1 3 −3 1 −τ 4 − τ τ − 4 τ −1  1 0 0 0  1 0 0 0 −3 3 0 0 −3 3 0 0 5 Experiments and Results =   ·   · A = I · A = A,  3 −6 3 0  3 −6 3 0 −1 3 −3 1 −1 3 −3 1 In this section, we use sets of exemplary control points in (11) order to validate the transformation equations. Conversion Between Cubic Bezier Curves and Catmull–Rom Splines 5

5.1 Numerical Analysis Solving the matrix equation, we get the following control points, Having the fact that we only consider some random values 0 here, this part cannot be considered as a mathematical proof. P0 = (−2.0,−2.0,−2.0), 0 However, it gives a sound overview of how the conversion P1 = (1.0,1.0,1.0), equations (Eq. 15 and Eq. 16) work. 0 P2 = (4.0,4.0,4.0), Looking at the equations, it is trivial that the conversion P0 = (7.0,7.0,7.0). equations are valid for any number of dimensions. In this part, 3 we explain our examples with 3-dimensional (3D) control which are equal to the results of using Eq. 16. ut points. In the following, first, we validate the conversion from cubic Bezier´ curves to cubic Catmull–Rom splines by experi- Another timepoint Now, to show the equation is valid for menting two random timepoints. And in the second part, we any timepoint, we choose another random time t = 0.64 and do the reverse and validate the conversion from cubic Cat- follow the same procedure as above for the same control mull–Rom splines to cubic Bezier´ curves by experimenting points, two other random timepoints. Bezier(0.64) = 1 0.64 0.4096 0.262144 5.1.1 Conversion from Bezier´ to Catmull–Rom  1 0 0 0 1.0 −3 3 0 0 2.0 (19) Let us have a cubice Bezier´ curve with the following 3D ·   ·    3 −6 3 0 3.0 control points, −1 3 −3 1 4.0 P0 = (1.0,1.0,1.0), = 2.920 P1 = (2.0,2.0,2.0),

P2 = (3.0,3.0,3.0),

P3 = (4.0,4.0,4.0). 2.920 = CatmullRom(0.64) 1 Using Eq. 16, we get the following control points for the = · 1 0.64 0.4096 0.262144 2 Catmull–Rom spline with the tension factor τ = 1,    0  (20) 0 2 0 0 P0 P0 = (−2.0,−2.0,−2.0), 0 0 −1 0 1 0  P1 0 ·  . 0 . P1 = (1.0,1.0,1.0),  2 −5 4 −1 P2 0 −1 3 −3 1 P0 P2 = (4.0,4.0,4.0), 3 P0 = (7.0,7.0,7.0). 3 Solving the matrix equation, we again get the following val- Now, we replace the set of control data points in Eq.3 and ues, with a random choice of t = 0.2, we get the following, 0 P0 = (−2.0,−2.0,−2.0)  1 0 0 0 1.0 0 P1 = (1.0,1.0,1.0) −3 3 0 0 2.0 Bezier(0.2) = 1 0.2 0.04 0.008 ·   ·   P0 = (4.0,4.0,4.0)  3 −6 3 0 3.0 2     0 −1 3 −3 1 4.0 P3 = (7.0,7.0,7.0). = 1.600. which are again equal to the results of using Eq. 16. ut (17)

The obtained value should be the same, when using Eq.4 5.1.2 Conversion from Catmull–Rom to Bezier´ with t = 0.2, 1 In this part, we do the reverse and start with a cubic Cat- 1.600 = CatmullRom(0.2) = · 1 0.2 0.04 0.008 2 mull–Rom spline with the following 3D control points,    0  0 2 0 0 P0 0 0 P0 = (1.0,1.0,1.0), −1 0 1 0  P1 0 ·  . 0 . P1 = (2.0,2.0,2.0),  2 −5 4 −1 P2 0 P0 = (3.0,3.0,3.0), −1 3 −3 1 P3 2 0 (18) P3 = (4.0,4.0,4.0). 6 S.T. Arasteh, et al.

Using Eq. 15, we get the following control points for the 2.3527 = Bezier(32)     Bezier´ curve with the tension factor τ = 1, 1 0 0 0 P0   −3 3 0 0 P1 P0 = (2.0,2.0,2.0), = 1 0.32 0.1024 0.0327 · · .  3 −6 3 0 P2 P = (1.0,1.0,1.0), 1 −1 3 −3 1 P3 P2 = (2.0,2.0,2.0), (24) P3 = (3.0,3.0,3.0). Solving the matrix equation, we again get the following val- Replacing the set of control data points in Eq.4 and with a ues, random choice of t = 0.45, we get the following, P0 = (2.0,2.0,2.0),

P1 = (1.0,1.0,1.0), 1 CatmullRom(0.45) = · 1 0.45 0.2025 0.0911 P2 = (2.0,2.0,2.0), 2 P3 = (3.0,3.0,3.0),  0 2 0 0  1.0 (21) which are again equal to the results of using Eq. 15. ut −1 0 1 0  2.0 ·  .   2 −5 4 −1 3.0 −1 3 −3 1 4.0 5.2 Graphical Fitting = 2.5411. In this part, we aim at showing the validity of the conversion The obtained value should be the same, when using Eq.3 equations (Eq. 15 and Eq. 16) by illustrating graphical exam- with t = 0.45, ples. For the ease of illustration, we assume 2-dimensional (2D) curves in this part. 2.5411 = Bezier(0.45) Figure 3a shows a cubic Bezier´ curve which is drawn     for 1000 timepoints (t ∈ [0,1] with a step size of 0.001). 1 0 0 0 P0 Furthermore, the aforementioned figure is drawn using the   −3 3 0 0 P1 = 1 0.45 0.2025 0.0911 · · . following randomly-generated 2D control points,  3 −6 3 0 P2 −1 3 −3 1 P3 P0 = (70.650,40.045),

(22) P1 = (65.354,15.054),

P2 = (60.253,100.754), Solving the matrix equation, we again get the following val- P = (100.234,95.287). ues, 3 Using Eq. 16, we convert the above Bezier´ control points to P0 = (2.0,2.0,2.0), the respective control points of a Catmull–Rom cubic spline

P1 = (1.0,1.0,1.0), with the tension factor τ = 1, 0 P2 = (2.0,2.0,2.0), P0 = (130.010,245.233), 0 P3 = (3.0,3.0,3.0), P1 = (70.650,40.045), P0 = (100.234,95.287), which are equal to the results of using Eq. 15. ut 2 0 P3 = (310.536,7.243), and sketch the corresponding cubic Catmull–Rom spline Another timepoint Now, to show the equation is valid for of these new control points for the same 1000 timepoints any timepoint, we choose another random time t = 0.32 and (t ∈ [0,1] with a step size of 0.001). Fig. 3b illustrates the follow the same procedure as above for the same control resulting curve, which is almost the same as Fig. 3a. points, In a similar way, Fig.4 shows the reverse conversion from Catmull–Rom to Bezier´ using Eq. 15 and the follow- 1 CatmullRom(0.32) = · 1 0.32 0.1024 0.0327 ing randomly-generated 2D control points and the resulting 2 converted control points,     0 2 0 0 1.0 0 (23) P0 = (72.022,219.863), −1 0 1 0  2.0 ·  .  0 = ( . , . ),  2 −5 4 −1 3.0 P1 0 257 40 527 0 −1 3 −3 1 4.0 P2 = (85.204,1.025), 0 = 2.3527. P3 = (307.331,15.189), Conversion Between Cubic Bezier Curves and Catmull–Rom Splines 7

(a) (b)

80 80

60 60

40 40

70 75 80 85 90 95 100 70 75 80 85 90 95 100

Fig. 3: 2D curves converted from Bezier´ to Catmull–Rom, drawn for 1000 time steps. (a) The original Bezier´ curve, which is drawn using the following randomly-generated 2D control points: P0 = (70.650,40.045), P1 = (65.354,15.054), P2 = (60.253,100.754), P3 = (100.234,95.287). (b) The calculated Catmull–Rom curve with τ = 1, which is drawn using the following control points, which are the converted control point of the 0 0 0 0 original Bezier´ curve using Eq. 16: P0 = (130.010,245.233), P1 = (70.650,40.045), P2 = (100.234,95.287), P3 = (310.536,7.243).

(a) (b) 40 40

30 30

20 20

10 10

20 40 60 80 20 40 60 80

Fig. 4: 2D curves converted from Catmull–Rom to Bezier,´ drawn for 1000 time steps. (a) The original Catmull–Rom curve with τ = 1, which 0 0 0 0 is drawn using the following randomly-generated 2D control points: P0 = (72.022,219.863), P1 = (0.257,40.527), P2 = (85.204,1.025), P3 = (307.331,15.189). (b) The calculated Bezier´ curve, which is drawn using the following control points, which are the converted control point of the original Catmull–Rom curve using Eq. 15: P0 = (0.257,40.527), P1 = (2.454,4.054), P2 = (34.025,5.248), P3 = (85.204,1.025).

This conversion can be applied in situations, where one of these mathematical representations is not supported in P = (0.257,40.527), 0 specific software implementations and thus allows to use P1 = (2.454,4.054), data, such as 2D drawings, 3D camera trajectories or sur- P2 = (34.025,5.248), faces across individual software pipelines. For instance, the

P3 = (85.204,1.025). open source 3D creation suite Blender does not support Catmull–Rom curve primitives7 but it does support Bezier´ curves. Therefore, one of the many applications of the pro- 6 Discussion posed method in this paper would be to convert the control

The method proposed in this work allows for converting con- 7 See the supported curve types in Blender here: https://docs.blender. trol points between Bezier´ and Catmull–Rom definitions. org/manual/en/latest/modeling/curves/primitives.html 8 S.T. Arasteh, et al.

points of a Catmull–Rom curve to the Bezier´ representation 4. Bezier,´ P.: Emploi des machines a` commande numerique.´ Masson in order to be able to draw the curve in Blender. (1970) 5. Cai, Y., Lam, E., Howlett, T., Cai, A.: Spatiotemporal analysis of This work has also some limitations. The proposed method “jello effect” in drone videos. In: Advances in Human Factors in is solely valid for cubic curve segments, i.e., curves which Robots and Unmanned Systems, pp. 197–207. Springer Interna- are defined by four control points. However, Bezier´ curves tional Publishing, Cham (2020) may be defined with an arbitrary number of control points 6. Catmull, E., Rom, R.: A class of local interpolating splines. In Barnhill, R. E.; Riesenfeld, R. F. (eds.), Computer Aided Geometric and consequently, contain a higher-degree polynomial. The Design. New York: Academic Press (1974) advantage of lower-degree polynomials is less computations 7. Dokken, T., Dæhlen, M., Lyche, T., Mørken, K.: Good approxima- during both the evaluation of the curve and the calculation of tion of circles by curvature-continuous bezier´ curves. Computer derivatives (comparing the definitions in Eq.1 and Eq.2, the Aided Geometric Design 7(1), 33–41 (1990) 8. Dunlop, R.: Introduction to catmull-rom splines. Microsoft DirectX number of summations/loops depends on the degree of the Most Valuable Professional (MVP) URL http://www.mvps.org/ curve). Therefore, the higher the degree, the higher the num- directx/articles/catmull/ ber of evaluations. In order to use our proposed method with 9. Farin, G.: Curves and Surfaces for Computer Aided Geometric Design. 5th ed. Morgan Kaufmann (2001) higher-degree curves, additional techniques such as Degree 10. Forrest, A.R.: Interactive Interpolation and Approximation by Reduction [26] or Curve Subdivision using De Casteljau’s Bezier´ Polynomials. The Computer Journal 15(1), 71–79 (1972) algorithm [23] need to be applied to the curve prior to type 11. Gonzalez Bautista, D., Perez,´ J., Lattarulo, R., Milanes, V., conversion. Moreover, B-Splines might be utilized in many Nashashibi, F.: Continuous curvature planning with obstacle avoid- ance capabilities in urban scenarios. 17th IEEE International Con- applications instead of Bezier´ splines, due to the fact that ference on Intelligent Transportation Systems, ITSC 2014 (2014) they could provide finer local shape control by introducing 12. Guthe, M., Balazs,´ A.,´ Klein, R.: Gpu-based trimming and tessella- a knot vector. Even though there is a conversion method be- tion of nurbs and t-spline surfaces. ACM Transactions on Graphics 24(3), 1016–1023 (2005) tween B-Splines and Bezier´ splines [25], the authors are not 13. Hadunsford: Cc by-sa 3.0 https://creativecommons.org/licenses/by- aware of a method to directly convert between B-Splines and sa/3.0, via wikimedia commons; 2013. https://commons.wikimedia. Catmull–Rom splines. Such generalizations to other spline org/wiki/File:Catmull-Rom Spline.png representations are expected to be formulated in future re- 14. Hoschek, J.: Approximate conversion of spline curves. Computer Aided Geometric Design 4(1), 59 – 66 (1987). Topics in CAGD search. 15. Joy, K.I.: A Matrix Formulation of the Cubic Bezier Curves. On- Line Geometric Modeling Notes, University of California, Davis (1997) 7 Conclusion 16. Joy, K.I.: Bernstein Polynomials. On-Line Geometric Modeling Notes, University of California, Davis (2000) 17. Joy, K.I.: Catmull-Rom Splines. On-Line Geometric Modeling In this paper, we focused on conversion of control points of Notes, University of California, Davis (2002) a cubic Bezier´ curve to those of a Catmull–Rom curve and 18. Kamermans, M.: A primer on bezier´ curves, [online] URL https: vice-versa. It was shown that, to do so, according to Eq. 15 //pomax.github.io/bezierinfo/ 19. Kantor, I.: Bezier curve. The Modern JavaScript Tutorial, [Online] and Eq. 16, we merely need basic linear transformations of (2020). URL https://javascript.info/bezier-curve/ the positions of the control points. Moreover, we illustrated 20. Kerl, C., Stuckler,¨ J., Cremers, D.: Dense continuous-time track- that the equations are valid for any timepoint and for control ing and mapping with rolling shutter RGB-D cameras. In: IEEE points with arbitrary number of dimensions. International Conference on Computer Vision (ICCV) (2015) 21. Lattarulo, R., Perez,´ J.: A hybrid planning approach based on mpc and parametric curves for overtaking maneuvers. Sensors 21 (2021) Acknowledgements This work was supported by Siemens Mobility 22. McKinley, S., Levine, M.: Cubic spline interpolation. College of GmbH, Erlangen, Germany. the Redwoods 45(1), 1049–1060 (1998) 23. Micchelli, C.A., Prautzsch, H.: Uniform refinement of curves. Lin- ear Algebra and its Applications 114-115, 841–870 (1989) 24. Patron-Perez, A., Lovegrove, S., Sibley, G.: A spline-based trajec- Conflict of interest tory representation for sensor fusion and rolling shutter cameras. International Journal of Computer Vision 113 (2015) All authors declare that they have no conflict of interest. 25. Prautzsch, H., Boehm, W., Paluszny, M.: Bezier´ and B-Spline techniques (2002). Springer, 2002 26. Shimin, H., Jiaguang, S., Tongguang, J., Guozhao, W.: Approx- imate degree reduction of bezier curves. Tsinghua Science and References Technology 3(2), 997–1000 (1998) 27. Spencer-Smith, T., Wyvill, G.: Four dimensional splines for motion 1. Bartels, R.H., Beatty, J.C., Barsky, B.A.: An Introduction to Splines control in . In: State-of-the-art in Computer for Use in Computer Graphics & Geometric Modeling. Mor- Animation, pp. 153–167. Springer Japan, Tokyo (1989) gan Kaufmann Publishers Inc., San Francisco, CA, USA (1987) 28. Stark, E.L.: Bernstein Polynome, 1912-1955. In Butzer, P.L. (ed.). 2. Bezier,´ P.: How Renault uses Numerical Control for Car Body ISNM60 (1981) Design and Tooling. Society of Automotive Engineers, Paper SAE 29. Twigg, C.: Catmull-rom splines. Computer 41(6), 4–6 (2003) 680010 (1968) 30. Zhang, L., She, J., Tan, J., Wang, B., Sun, Y.: A multilevel ter- 3. Bezier,´ P.: Proced´ e´ de definition´ numerique´ des courbes et surfaces rain rendering method based on dynamic stitching strips. ISPRS non mathematiques.´ Automatisme 13(5), 189–196 (1968) International Journal of Geo-Information 8 (2019)