Calculating Fractal Dimension from Vector Images

Similar documents
Data Storage 3.1. Foundations of Computer Science Cengage Learning

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

Algolab Photo Vector

8 Fractals: Cantor set, Sierpinski Triangle, Koch Snowflake, fractal dimension.

Patterns in Pascal s Triangle

Descriptive Statistics

Curve Fitting in Microsoft Excel By William Lee

Graphic Design Studio Guide

Adobe Illustrator CS5 Part 1: Introduction to Illustrator

Formulas, Functions and Charts

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Classroom Tips and Techniques: The Student Precalculus Package - Commands and Tutors. Content of the Precalculus Subpackage

Adobe Illustrator CS5

A Basic Summary of Image Formats

Section 1.1 Linear Equations: Slope and Equations of Lines

Drawing Lines with Pixels. Joshua Scott March 2012

FRACTAL GEOMETRY. Introduction to Fractal Geometry

Multimedia Images: Vector-based vs. Bitmap Graphics

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

Degree Reduction of Interval SB Curves

SEQUENCES ARITHMETIC SEQUENCES. Examples

Basic Understandings

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

MicroStrategy Desktop

Periodontology. Digital Art Guidelines JOURNAL OF. Monochrome Combination Halftones (grayscale or color images with text and/or line art)

DYNAMIC DOMAIN CLASSIFICATION FOR FRACTAL IMAGE COMPRESSION

Fireworks CS4 Tutorial Part 1: Intro

ACE: Illustrator CC Exam Guide

UNIVERSITY OF CALICUT

Flash MX 2004 Animation Lesson

Prentice Hall Mathematics: Course Correlated to: Arizona Academic Standards for Mathematics (Grades 6)

B.A IN GRAPHIC DESIGN

Estimation of Fractal Dimension: Numerical Experiments and Software

Fixplot Instruction Manual. (data plotting program)

Absorbance Spectrophotometry: Analysis of FD&C Red Food Dye #40 Calibration Curve Procedure

Grade level: secondary Subject: mathematics Time required: 45 to 90 minutes

Logo Design Studio Pro Guide

The following is an overview of lessons included in the tutorial.

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

Scientific Graphing in Excel 2010

MovieClip, Button, Graphic, Motion Tween, Classic Motion Tween, Shape Tween, Motion Guide, Masking, Bone Tool, 3D Tool

Visualizing Data: Scalable Interactivity

Logo Symmetry Learning Task. Unit 5

Quickstart for Desktop Version

Rasterization: Where the Term Comes From and What It Does:

WIN32TRACE USER S GUIDE

ART 170: Web Design 1

Lecture 2 Mathcad Basics

Information Literacy Program

OBJECTIVES. Computeraided. Drafting and Design. Drafting vocabulary

Doing Multiple Regression with SPSS. In this case, we are interested in the Analyze options so we choose that menu. If gives us a number of choices:

MARS STUDENT IMAGING PROJECT

Plotting: Customizing the Graph

Portal Connector Fields and Widgets Technical Documentation

R Graphics Cookbook. Chang O'REILLY. Winston. Tokyo. Beijing Cambridge. Farnham Koln Sebastopol

Chapter 6: Constructing and Interpreting Graphic Displays of Behavioral Data

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

GeoGebra Statistics and Probability

To be productive in today s graphic s industry, a designer, artist, or. photographer needs to have some basic knowledge of various file

Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, , , 4-9

MassArt Studio Foundation: Visual Language Digital Media Cookbook, Fall 2013

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

WESTMORELAND COUNTY PUBLIC SCHOOLS Integrated Instructional Pacing Guide and Checklist Computer Math

Spectrophotometry and the Beer-Lambert Law: An Important Analytical Technique in Chemistry

Modeling Tools Objectives. Sweeps and Lofts. Loft Feature

Developing Conceptual Understanding of Number. Set J: Perimeter and Area

Plotting Ordered Pairs on a Four Quadrant Grid Grade Five

PLAY VIDEO. Close- Closes the file you are working on and takes you back to MicroStation V8i Open File dialog.

Printing Guide. MapInfo Pro Version Contents:

Calculator Notes for the TI-Nspire and TI-Nspire CAS

The KaleidaGraph Guide to Curve Fitting

1) Write the following as an algebraic expression using x as the variable: Triple a number subtracted from the number

Numeracy and mathematics Experiences and outcomes

University of Northern Iowa Design Documents Standards. October 2014

Preparing graphics for IOP journals

MapInfo Professional Version Printing Guide

LANDWorksCAD for AutoCAD and Bricscad. Professional Landscape Design Software. Reference and User Manual. CAD International

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

