1
Introduction Traditional quilt designs require precise planning to create complex geometric patterns. Historically, these designs have been sketched with pencil on paper, then redrawn time and again to get them just right. Today, software is available which ranges in feature set and price from the very simple to the extravagant. This project aimed to create a free alternative for casual quilters without sacrificing creativity. Implementation User Interface Future Work Quilting Revolution Sarah Truher Department of Math and Computer Science, Pacific University Acknowledgments For further information Please contact zieg4458@pacificu.edu for more information. Figure 1. These variations on a traditional log cabin design create a larger design with the illusion of curves through color and careful planning. a. Introduces both an eight point star design and a repeated diamond frame with smaller eight-point stars. b. Creates an echoing four- point pattern. For the underlying framework of the site, I decided to use Ruby on Rails. Ruby is a language that is really coming into its own at present and I wanted to work with it. More importantly, the Rails framework makes getting the basics of a website up and running very simple, in addition to handling much of the database backend for you. Since I had no previous experience with programming for the web, this was quite appealing to me. The designer portion of the application was built using ActionScript 3.0 in Adobe’s Flash. ActionScript is a very powerful tool for manipulating graphics with many built-in functions. (a) (b) (c) (d) The user interface was a main focus of this application. I wanted to create something that was both simple and powerful, allowing a wide range of users to feel comfortable with the application. The “Draw Lines” button allows users to click and drag on the canvas to create lines whose endpoints snap to the lattice points. The endpoints of these lines are draggable. Clicking on the “Piecify” button converts the drawn lines into cohesive minimal pieces, filled with the default color. By clicking and holding the fill color box, a different color can be chosen. Clicking on any piece changes its color to the current one displayed. Point s 1 2 3 4 5 1 01 0 1 1 2 1 01 0 1 3 0 1 01 1 4 1 0 1 01 5 1 1 1 1 0 (a) (b) (c) (d) (e) Figure 3. Showing the steps taken by the piece- finding algorithm. a. The design as drawn by the user. b. After finding all endpoints and intersection points. c. After dividing all lines into minimal segments. d. This chart indicates which points share lines with each other. A number 1 indicates a path between the points, a 0 no path. e. Uses the table in 3d to build the smallest This was one of the most challenging and most interesting parts of this project for me. There are a variety of path-finding algorithms out there, but I needed to find a shortest circuit of at least three sides, rather than a shortest path between two discrete points. After doing some research into path- finding, I developed – with some help – my own algorithm to find pieces. After the user creates a design to their satisfaction (a), they hit the “Piecify” button. The first thing the algorithm does is find all discrete end and intersection points (b). Next, all of the lines are fed through a function that breaks them up into minimal segments (c) – i.e., each line contains exactly two points. Using the minimal segments, a two- dimensional array is built showing which points have paths between them (d). The next step is where the magic happens. We iterate through the rows of the array; for each row, we iterate through the columns, searching for a path back to the root. This is done by keeping a list of visited points and following the path with the first 1 we find. However, we essentially “cross off” the point we just came from, ensuring that we don’t just bounce between two The Piece-Finding Algorithm Figure 2. Showing the basic steps of creating a design. a. The first screen a user sees for the designer. b. After drawing a basic shape using the Draw Lines tool. c. Showing the results of hitting the “Piecify” button. d. After changing the fill color of the shape. (a) (b) I would like to thank Shereen Khoja for her continual guidance and enthusiasm, Doug Ryan for never letting me do less than my best, and Chadd Williams for sometimes letting me. Kyle Brickman helped me with ActionScript when I wanted to set fire to my code. My deepest gratitude to my husband, who spent many hours thinking through my problems with me and who pointed me in the right direction for the piece-finder algorithm. I would also like to thank my parents for listening to me complain about my project even when they had no idea what I was talking about. This project wouldn’t be the same without all of them. (a) (b) (c) Figure 4. Three traditional blocks created with the application. a. An Eight-Point Star variation. b. A Pinwheel variation. c. A Four-Patch on point block. I decided on this project because I wanted to create something that I would actually use. For that reason, even though Quilting Revolution is a great proof-of-concept, there are still many things I would like to add. Most important among these is the ability to create a quilt made up of many blocks. The biggest disappointment in this project was having to cut out curves and circles. Although drawing them was not a problem, the math involved in determining where Bezier curves intersect proved too much for me. Other ideas that I’d like to include are the ability to overlay a quilting pattern on a quilt or block, and the addition of borders and sashing.

Introduction Traditional quilt designs require precise planning to create complex geometric patterns. Historically, these designs have been sketched with

  • View
    220

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Introduction Traditional quilt designs require precise planning to create complex geometric patterns. Historically, these designs have been sketched with

