Recur Documentation Release 1.0

Total Page:16

File Type:pdf, Size:1020Kb

Recur Documentation Release 1.0 recur Documentation Release 1.0 panopticonopolis Oct 16, 2019 Contents: 1 Getting Started 3 1.1 Introduction: Another Guide To Recursion? And Why Is It So Long?.................3 1.2 Scope, Frame and Stack.........................................4 1.3 Recursion in Light of Frames...................................... 10 1.4 Counting In Recursion.......................................... 14 1.5 Recursion and Swapped Arguments................................... 18 1.6 Palindromes and Recursion-as-Evaluation................................ 21 1.7 Summing a List of Lists......................................... 26 1.8 Using Recursion to Make More: The Power Set............................. 35 1.9 Expanding a Series: Pascal’s Triangle.................................. 41 1.10 Multiple Recursive Calls: Fibonacci Sequence, Part 1......................... 49 1.11 Memoization: Fibonacci Sequence, Part 2................................ 55 1.12 Recursive Approaches To Searching And Sorting............................ 62 1.13 Recursion and Self-Similarity: Koch Curves.............................. 71 1.14 The Sierpinski Triangle......................................... 81 1.15 Lindenmayer Systems.......................................... 92 1.16 Solving L-System Recursion....................................... 96 1.17 Boss Level: The Tower of Hanoi..................................... 104 2 Indices and tables 117 i ii recur Documentation, Release 1.0 A shamelessly verbose guide to the wonders of recursion Contents: 1 recur Documentation, Release 1.0 2 Contents: CHAPTER 1 Getting Started For a lot of people, learning recursion for the first time pretty much sucks. It doesn’t have to be that way. This guide is intended to help beginning (and perhaps even intermediate) programmers learn to think recursively. It’s not math-heavy, so there are no proofs, and very little discussion of time/space complexity. But I do take a text-heavy approach, because I think patient explanation is a key ingredient in helping people understand this crucial technique. Although the code is presented in Python, recursion is a fairly universal concept, so the material should be accessible to non-Python developers. Sometimes I’ll present the code immediately and then unpack it. Other times, we’ll work towards the final recursive solution, starting only from first principles. At the end of each section I deduce a few heuristics, and include an exercise or two that will apply the material and push comprehension a bit further. I hope the end result is a critical framework developers can use to identify, analyze and solve problems that demand (or simply favor) recursive solutions. 1.1 Introduction: Another Guide To Recursion? And Why Is It So Long? Oftentimes algorithms are presented to beginning programmers as recipes or to-do lists. You may have a to-do list that starts with ‘pick up the kids from school’, then realize that, you first must put gas in the car. But first of all, you need to find your car keys. You can’t do the last step unless you’ve done all the other ones. If you’re baking a cake, the final step may be to frost the cake, but not before you have taken the cake out of the oven, which of course requires you to make the cake in the first place, in addition to preparing the frosting, etc. Of course, there is nothing particularly recursive about this. Breaking a problem down into more manageable sub- problems is true of algorithmic design in general. What makes recursion unique in algorithmic thinking is the fact that it’s about designing a solution in such a way that, simply by running the same function over and over with slightly modified inputs, you can have your cake and eat it too. The following guide to recursion is undoubtedly long. But that is because most material currently available online is simply too short. Recursion is an extremely compact method. While this allows for a presentation that is usually considered ‘elegant’, the practical consequence is that much of the program execution takes place implicitly. 3 recur Documentation, Release 1.0 For example, it’s not terribly difficult to understand the principle of recursive action, whether generally or for a specific piece of code. But, as with any algorithm, the ability to write out the actual process of computation on a line-by-line basis is where the rubber meets the road. As a result, much of the length of this document is due to the fact that I have annotated what actually happens when a function undergoes recursive computation, using print statements to trace inputs, transformations and outputs. It’s also long because the usual ways of presenting problems and their recursive solutions is inadequate. Usually, the code is simply given ex cathedra, or perhaps accompanied with a brief commentary on its salient aspects. With recursion, there is an abiding mystery of just how we got to that solution. Although it’s not true for every algorithm I’ve chosen to present here, in this guide I prefer to describe how to think about the problem, and then how to convert that critical thinking into code. If you understand recursion on an intuitive level, this guide is most likely not for you. It will be boring and obvious. But for many others, it’s my hope that the explanations of how recursive calls and returns work will be time well spent. The following text uses Python 3.6 but the concepts should be broadly applicable to many languages. A solid work- ing knowledge of Python is preferred, including the basic data types and their associated methods. (Virtually) no familiarity with object-oriented techniques is needed. 1.2 Scope, Frame and Stack The most common way of introducing recursion to programmers involves two seemingly simple steps. Given a programming language that allows a function to call itself, we construct a recursive function once we do two things: 1) Identify the base case 2) Identify the recursive case We formulate these two cases by successfully reducing the problem at hand to ‘its simplest possible solution’, whatever that means. This, as the saying goes, is necessary but not sufficient, and there’s much that still needs to be unpacked. The purpose of this guide is to provide the reader with a toolbox of heuristics that can be used to quickly analyze a recursive algorithm. Once the reader is comfortable with analysis, the same set of heuristics can be applied to thinking about a problem recursively, and constructing a solution. 1.2.1 Understanding how functions work Recursion is commonly introduced to students within the context of iterative procedures, especially for loops, ‘but with functions’. This is the first source of misunderstanding. Recursion is better considered as a consequence of func- tional scope, frames and the call stack. Put differently, we understand recursion when we understand how functions prioritize, quarantine, and share values bound to variables and the evaluation of expressions (scope), and the way those spaces are created and then discarded (frames added to and subtracted from the stack). This may make little sense in the abstract, so let’s look at some code. Just about the simplest program we can write is: hello="Hello, World!" print(hello) >>> Hello, World! In this program, there is only one frame in the stack, known as the global frame. We could add a few more variables and statements and what not, and everything would still belong to this global frame. All variables and their associated values would be just as available to any further statement we chose to write (although variables used for iterating over loops don’t have this sort of permanence). 4 Chapter 1. Getting Started recur Documentation, Release 1.0 This changes when we introduce functions. Every time we call (as opposed to merely define) a function, a new frame is created, and is added to the stack. At the same time, the flow of control passes to that frame. The usual analogy is a stack of cafeteria trays: the global frame is the first tray. When we call a function from the global frame, the new frame is placed on top of it. When that function completes its computation, it returns its results, and the frame is discarded. In terms of our analogy, we can put what we want on the tray, then remove it from the top of the stack. The tray beneath it is now available for plating food, or whatever it is we want to do with it. This kind of ordering is commonly known as LIFO, or Last In First Out. Of course, if the function calls another function and is waiting for results, then its frame remains open or ‘on the stack’. But as mentioned, while there may be numerous frames open at any given point during a program’s runtime, the Python interpreter is always executing the current computation within the context of a specific frame. This will be extremely important to keep in mind as we begin to understand recursion. Part of what makes frames valuable is that they regulate the accessibility of a function’s variables, otherwise known as scope. For example, consider this trivial function: def foo(x): return x x= 12 print(foo(x)) >>> 12 Easy enough. But consider that we also get 12 if we write: def foo(y): return y x= 12 print(foo(x)) Or even if we write: def foo(y): return x x= 12 print(foo(x)) This is scope at work. When we first specify x = 12 we do in at the global frame of the program. When we pass x to foo(), the function’s parameter doesn’t care if the argument in print(foo(_)) is x or q or whatever, but only that it is of the correct type. Otherwise the function can’t perform its computation. But once the argument is passed to the function, we must refer to it within the function as it was named in the function definition, ie, foo(y).
Recommended publications
  • Review Article Survey Report on Space Filling Curves
    International Journal of Modern Science and Technology Vol. 1, No. 8, November 2016. Page 264-268. http://www.ijmst.co/ ISSN: 2456-0235. Review Article Survey Report on Space Filling Curves R. Prethee, A. R. Rishivarman Department of Mathematics, Theivanai Ammal College for Women (Autonomous) Villupuram - 605 401. Tamilnadu, India. *Corresponding author’s e-mail: [email protected] Abstract Space-filling Curves have been extensively used as a mapping from the multi-dimensional space into the one-dimensional space. Space filling curve represent one of the oldest areas of fractal geometry. Mapping the multi-dimensional space into one-dimensional domain plays an important role in every application that involves multidimensional data. We describe the notion of space filling curves and describe some of the popularly used curves. There are numerous kinds of space filling curves. The difference between such curves is in their way of mapping to the one dimensional space. Selecting the appropriate curve for any application requires knowledge of the mapping scheme provided by each space filling curve. Space filling curves are the basis for scheduling has numerous advantages like scalability in terms of the number of scheduling parameters, ease of code development and maintenance. The present paper report on various space filling curves, classifications, and its applications. It elaborates the space filling curves and their applicability in scheduling, especially in transaction. Keywords: Space filling curve, Holder Continuity, Bi-Measure-Preserving Property, Transaction Scheduling. Introduction these other curves, sometimes space-filling In mathematical analysis, a space-filling curves are still referred to as Peano curves. curve is a curve whose range contains the entire Mathematical tools 2-dimensional unit square or more generally an The Euclidean Vector Norm n-dimensional unit hypercube.
    [Show full text]
  • Fractal Texture and Structure of Central Place Systems
    Fractal Texture and Structure of Central Place Systems Yanguang Chen (Department of Geography, College of Urban and Environmental Sciences, Peking University, Beijing 100871, P.R. China. Email: [email protected]) Abstract: The boundaries of central place models proved to be fractal lines, which compose fractal texture of central place networks. A textural fractal can be employed to explain the scale-free property of regional boundaries such as border lines, but it cannot be directly applied to spatial structure of real human settlement systems. To solve this problem, this paper is devoted to deriving structural fractals of central place models from the textural fractals. The method is theoretical deduction based on the dimension rules of fractal sets. The textural fractals of central place models are reconstructed, the structural dimensions are derived from the textural dimensions, and the central place fractals are formulated by the k numbers and g numbers. Three structural fractal models are constructed for central place systems according to the corresponding fractal dimensions. A theoretical finding is that the classic central place models comprise Koch snowflake curve and Sierpinski space filling curve, and an inference is that the traffic principle plays a leading role in urban and rural evolution. The conclusion can be reached that the textural fractal dimensions can be converted into the structural fractal dimensions. The latter dimensions can be directly used to appraise urban and rural settlement distributions in the real world. Thus, the textural fractals can be indirectly utilized to explain the development of the systems of human settlements. Key words: Central place fractals; Systems of human settlement; Fractal dimension; Koch snowflake; Sierpinski space-filling curve; Gosper island 1.
    [Show full text]
  • Efficient Neighbor-Finding on Space-Filling Curves
    Universitat¨ Stuttgart Efficient Neighbor-Finding on Space-Filling Curves Bachelor Thesis Author: David Holzm¨uller* Degree: B. Sc. Mathematik Examiner: Prof. Dr. Dominik G¨oddeke, IANS Supervisor: Prof. Dr. Miriam Mehl, IPVS October 18, 2017 arXiv:1710.06384v3 [cs.CG] 2 Nov 2019 *E-Mail: [email protected], where the ¨uin the last name has to be replaced by ue. Abstract Space-filling curves (SFC, also known as FASS-curves) are a useful tool in scientific computing and other areas of computer science to sequentialize multidimensional grids in a cache-efficient and parallelization-friendly way for storage in an array. Many algorithms, for example grid-based numerical PDE solvers, have to access all neighbor cells of each grid cell during a grid traversal. While the array indices of neighbors can be stored in a cell, they still have to be computed for initialization or when the grid is adaptively refined. A fast neighbor- finding algorithm can thus significantly improve the runtime of computations on multidimensional grids. In this thesis, we show how neighbors on many regular grids ordered by space-filling curves can be found in an average-case time complexity of (1). In 풪 general, this assumes that the local orientation (i.e. a variable of a describing grammar) of the SFC inside the grid cell is known in advance, which can be efficiently realized during traversals. Supported SFCs include Hilbert, Peano and Sierpinski curves in arbitrary dimensions. We assume that integer arithmetic operations can be performed in (1), i.e. independent of the size of the integer.
    [Show full text]
  • Space & Electronic Warfare Lexicon
    1 Space & Electronic Warfare Lexicon Terms 2 Space & Electronic Warfare Lexicon Terms # - A 3 PLUS 3 - A National Missile Defense System using satellites and ground-based radars deployed close to the regions from which threats are likely. The space-based system would detect the exhaust plume from the burning rocket motor of an attacking missile. Forward-based radars and infrared-detecting satellites would resolve smaller objects to try to distinguish warheads from clutter and decoys. Based on that data, the ground-based interceptor - a hit-to-kill weapon - would fly toward an approximate intercept point, receiving course corrections along the way from the battle management system based on more up-to-date tracking data. As the interceptor neared the target its own sensors would guide it to the impact point. See also BALLISTIC MISSILE DEFENSE (BMD.) 3D-iD - A Local Positioning System (LPS) that is capable of determining the 3-D location of items (and persons) within a 3-dimensional indoor, or otherwise bounded, space. The system consists of inexpensive physical devices, called "tags" associated with people or assets to be tracked, and an infrastructure for tracking the location of each tag. NOTE: Related technology applications include EAS, EHAM, GPS, IRID, and RFID. 4GL - See FOURTH GENERATION LANGUAGE 5GL - See FIFTH GENERATION LANGUAGE A-POLE - The distance between a missile-firing platform and its target at the instant the missile becomes autonomous. Contrast with F-POLE. ABSORPTION - (RF propagation) The irreversible conversion of the energy of an electromagnetic WAVE into another form of energy as a result of its interaction with matter.
    [Show full text]
  • Hierarchical Hexagonal Clustering and Indexing
    S S symmetry Article Hierarchical Hexagonal Clustering and Indexing VojtˇechUher 1,*, Petr Gajdoš 1, Václav Snášel 1, Yu-Chi Lai 2 and Michal Radecký 1 1 Department of Computer Science, VŠB-Technical University of Ostrava, Ostrava-Poruba 708 00, Czech Republic; [email protected] (P.G.); [email protected] (V.S.); [email protected] (M.R.) 2 Department of Computer Science and Information Engineering, National Taiwan University of Science and Technology, 43, Sec.4, Keelung Rd., Taipei 106, Taiwan; [email protected] * Correspondence: [email protected] Received: 25 April 2019; Accepted: 23 May 2019; Published: 28 May 2019 Abstract: Space-filling curves (SFCs) represent an efficient and straightforward method for sparse-space indexing to transform an n-dimensional space into a one-dimensional representation. This is often applied for multidimensional point indexing which brings a better perspective for data analysis, visualization and queries. SFCs are involved in many areas such as big data analysis and visualization, image decomposition, computer graphics and geographic information systems (GISs). The indexing methods subdivide the space into logic clusters of close points and they differ in various parameters including the cluster order, the distance metrics, and the pattern shape. Beside the simple and highly preferred triangular and square uniform grids, the hexagonal uniform grids have gained high interest especially in areas such as GISs, image processing and data visualization for the uniform distance between cells and high effectiveness of circle coverage. While the linearization of hexagons is an obvious approach for memory representation, it seems there is no hexagonal SFC indexing method generally used in practice.
    [Show full text]
  • Pftrail V1.01 Manual
    pftrail v1.01 manual Herman Haverkort 31 March 2020 pftrail is a software package to render plane-filling curves and traversals as three-dimensional digital models, that are output in collada format. These models can subsequently be imported in software such as Blender, to study them and to create photo-realistic images (due to fragile or degenerate features, the models produced by the current version of the software may not be suitable for 3D printing). The software is provided as a c++-source which can be compiled and run from the command line. It has been tested on Linux and MacOS systems. The package includes the following files: pftrail.cpp, ifs-classics, ifs-inventions, generate-preamble.cpp, colours, postamble, and this manual. New versions of the package may be available from http://spacefillingcurves.net or http://herman.haverkort.net. Copyright 2020 Herman Johannes Haverkort. Licensed under the Apache License, Version 2.0, see the other package files for details. Contents 1 Underlying concepts 2 1.1 Plane-filling curves 2 1.2 Defining plane-filling curves 2 1.3 Visualising plane-filling curves as plane-filling trails 3 2 How to set-up the software 6 3 How to use the software 6 4 Writing plane-filling traversal definitions 6 4.1 Defining a plane-filling curve 6 4.2 Organizing plane-filling curves in files 7 4.3 Traversals with jumps 8 4.4 Traversals with multiple generators 9 4.5 Traversals with coinciding end points 10 5 Defining scene settings 11 5.1 Writing view configurations 11 5.2 Selecting view configurations 12 6 pftrail command line options
    [Show full text]
  • Attractors and Repellers of Koch Curves
    Attractors and repellers of Koch curves Przemyslaw Prusinkiewicz and Glen Sandness Abstract This paper presents two methods for generating Koch curves, analogous to the commonly used iterative methods for producing images of Julia sets. The attractive method is based on a characterization of Koch curves as the smallest nonempty sets closed with respect to a union of similarities on the plane. This characterization was first studied by Hutchinson. The repelling method is in principle dual to the attractive one, but involves a nontrivial problem of selecting the appropriate transformation to be applied at each iteration step. Both methods are illustrated with a number of computer−generated images. The mathematical presentation emphasizes the relationship between Koch construction and formal languages theory. Reference P. Prusinkiewicz and G. Sandness: Attractors and repellers of Koch curves. Proceedings of Graphics Interface '88, pp. 217−228. ATTRACTORS AND REPELLERS OF KOCH CURVES PrzemyslawPrusinkiewicz and Glen Sandness Departmentof ComputerScience University of Regina Regina, Saskatchewan,Canada S4S OA2 ABSTRACT struction consists of recursively replacing edges of an This paper presents two methods for generating Koch arbitrary polygon (called the initiator) by an open polygon curves, analogousto the commonly used iterative methods (the generator), reduced and displaced so as to have the for producing images of Julia sets. The attractive methodis same end points as those of the interval being replaced. basedon a characterizationof Koch curves as the smallest (The original construction [Koch 1905] was limited to the nonemptysets closed with respect to a union of similarities definition of the now famous "snowflake" curve.) As pointed on the plane.
    [Show full text]
  • Rafael De Andrade Sousa Utilização De Múltiplas
    RAFAEL DE ANDRADE SOUSA UTILIZAÇÃO DE MÚLTIPLAS REPRESENTAÇÕES EXTERNAS PARA CONSTRUÇÃO DE FRACTAIS EM AMBIENTES EXPLORATÓRIOS DE APRENDIZAGEM Proposta de Dissertação de Mestrado apre- sentada ao Programa de Pós-Graduação em Informática, Setor de Ciências Exatas, Uni- versidade Federal do Paraná. Orientador: Prof. Dr. Alexandre Ibrahim Direne CURITIBA 2010 RAFAEL DE ANDRADE SOUSA UTILIZAÇÃO DE MÚLTIPLAS REPRESENTAÇÕES EXTERNAS PARA CONSTRUÇÃO DE FRACTAIS EM AMBIENTES EXPLORATÓRIOS DE APRENDIZAGEM Dissertação apresentada como requisito par- cial à obtenção do grau de Mestre. Pro- grama de Pós-Graduação em Informática, Setor de Ciências Exatas, Universidade Fe- deral do Paraná. Orientador: Prof. Dr. Alexandre Ibrahim Direne CURITIBA 2010 RAFAEL DE ANDRADE SOUSA UTILIZAÇÃO DE MÚLTIPLAS REPRESENTAÇÕES EXTERNAS PARA CONSTRUÇÃO DE FRACTAIS EM AMBIENTES EXPLORATÓRIOS DE APRENDIZAGEM Dissertação apresentada como requisito par- cial à obtenção do grau de Mestre. Pro- grama de Pós-Graduação em Informática, Setor de Ciências Exatas, Universidade Fe- deral do Paraná. Orientador: Prof. Dr. Alexandre Ibrahim Direne CURITIBA 2010 RAFAEL DE ANDRADE SOUSA UTILIZAÇÃO DE MÚLTIPLAS REPRESENTAÇÕES EXTERNAS PARA CONSTRUÇÃO DE FRACTAIS EM AMBIENTES EXPLORATÓRIOS DE APRENDIZAGEM Dissertação aprovada como requisito parcial à obtenção do grau de Mestre no Programa de Pós-Graduação em Informática da Universidade Federal do Paraná, pela Comissão formada pelos professores: Orientador: Prof. Dr. Alexandre Ibrahim Direne Departamento de Informática, UFPR Prof. Dr. Davidson Cury Departamento de Informática, Universidade Federal do Espírito Santo Prof. Dr. Andrey Ricardo Pimentel Departamento de Informática, Universidade Federal do Paraná Curitiba, 30 de agosto de 2010 i AGRADECIMENTOS A Deus, pela imerecida Graça que tenho recebido desde o meu nascimento pois até aqui me ajudou o Senhor.
    [Show full text]
  • Sixteen Space-Filling Curves and Traversals for D-Dimensional Cubes and Simplices
    Sixteen space-filling curves and traversals for d-dimensional cubes and simplices Citation for published version (APA): Haverkort, H. J. (2017). Sixteen space-filling curves and traversals for d-dimensional cubes and simplices. arXiv, 1-28. [1711.04473]. Document status and date: Published: 13/11/2017 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal.
    [Show full text]
  • Fractal Examples Handout
    (Adapted from “List of fractals by Hausdorff dimension”, Wikipedia) Approx. Exact dimension Name Illustration dimension 2 log 3 1.12915 Contour of the Gosper island 7 ( ) 1.2083 Fibonacci word fractal 60° 3 log φ 3+√13 log� 2 � Solution of Boundary of the tame 1.2108 2 1 = 2 twindragon 2− 2 − log 4 1.2619 Triflake 3 log 4 1.2619 Koch curve 3 Boundary of Terdragon log 4 1.2619 curve 3 log 4 1.2619 2D Cantor dust 3 (Adapted from “List of fractals by Hausdorff dimension”, Wikipedia) log 4 1.2619 2D L-system branch 3 log 5 1.4649 Vicsek fractal 3 Quadratic von Koch curve log 5 1.4649 (type 1) 3 log 1.4961 Quadric cross 10 √5 � 3 � Quadratic von Koch curve log 8 = 1.5000 3 (type 2) 4 2 log 3 1.5849 3-branches tree 2 (Adapted from “List of fractals by Hausdorff dimension”, Wikipedia) log 3 1.5849 Sierpinski triangle 2 log 3 1.5849 Sierpiński arrowhead curve 2 Boundary of the T-square log 3 1.5849 fractal 2 log = 1.61803 A golden dragon � 1 + log 2 1.6309 Pascal triangle modulo 3 3 1 + log 2 1.6309 Sierpinski Hexagon 3 3 log 1.6379 Fibonacci word fractal 1+√2 Solution of Attractor of IFS with 3 + + 1.6402 similarities of ratios 1/3, 1/2 1 1 and 2/3 3 = 12 � � � � 2 �3� (Adapted from “List of fractals by Hausdorff dimension”, Wikipedia) 32-segment quadric fractal log 32 = 1.6667 5 (1/8 scaling rule) 8 3 1 + log 3 1.6826 Pascal triangle modulo 5 5 50 segment quadric fractal 1 + log 5 1.6990 (1/10 scaling rule) 10 4 log 2 1.7227 Pinwheel fractal 5 log 7 1.7712 Hexaflake 3 ( ) 1.7848 Von Koch curve 85° log 4 log 2+cos 85° log 6 1.8617 Pentaflake
    [Show full text]
  • Real Time Transformation of Musical Material with Fractal Algorithms
    Real Time Transformation of Musical Material with Fractal Algorithms Gary Lee Nelson Conservatory of Music Oberlin, OH 44074 (440) 775-8223 [email protected] Introduction This paper is a chronicle of the composition of four pieces during the period 1988-1993: Fractal Mountains (1988-89) Summer Song (1991) Mountain Song (1992) Goss (1993) All of these pieces are part of my ongoing research and interest in the application of mathematical models and techniques to the composition of musical form and structure. In "Fractal Mountains," I used recursive subdivision of time, pitch, and amplitude in a fractal algorithm that generates an accompaniment from material played freely on a MIDI wind controller (the "MIDI Horn"). The piece was realized entirely in electronic sound. "Fractal Mountains" won first prize in the international competition for micro tonal music at the 1988 Third Coast New Music Festival in San Antonio and has been recorded on CD by Wergo [1]. In "Summer Song," I used a symbolic replacement grammar (Lindenmayer Systems) to create the formal structure in a work for solo flute. The first and second pieces were written separately without any relationship to each other. The third piece is a combination of the first two wherein the solo line from "Summer Song" is transformed in real time by a modified and enhanced version of the fractal algorithm from "Fractal Mountains." This work is performed with a Macintosh computer, digital synthesizers, and the MIDI Horn. MIDI Horn The MIDI Horn is as an alternative to the piano keyboard for controlling digital synthesizers. John Talbert, Oberlin's music engineer, designed and constructed the instrument.
    [Show full text]
  • Plane-Filling Trails
    Plane-filling trails Herman Haverkort Universität Bonn, Germany http://herman.haverkort.net/ [email protected] Abstract The order in which plane-filling curves visit points in the plane can be exploited to design efficient algorithms. Typically, the curves are useful because they preserve locality: points that are close to each other along the curve tend to be close to each other in the plane, and vice versa. However, sketches of plane-filling curves do not show this well: they are hard to read on different levels of detail and it is hard to see how far apart points are along the curve. This paper presents a software tool to produce compelling visualisations that may give more insight in the structure of the curves. Keywords and phrases space-filling curve, plane-filling curve, spatial indexing Related Version A short version of this paper with supplements has been conditionally accepted to the 2020 Computational Geometry Week Media Exposition. Supplement Material For software and additional figures, visit http://spacefillingcurves.net. Plane-filling curves A plane-filling curve is a continuous surjective mapping f from the unit interval to a subset of the plane that has positive area, that is, Jordan content. Although such a mapping cannot be one-to-one, an unambiguous inverse can be defined with a tie-breaking rule. Thus, the mapping provides an order in which to process points in the plane. Famous examples include Pólya’s triangle-filling curve [13] and square-filling curves by Peano [12] and Hilbert [8]. Continuity of the mapping is not always required: if we drop this requirement, we speak of plane-filling traversals.
    [Show full text]