Computer-generated Floral Ornament Based on Magnetic Curves


Figure 1 Examples of floral ornament: (a) 12th Cent. Illuminated Manuscript of Luke [3] (b) ILLUMINATED MANUSCRIPT LEAF ON VELLUM, by the SPANISH FORGER [4] (c) Gothic vine [5, fig. 82] (d) A band from “Purim liturgical poems: illuminated manuscript.” [6]
Figure 2 Floral wallpaper design: (a) Sheet of wallpaper, late 17th century [7] (b) Floral wallpaper, mid 19th century [8] (c) Modern wallpaper from Home Depot catalog [9]
Figure 3 Modern floral clip-art [10]

Background Information and Related Work

Figure 4 Examples of the final results of related papers (a) Wong et al. [1] (b) Ling Xu et al. [9]


Starting Point

TRACE_PARTICLE(start_x, start_y, start_vx, start_vy, T, alpha)
x = start_x
y = start_y
vx = start_vx
vy = start_vy
t = 0
dt = 1
points = array()
while t <
Add new point [x, y] to points
q = (T - t)^(-alpha)
x = x + vx * dt
y = y + vy * dt
ax = -vy * q
ay = vx * q
vx = vx + ax * dt
vy = vy + ay * dt
return points
Figure 5 Magnetic curve growth: (a) Parent curve (b) Parent curve and its children (c) Parent curve with its children and grandchildren

Curve Levels

Figure 6 Variable stroke effect: (a) Curve with a constant stroke (b) Curve with a variable stroke

Adaptive Clip Art



  • Initial stem width (in pixels)
  • Initial curl direction (left or right)
  • Number of curve levels
  • Parameters of the curve at each level (Length/Curvature/Number of branches)
  • Clip-art element type
  • Ornament region points
  • Control points for the base step of the ornament

Demo Images

Table 1 Parameter values for curve levels of the sample ornament
Figure 8 Sample floral ornament produced by the application
Figure 9 Floral ornament used to decorate an arc
Figure 10 Example of floral ornament usage to produce an interesting background


Conclusions and Future Work

Abandoned Features

Possible Extensions

  • To produce the magnetic curves I used the same charge function as suggested in the paper. Other functions could be experimented with to produce more interesting types of curves. Xu touches upon this subject and notes that triangular waves are a good choice for experimentation.
  • One of the main problems with the magnetic curves algorithm is its ability to produce attractive space-filling curves. In this article I address this issue by requiring user input. It would be great to do it automatically. One possible way to address this issue is to make the charge function repeat with some period and make the main charged particle bounce off the edges of the ornament region. The magnetic field strength B can be increased along the region boundaries to achieve this effect. Moreover, the parameters of the charge function can be updated at runtime to facilitate space filling.
  • Some of the historical example of floral ornament that I had seen allowed an intersection between stems by arranging them into plait-work. This would be an interesting idea to experiment with.


  1. Wong M. T., Zongker D. E., Salesin D. H.: Computer-generated floral ornament. In Proceedings of SIGGRAPH ’98 (1998), ACM Press, pp. 423–434.
  2. “Frame” The Grove Encyclopedia of Decorative Arts. Ed. Gordon Campbell. © Oxford University Press 2006. The Grove Encyclopedia of Decorative Arts: (e-reference edition). Oxford University Press. [Accessed April 15th, 2010]
  3. Introduction to Luke-Arts, Northwestern Church of Christ, Dec. 2008. [Online] [Accessed April 15th, 2010]
  4. Illuminated Manuscript Leaf on Vellum, Bloomsbury Auctions, Apr. 2008. [Online] [Accessed April 15th, 2010]
  5. Lewis F. Day. Nature in Ornament. B.T. Batsford, London, 1898.
  6. Judaica Collection, Yale University Library, Oct 2008. [Online] [Accessed April 15th, 2008]
  7. Sheet of wallpaper, late 17th century. Museum no. E.1003–1976, Victoria and Albert Museum. [Online] [Accessed April 15th, 2010]
  8. Floral wallpaper, about 1850–75. Museum no. E.800–1969, Victoria and Albert Museum. [Online] [Accessed April 15th, 2010]
  9. W Red, Black and Taupe Large Scale Modern Floral Wallpaper, Home Depot Catalog, Catalog #100632840, 2010.
  10. Floral Ornament Vector Pack, Ideal Hut, Oct. 2009. [Online] [Accessed April 15th, 2010]
  11. Xu L., Mould D.: Magnetic Curves: Curvature-Controlled Aeshetic Curves Using Magnetic Fields. In Computational Aesthetics in Graphics, Visualization, and Imaging (2009). pp. 1- 8.
  12. Catmull, Edwin and Rom, Raphael, A class of local interpolating splines, in R.E. Barnhill and R.F. Riesenfed (eds.) Computer Aided Geometric Design, Academic Press, New York, 1974, 317–326.




Eng Manager @Snapchat. Android hacker, and a product design geek. Previously: cofounder of @UmanoApp (acquired by @Dropbox), @Google, @Pixar, @Kik.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anton L.

Anton L.

Eng Manager @Snapchat. Android hacker, and a product design geek. Previously: cofounder of @UmanoApp (acquired by @Dropbox), @Google, @Pixar, @Kik.

More from Medium

Hype around Performance Testing

Axure Tutorial: Simulate File Selection and Uploading with Repeater

Enabling Shift Left

Mobile Applications In Unity — Rainy Day Insurance: Creating a Case Number