Introduction: Capture Essence of Leaf With a Fractal

Picture of Capture Essence of Leaf With a Fractal

One of the the more classic uses of fractals is to reproduce leafs or ferns. Here we want to show you a way to capture the essence of a leaf and then generate a leaf that looks similar to the natural leaf. Fractals have the interesting property of being self-similar.

We are going to use the Thingiverse customizer of Infinity of Fractal Leafs to produce the leaf.

Use a scanner, copier or just a camera to take a picture of the leaf.

Then we will use the GNU Image Manipulation Program (GIMP) to take the measurements we need. GIMP is like PhotoShop and does things differently, but is freely distributed.

Step 1: Using GIMP to Measure the Leaf

Picture of Using GIMP to Measure the Leaf

Use GIMP to open your leaf image.

GIMP uses a multi-window interface so don't be surprised if a couple of other windows open up when you start GIMP. We need a ToolBox and our image up. File->Open will of course open a file if you did not Open in GIMP from the file viewer. If you do not get a toolbox you can click Windows->New Toolbox or press Ctrl-B.

The tool we want to use is the measure tool. It looks like the compass from your geometry class in highschool.

When you click and drag with this tool selected it measures the distance in pixels and the angle from horizontal by default. These numbers are at the bottom of the image window.

If you put your mouse near one of the two points GIMP gives you a hint that other features are available through pressing the Shift, Ctrl, or Alt keys.

Holding Shift while dragging away from the last point will create a second point. GIMP then measures the angle between the two lines and the distance of the last line.

In this example the measurement is 388.4 pixels and 63.9 degrees with a line that started at the top of the leaf went to the center branch point, then Shift-dragged to the tip on the right side.

The angle we need on the right is 63.9 degrees. 64 should work fine.

Step 2: Measure the Rest of the Angles We Need

Picture of Measure the Rest of the Angles We Need

Moving the last point from the tip on the right to the left tip gives us 54.2 degrees. 54 will work just fine.

The measure of the angle on the center is a bit difficult to measure, unless you realize the Customizer wants the angle of deflection from straight. So we measure from the end of the stem to the center branch point, then we measure from the center branch to the next branch point up.

178.8 degrees or -1.2 degrees from 180 (straight), lets use -2 just for fun.

The three angles we need are:

Angle Right 64 degrees

Angle Left 54 degrees

Angle Center -2 degrees

These alone will get you something that looks a lot like the original leaf.

But we can take a few more measurements.

Step 3: Measure the Length of the Stem

Picture of Measure the Length of the Stem

Measure the length of the stem

This is a simple drag from the tip of the stem to the center branch point.

Distance is 178.4,

L= 179 will be fine

Step 4: Get the Ratios (maybe)

Picture of Get the Ratios (maybe)

Some other ratios might be needed for your leaf

If the branching between left and right does not occur at the same point you may need to provide ratio of where the branch occurs. The easiest way to do this is set the longer distance point to 1.0 and set the nearer distance to the ratio of two pixel measurement.

In this leaf the left side branches before the right.

We measure the distance on the right. 135.4 pixels.

Measure the distance to the branch on the left. 113.2 pixels.

Pr 1.0

Pl 113.2/135.4 = .836

Step 5: Two More Numbers to Go

Picture of Two More Numbers to Go

The last two number would seem important but really have two different approaches to the same issue. With a Fractal being recursively defined you need to stop at some point. The branches and parts would get so small they could not be printed. The value Smallest sets the smallest diameter that you want rendered. D on the other hand is how big of a diameter do you want to start with. So you can make fat veins with a high D and a large value for Smallest. Or you can make many skinny fine piece. But he layout of the branching is set in either case. D=11 and Smallest=4 is gives a nice look.

Lastly Rn

This is the ratio of one scale to the next scale down. You could measure it with GIMP but measuring the length of one (185.0) and the next (113.9) for a Rn of 113.9/185.0 or .63

But I like to slide it around a bit. I ended up at .81. Again you will be surprised this does not change much about the leaf. It can also change the number of elements generated.

Step 6: Compare the Results

Picture of Compare the Results

We took a real leaf, measured with GIMP, then put the numbers into the Infinity Fractal Leaf Customizer.

You can then screen capture and compare the two in GIMP (maybe that should be another Instructable).

But you can 3D Print or Laser cut following our other Instructables.

Comments

About This Instructable

181views

1favorite

License:

Bio: I am an Assistant Professor of Computer Science at Colorado Mesa University, I recently lead a DARPA DRC Team, and I am one of Americas ... More »
More by karlcastleton:Capture Essence of Leaf With a FractalRecycle Your Own Cardboard BoxTransfiguration Bustle: Laser cut Etched leaf
Add instructable to: