habitat corridors. However this can be explained solely by how they respond to edges; the butterflies’ attraction to edges results in them concentrating in corridors, without having to recognize that these are specific types of edge structures [5]. Thus in order to fully understand how edge properties affect animal movement we need to understand whether reactions to those properties cause emergent effects. Thus the objectives of this study are to use computer simulations to: (1) find out whether effects of edge shapes on animal behavior can arise as emergent properties solely due to reactions to edges in general, without the animals reacting to the shapes of the edges; and (2) generate predictions to allow field and experimental studies to test mechanisms of edge shape response. Methods The general approach was to model individual animals traveling inside a habitat patch that had different kinds of edge shapes. Sizes and shapes of edge types was varied, as was the behavior of the animal to the edge (attraction, avoidance or neutral). I then compared densities and directions of animals at various places near the edge, to see how these were affected by edge shape and animal edge behavior. Simulations were carried out in Mathe- matical 7.0 [6]. Specifically, the habitat patch was 30630 units in size (Figure 1) and contained three types of edge shapes: convex (called ‘‘In’’), concave (called ‘‘Out’’) and straight. The area outside of the patch was assumed to be inhospitable matrix, and thus animals did not leave the patch. The edge shapes were triangularly shaped in order to simplify comparisons, and the bases of the shapes were flared in order to minimize animal reactions to them. The dimensions were large enough to ensure that the edge types did not affect each other, and that the animal’s behavior at the corners did not affect the edge shape responses; to ensure this, trial simulations were first run with different dimensions. Distance from corners to the Straight was 2 units, from a corner to the In and Out shapes was 10 units, between the In and Out shapes was 20 units, and point height was 10 units. These dimensions set the overall dimensions of the patch. I simulated all three types of edge shapes within one patch to make it easier to compare them. I tested all combinations of 4 edge shape widths 63 animal edge behaviors. Edge shape widths were 4, 7, 10, 15 units, and were measured at the width of the base. Animal edge behaviors were avoidance, neutral and attraction. Each run of the simulation used one type of avoidance behavior and was simulated by a run of 2,000,000 steps. The animal movement was simulated using a correlated random walk with independent turning angles distributed with a circular normal distribution [7], with a K-value of 5. Step length was fixed at one unit, and mean turning angle was zero when the animal was not near an edge. Edge behaviors were modeled by variations in mean turning angle. There were two regions where animals reacted to edges: when they detected the edge, and then once they actually intersected it. I modeled these decisions as follows (Figure 2). When the end of a step landed within the detection distance boundary, then the movement model changed to a biased correlated random walk [8,9], with the following mean turning angles, h: Neutral, h = 0; Attraction, h = 0.75 * (angle directly to the edge); Avoidance, h = 0.40 * (angle directly away from the edge). When animals intersected an edge, then their reflecting angles were affected by their edge behavior, with the following step angles, w: Neutral, w = mirror reflection angle; Attraction, w = mirror reflection angle - 0.75 * (angle between mirror Patch Shape Emergent Properties Figure 1. The simulated habitat patch that modeled animals traveled in. The grey areas show the sampling sites for the three different kinds of treatment edges. Size and shape of the edge types was varied. doi:10.1371/journal.pone.0021886.g001 reflection and edge); Avoidance, w = mirror reflection angle - 0.40* (angle between mirror reflection and perpendicular to edge). Note that after intersecting the edge, there was no random component to the new angle. The specific parameters were chosen so that attraction and avoidance would have a similar proportional effect on density - a 5x effect on density adjacent to the edge vs. inside (Figure 3). Animal responses were measured at various positions along the edge and inside from the edge. Response statistics measured were density of locations and three measures of directionality. Densities were standardized by dividing by the mean density in the central part of the patch - thus a density of 1 means no edge effect. I used three independent measures of directionality. The first measured edge-following - i.e. how parallel vs. perpendicular the trails were to the edge of the patch (called ‘‘Edge-following’’ from now on). Edge-following was estimated by |cos(h)|2|sin(h)|, where h = the angle between the animal and the edge. Edge- following was 21 when the trail was perpendicular to the edge, 0 at 45u, and 1 when it was parallel to the edge. The second one measured directionality towards the tip of the treatment, along the edge (called ‘‘To-tip’’ from now on). To-tip was estimated by sin(h), where h = the angle between the animal and the edge, oriented such that h = 0u when pointing towards the edge. To- tip was 1 when the trail pointed towards the center of the treatment and -1 when it pointed away from the center. Thus 0 meant no directionality. To-tip was undefined for the Straight treatment. The final one measured directionality towards the inside of the patch, perpendicular to the edge (called ‘‘To-inside’’ from now on). To-inside was estimated by cos(h), where h = the angle between the animal and the edge, oriented such that h = 90u when the animal pointed towards the inside. To-inside was 1 when the trail pointed towards the mowed area and 1 when it pointed towards the outside. Thus 0 meant no directionality. PLoS ONE | www.plosone.org 2 July 2011 | Volume 6 | Issue 7 | e21886