KaleidaGraph Quick Start Guide

Chapter Editing Pictures (Raster Graphics)

Adobe Certified Expert Program

Microsoft Mathematics for Educators:

(Least Squares Investigation)

Vectors. Objectives. Assessment. Assessment. Equations. Physics terms 5/15/14. State the definition and give examples of vector and scalar variables.

Links. Blog. Great Images for Papers and Presentations 5/24/2011. Overview. Find help for entire process Quick link Theses and Dissertations

DWGSee Professional User Guide

EdExcel Decision Mathematics 1

Understanding Gcode Commands as used for Image Engraving

Charlesworth School Year Group Maths Targets

SolidWorks Implementation Guides. Sketching Concepts

Temperature Scales. The metric system that we are now using includes a unit that is specific for the representation of measured temperatures.

Describe the Create Profile dialog box. Discuss the Update Profile dialog box.examine the Annotate Profile dialog box.

For another way to generate recursive sequences, see Calculator Note 1D.

. Learn the number of classes and the structure of each class using similarity between unlabeled training patterns

LESSON 7: IMPORTING AND VECTORIZING A BITMAP IMAGE

The key to successful web design is planning. Creating a wireframe can be part of this process.

Figure 1: Typical S-N Curves

Online Digitizing and Editing of GIS Layers (On-Screen or Head s Up Digitizing)

A Short Introduction to Computer Graphics

Transcription:

Calculating Fractal Dimension from Vector Images Kelly Ran TJHSST Computer Systems Laboratory 2007-2008 1

Abstract Fractal dimension can be used as an index of complexity in research applications. Currently, researchers calculate fractal dimension from images in raster graphics format. This project introduces an alternative method by calculating fractal dimension from vector graphics images. Keywords: fractal dimension, box dimension, vector graphics 1 Introduction 1.1 Fractals The term fractal was first coined by Benoit Mandelbrot. Used to describe geometric figures that exhibit self-similarity, fractals are now used in myriad applications. Every fractal has a numeric fractal dimension that can be used to indicate how complex the fractal is. Multiple methods for calculating fractal dimension have been formulated. The box dimension method is most commonly used in research applications. Raster graphics are images that assign numeric values to every pixel. The values determine the color of each pixel. Vector graphics contain object types like paths and shapes to show images. In research applications, box dimension is calculated from raster images. This paper describes how to calculate box dimension from vector images. It also describes how to display the step-by-step calculations so that users can understand every step of the process. 1.2 Fractal Dimension To calculate fractal dimension using the box dimension method, a square grid of size s is superimposed over the image. N(s), the number of grids that contain part of the image, is counted. Box dimension, D, can be calculated using the following formula: D = log N(s) log 1 s (1) 1.3 Previous Research Fractal dimension is used in many research applications. Previous projects have focused on the correlation between fractals dimension and aspects of the natural world. For example, Corbitt and Garbary found a correlation between fractal dimension and brown algae development. They took photographs of brown algae in different stages of development, calculated the box dimension of the photographs. (Photographs are raster images.) They knew that as the algae developed and grew older, the algae became more complex in shape. Corbitt and Garbary concluded that as algae became more complex, the fractal dimension of the algae increased. 2

1.4 Raster and Vector Graphics Raster graphics is way of representing images. In raster graphics, images are collections of pixels, and numeric color values are stored for each pixel. Bitmap (BMP) is a raster graphics format. Vector graphics is a way of representing images by using primitives like paths (lines and curves) and points. Scalable Vector Graphics (SVG) is a format for creating and displaying vector graphics. Raster graphics have poor resolution when they are examined on small scales. Vector graphics, on the other hand, retain clarity. In this project, only path primitives were used. Paths consist of lines and curves. Path data is usually stored in a single attribute, and consists of commands and coordinates: d= M 200,66 L 266,66 L 266,133 L 200,133 L 200,66 z Commands such as M, L, C, and z indicate what kind of line or curve should be drawn. Research applications of fractal dimension use raster graphics formats. Researchers take digital images (in raster format) and apply the box-counting method, using many grids of variable size on the same image. Their data are plotted on an x-y plane, with log(n(s)) on the y-axis and log(1/s) on the x-axis. Using a linear regression, they find the line of best fit for the data, and D is the slope of that line. 2 Methods 2.1 Tools This project also uses the Processing Development Environment. Processing, a language based on Java, comes with libraries and methods that are useful for creating graphical displays. The Candy library allows users to import SVG files, embed them in graphical displays, and search through them to find information. 2.2 Creation of Vector Graphics Images Using Inkscape, an open source vector graphics editor, images are created. These images include fractals and non-fractal shapes. In order to create fractals, an image is cloned a certain number of times until the desired level of iteration is achieved. For example, to make the Sierpinski Carpet fractal, a black square was cloned 9 times using the Tiled Clones option. The original square and the fifth cloned square were deleted. The remaining eight squares were grouped together and treated like the original square. Finally, all of the squares were transformed from object types to path types. SVG images were black-and-white, with black representing the object whose fractal dimension was to be calculated. 2.3 Calculation of Fractal Dimension The Processing language and environment were used to calculate fractal dimension. The SVG data file was loaded and parsed into an array of strings (each line of the file was an element of the array). Using methods from the Candy library, the SVG image was displayed 3

