[PDF] Programming project – Draw L-systems in Haskell





Previous PDF Next PDF



Institute of Mathematical Geography

Dec 31 2013 in the Escher Wikipedia reference involving the Escher 'Circle Limit series). The subjects of group theory and of tiling are deep ...



Escher Wyss & Cie.

3/5/2021. Escher Wyss & Cie. - Wikipedia https://en.wikipedia.org/wiki/Escher_Wyss_%26_Cie. 1/2. Escher Wyss AG. Industry. Engineering. Founded 1805.



Self-reference and Evolution of Evolvability Collaborators: Michael

of “blueprints” needed to construct other components of cells and copy itself. M. C. Escher



Programming project – Draw L-systems in Haskell

Jul 17 2019 You can then use these primitives to draw more realistic plants or more artistic tessellations (see Escher's work for inspiration [Wikipedia



Design Patterns By Erich Gamma

Patterns - JournalDevExtreme Programming Explained: Embrace Change. 2nd …Gang of Four Design Patterns - Spring Framework GuruM. C. Escher - Wikipedia.



Rachelle N. Ornan-Stone Ph.D.

rachelle.ornan-stone@boeing



Its Fall Break I dont want to teach

Positive. Jhausauer@wikipedia M. C. Escher Circle Limit III. Page 39. How long is the coastline? www.british-towns.net. Page 40. 2400km. Avsa@wikipedia ...



Technical Report No. 2013-3

May 7 2013 The Moebius Band and Other Surfaces. Saint Louis. University



Automatically Labeling Low Quality Content on Wikipedia by

Aug 7 2021 Our work shows that editing behaviors of Wikipedia editors provide ... Michigan



Antichamber: A strange world

Non-Euclidiean; M.C. Escher are mind-bending psychological puzzles placed in an Escher- ... 2017 from http://antichamber.wikia.com/wiki/Main_Page.

Why is Escher a famous mathematician?

Escher's art became well known among scientists and mathematicians, and in popular culture, especially after it was featured by Martin Gardner in his April 1966 Mathematical Games column in Scientific American. Apart from being used in a variety of technical papers, his work has appeared on the covers of many books and albums.

Who was Maurits C Escher?

The Dutch artist Maurits C. Escher (1898-1972) was a draftsman, book illustrator, tapestry designer, and muralist, but his primary work was as a printmaker. Born in Leeuwarden, Holland, the son of a civil engineer, Escher spent most of his childhood in Arnhem.

How many Escher works are there?

The Gallery's collection includes more than 400 works by Escher: drawings, illustrated books, technical materials, and impressions of 330 of the artist's 450 prints. Hand with Reflecting Sphere, 1935, lithograph, Rosenwald Collection All M.C. Escher works © Cordon Art-Baarn-the Netherlands.

How did Escher influence popular culture?

Escher's special way of thinking and rich graphics have had a continuous influence in mathematics and art, as well as in popular culture . The Escher intellectual property is controlled by the M.C. Escher Company, while exhibitions of his artworks are managed separately by the M.C. Escher Foundation. [j]

P. Thiemann, G. RadanneW intersemester2019/20

Functional Programming

http://proglang.informatik.uni-freiburg.de/teaching/functional-programming/2019/Programming project { Draw L-systems in Haskell

July 17, 2019

Your goal is to create a program to draw L-systems [

Wikipedia

2019b
].L- systemsar ea f ormof grammar that is often used for artistic or simulation purposes, notably in biology [

Prusinkiewicz

and Lindenmayer 1990
]. For instance, the gures below contain two L-systems, one that draws a stylised shrub and another that draws the dragon curve.angle 25 axiom X

X -> F-[[X]+X]+F[+FX]-X

F -> FFFigure 1:L-s ystemfor a f ernangle 90

axiom X

X -> X+YF+

Y -> -FX-YFigure 2:L-s ystemfor t hed ragoncu rve

1 Project

To work on this project you should form groups of two (or exceptionally three) students. The implementation should contain a leReadmedescribing how to compile and use the program. For the nal version, each group should send a le \project-FP-.tar" to both Prof. Peter Thiemann and Gabriel Radanne by email. The email should be titled \project FP". The deadline for the project is the22thJuly 2019. Additionally, each group will make a short presentation (10mins) to the rest of the class about their project and its specicities on the 24 thJuly

2019. There will be feedback, but no formal grade for the project and it will not in

uence the grade of the course. However, one of the exercises of the exam will refer to the project. Additionally, code submitted for the project before the deadline will be accessible during the exam. The project consists of two parts, a core section that all groups should complete and a set of potential extensions. Each group should pick at least two extensions.

2 Core

The core part of this project consists of three components that must be designed and implemented: 1. a par serfor L-s ystems, 2. an e valuatorfor L-s ystem, 1 axiom X

X -> X.X

. -> ...0: X

1: X.X

2: X.X...X.X

3: X.X...X.X.........X.X...X.XFigure 3:A s impleL- systeman di ts rst3 gen erations

hsystemi::=hheaderi*hrulei+ hheaderi::=` axiom'hatomi*j`angle'nj hrulei::=hatomi`->'hatomi* hatomi::=Symbj Id

Figure 4

Lan guageof L- systemsSymbolMeaning

FDraw forward

BDraw backward

fMove forward bMove backward +Rotate right -Rotate left [Push position ]Pop position

Figure 5

T urtlesy mbols

3. a dr awerw hichsh owst here sultingd rawingon s creen.

The syntax for L-systems is presented in g.

4 . An L-system consists of a header, which describes the various default values along with the axiom, and a set of rules. L-systems are similar to grammars. The axiom represents the initial state, while the rules associate a symbol to a list of symbols. Unlike traditional grammars,allrules are executed at the same time. An example of execution of an L-system is shown in g. 3 Finally, some symbols are considered special and have a graphical meaning that pilot aturtle. The turtle starts at a given position with a given orientation. Each symbol is interpreted as an instruction to the turtle. For instance,Fmeans \draw forward",+means \rotate right", and so on. In addition to usual drawing instructions, we have two additional instructions[and]which to save and recall positions using a stack of positions.[pushes the current position to the stack, while]pops the last position and teleports the turtle to it. A summary of the symbols with their graphical meaning is shown in g. 5

2.1 Implementation/Libraries

The following libraries must be used for this project. ParsingWe strongly recommend to use the small parser combinator library\ParserCon.hspro- vided during the course. It also acceptable to use a richer library, such asattoparsec1. GraphicsTheglosslibrary2should be used to implement the L-systems drawer. This library uses openGL to easily draw and animate 2D pictures, using a similar API to the SVG library

developed in Exercise 2. You can start by using the functionGloss.display.Gloss.display :: Gloss.Display -> Gloss.Color -> Gloss.Picture -> IO ()

Command line interfaceYour evaluator should not only accept the L-system to draw, but also a set of parameters to in uence its behavior. For instance,--generationto choose at which generation to stop,--animateto animate the L-system according to section3. 4,--paramto accept additional parameters for section 3. 1 You must implement the command line interface (including documentation!) for your evaluator using theoptparse-applicativepackage3.1 2 TestsAs all libraries, your L-systems implementation should be tested. We recommend using both handwritten L-systems tests and automatic testing usingquickCheck(for the evaluator, in particular). A set of L-systems for testing is provided on the course website.

3 Extensions

Here are a few proposed extensions. You can also invent your own extensions. Further extensions ideas can be found in the ABoP book [

Prusinkiewiczand Li ndenmayer

1990

3.1 Parameterized L-systems

A simple extension to L-systems extends rules withparameters, similar to functions. For instance, the commandFwould take a parameters indicating the length of the line. Such parameters can then be used to avoid the need for the default angle and length. You may also consider allowing various computations over the parameters. For example, here is a rewrite of the\shrub"L-system using parameterized L-systems.axiom X

X -> F(1)L[[X]RX]RF(1)[RF(1)X]LX

L -> -(25)

R -> +(25)

F(l) -> F(l*2)Extend your grammar and your evaluator to support such parameterized rules. Make sure to

properly check and report errors while evaluating.

3.2 Stochastic L-systems

There are also L-systems where multiple rules are available for a given symbol. The applied rules is decided randomly. For instance, here is a randomized \shrub" L-system which can grow either left or right at each generation. Each rule has a weight that in uences the random choice. Such weights could also be combined with the parameters from section 3. 1 .angle 25 axiom X

X -0.7> F-[[X]+X]+F[+FX]-X

X -0.3> F+[[X]-X]-F[-FX]+X

F -> FF3.3 More Graphic Primitives

Glosssupports a wide array of graphic primitives such as colors, text, arcs and arbitrary sprites. Add new symbols to your L-systems language to use these graphical primitives (this might be combined with parameterized L-systems). You can then use these primitives to draw more realistic plants or more artistic tessellations (see Escher's work for inspiration [

Wikipedia

2019a
You can also provides alternative geometries than the traditional euclidean plane. It is notably possible to draw L-systems in hyperbolic geometries.

3.4 Animating L-systems

L-systems are often used to simulate plant growth, where each generation represents a unit of time. Introduce animations (usingGloss.play) to simulate the plant growth. You may also x a generation and animate the movement of the turtle. Improve your drawer to support animations and dene new L-systems that take advantage of it. 3

3.5 Static picture export

Theglosslibrary uses a picture API that is similar to the one we described in Exercise 2 to create SVG images. Extend your program to support static SVG pictures that can be sent to other people or used in a website. Can you also support animations?

3.6 Advanced automatic testing

One challenging aspect of automatically testing evaluators such as the one developed in this project is togenerate valid programs randomly. While this problem is a very dicult in general, the L- systems language is suciently simple to make this problem accessible. Create a newquickCheckgenerator for L-systems programs and use it to test your code.

References

Przemyslaw Prusinkiewicz and Aristid Lindenmayer.The algorithmic beauty of plants. The virtual laboratory. Springer, 1990. ISBN 978-0-387-94676-4. URLhttp://algorithmicbotany.org/ papers/#abop. Wikipedia. M. c. escher | Wikipedia, the free encyclopedia.https://en.wikipedia.org/w/ index.php?title=M._C._Escher&oldid=903447150, 2019a. [Online; accessed 29-June-2019]. Wikipedia. L-system | Wikipedia, the free encyclopedia.https://en.wikipedia.org/w/index. php?title=L-system&oldid=902901535, 2019b. [Online; accessed 26-June-2019].4quotesdbs_dbs26.pdfusesText_32
[PDF] montée et descente

[PDF] maison aux escaliers

[PDF] le retour de sherlock holmes pdf

[PDF] maus bd pdf

[PDF] les archives de sherlock holmes pdf

[PDF] les aventures de sherlock holmes tome 1 pdf

[PDF] maus résumé par chapitre

[PDF] maus art spiegelman analyse tome 1

[PDF] maus art spiegelman résumé court

[PDF] horace corneille fiche de lecture

[PDF] maus bd

[PDF] maus pdf art spiegelman

[PDF] maus art spiegelman questionnaire

[PDF] qcm génétique mendélienne pdf

[PDF] cellule animale et végétale exercice pdf