IntroductionTraditional quilt designsrequire precise planning to create complex geometricpatterns. Historically, thesedesigns have been sketched with pencil on paper, then redrawn time and again to get them just right. Today,software is available whichranges in feature set and price from the very simpleto the extravagant. This project aimed to create afree alternative for casualquilters without sacrificingcreativity.

Implementation

User Interface Future Work

Quilting RevolutionSarah Truher

Department of Math and Computer Science, Pacific University

Acknowledgments

For further informationPlease contact [email protected] for more information.

Figure 1. These variations on a traditional log cabin design create a larger design with the illusion of curves through color and careful planning.a. Introduces both an eight point star design and a repeated diamond frame with smaller eight-point stars.b. Creates an echoing four- point pattern.

For the underlying framework of the site, I decided to use Ruby on Rails. Ruby is a language that is really coming into its own at present and I wanted to work with it. More importantly, the Rails framework makes getting the basics of a website up and running very simple, in addition to handling much of the database backend for you. Since I had no previous experience with programming for the web, this was quite appealing to me.

The designer portion of the application was built using ActionScript 3.0 in Adobe’s Flash. ActionScript is a very powerful tool for manipulating graphics with many built-in functions.

(a)

(b)

(c)

(d)

The user interface was a main focus of this application. I wanted to create something that was both simple and powerful, allowing a wide range of users to feel comfortable with the application.

The “Draw Lines” button allows users to click and drag on the canvas to create lines whose endpoints snap to the lattice points. The endpoints of these lines are draggable.

Clicking on the “Piecify” button converts the drawn lines into cohesive minimal pieces, filled with the default color.

By clicking and holding the fill color box, a different color can be chosen. Clicking on any piece changes its color to the current one displayed.

Points 1 2 3 4 5

1 0 1 0 1 1

2 1 0 1 0 1

3 0 1 0 1 1

4 1 0 1 0 1

5 1 1 1 1 0

(a)

(b)

(c)

(d)

(e)

Figure 3. Showing the steps taken by the piece-finding algorithm.a. The design as drawn by the user.b. After finding all endpoints and intersection points.c. After dividing all lines into minimal segments. d. This chart indicates which points share lines with each other. A number 1 indicates a path between the points, a 0 no path.e. Uses the table in 3d to build the smallest pieces possible.

This was one of the most challenging and most interesting parts of this project for me. There are a variety of path-finding algorithms out there, but I needed to find a shortest circuit of at least three sides, rather than a shortest path between two discrete points. After doing some research into path-finding, I developed – with some help – my own algorithm to find pieces.

After the user creates a design to their satisfaction (a), they hit the “Piecify” button. The first thing the algorithm does is find all discrete end and intersection points (b).

Next, all of the lines are fed through a function that breaks them up into minimal segments (c) – i.e., each line contains exactly two points. Using the minimal segments, a two-dimensional array is built showing which points have paths between them (d).

The next step is where the magic happens. We iterate through the rows of the array; for each row, we iterate through the columns, searching for a path back to the root. This is done by keeping a list of visited points and following the path with the first 1 we find. However, we essentially “cross off” the point we just came from, ensuring that we don’t just bounce between two points. After we’ve followed one path to completion, we go back one point and see if there are any other possible paths, and so on back to the root. These paths are then sorted to remove repeats, and for each point the shortest possible path is stored and becomes a piece.

The Piece-Finding Algorithm

Figure 2. Showing the basic steps of creating a design. a. The first screen a user sees for the designer.b. After drawing a basic shape using the Draw Lines tool.c. Showing the results of hitting the “Piecify” button.d. After changing the fill color of the shape.

(a)

(b)

I would like to thank Shereen Khoja for her continual guidance and enthusiasm, Doug Ryan for never letting me do less than my best, and Chadd Williams for sometimes letting me. Kyle Brickman helped me with ActionScript when I wanted to set fire to my code. My deepest gratitude to my husband, who spent many hours thinking through my problems with me and who pointed me in the right direction for the piece-finder algorithm. I would also like to thank my parents for listening to me complain about my project even when they had no idea what I was talking about. This project wouldn’t be the same without all of them.

(a)

(b)

(c)

Figure 4. Three traditional blocks created with the application.a. An Eight-Point Star variation.b. A Pinwheel variation.c. A Four-Patch on point block.

I decided on this project because I wanted to create something that I would actually use. For that reason, even though Quilting Revolution is a great proof-of-concept, there are still many things I would like to add. Most important among these is the ability to create a quilt made up of many blocks.

The biggest disappointment in this project was having to cut out curves and circles. Although drawing them was not a problem, the math involved in determining where Bezier curves intersect proved too much for me.

Other ideas that I’d like to include are the ability to overlay a quilting pattern on a quilt or block, and the addition of borders and sashing.