onscreen. The functions split(string s), trim(), and indexof(string s) were used to process the SVG data file. Information for each path in the file was stored as an array of Coordinates, paths. A global integer was created to keep track of s, grid size. A nested for-loop created an array, grid, that stored the Coordinates of each grid boxs upper-left hand corner. Every element in grid was tested to see if it covered any part of the black object (in the SVG image). Two methods were used: case1() and case2(). The number of elements in grid that covered the object was N(s). S and N(s) were stored in an array called data. Whenever the button step was pressed, the grid size was decreased and the counting process was repeated. D, fractal dimension, was calculated using the 2 most recent additions to data: D = log N(s 2) log N(s 1 ) log 1 s 2 log 1 s 1 (2) 3 Results This project demonstrated that it is feasible to calculate fractal dimension from vector images. In the Sierpinski Carpet example, the calculated fractal dimension had 4.238% error, using all data points. A rectangle had a calculated dimension of 1.874, and a line had a calculated dimension of 0.939. The box-counting method of calculating fractal dimension was shown onscreen. Appendix A shows data. 4 Conclusion In the future, this vector graphics method of calculating fractal dimension may be shown to be more efficient than the raster graphics method. In that case, researchers may be able to save time by converting their raster images to vector images and using the vector graphics method. The properties of vector graphics allow minute image details to be shown. Researchers may want to find the fractal dimension of objects that have such minute detail, and using the vector graphics method may yield the best results in terms of accuracy. Researchers who use computer models of fractals may choose to use the vector graphics representation of their models. 5 Recommendations A useful extension of this project would be to create a function that uploads multiple SVG files at once and writes the corresponding box dimensions to an external file. This would be useful for researchers who need to find fractal dimension en masse. Another extension would be to create a function that calculates box dimension from raster images. The Processing program would time how long the raster image calculations 4

would take, and then compare that with how long the SVG calculations would take. An imcomplete extension calculates a least-squares linear regression from collected data and graphs the data, along with a regression line, on the screen. 6 Acknowledgements Thanks to Mr. Latimer for being my mentor and to my parents for being my parents. 7 Appendix A: Data Figure 1: TABLE 1. Grid size s and number of grid boxes N(s), calculated from a Sierpinski Carpet. Figure 2: TABLE 2. Data calculated from a rectangle References [1] Bourke, P. (1993). Fractal Dimension Calculator Manual. Retrieved 18:09:02 10, 2008, from http://local.wasp.uwa.edu.au/~pbourke/fractals/fracdim/fdc_orig/ 5

Figure 3: TABLE 3. Data calculated from a line [2] Kraft, R. (1995). 3.2 Box Dimension. Retrieved 18:12:04 10, 2008, from http://www. weihenstephan.de/ane/dimensions/subsection3_4_2.html [3] Lilley, C., & Schepers, D. (2007). Scalable Vector Graphics (SVG). Retrieved 18:07:31 10, 2008, from http://www.w3.org/graphics/svg/ [4] Peterson, I. (1993). From surface scum to fractal swirls., 53. Retrieved 18:09:40 10, 2008, from http://www.jstor.org/view/00368423/ap070941/07a00070/0? currentresult=00368423%2bap070941%2b07a00070%2b0%2c03&searchurl=http% 3A%2F%2Fwww.jstor.org%2Fsearch%2FBasicResults%3Fhp%3D25%26si%3D1%26gw% 3Djtx%26jtxsi%3D1%26jcpsi%3D1%26artsi%3D1%26Query%3Dfractal%2Bdimension% 26wc%3Don [5] Sutherland, S. (Tran.). (2002). Fractal Dimension (S. Sutherland, Tran.). Retrieved 18:12:37 10, 2008, from http://www.math.sunysb.edu/~scott/book331/fractal_ Dimension.html 6