<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.inthewings.net/index.php?action=history&amp;feed=atom&amp;title=CIS_3020_Project_4</id>
	<title>CIS 3020 Project 4 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.inthewings.net/index.php?action=history&amp;feed=atom&amp;title=CIS_3020_Project_4"/>
	<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;action=history"/>
	<updated>2026-05-06T08:26:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=2015&amp;oldid=prev</id>
		<title>Jka: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=2015&amp;oldid=prev"/>
		<updated>2007-04-05T19:58:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:58, 5 April 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;drawn using the Turtle and Island classes. The shapes that you draw will be fractal&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;drawn using the Turtle and Island classes. The shapes that you draw will be fractal&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;shapes defined with a generator and interpreter that you implement.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;shapes defined with a generator and interpreter that you implement.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===Notes===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* One of the problems with this code is that it is a major memory hog. Beyond about five generations, the memory usage by the program gets so big that it crashes due to out-of-memory errors. A rewrite would be necessary in how it handles the iterations in order to make it be able to handle more than a limited number of generations.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** To do this, we would have to move the drawing stage out from the end to where the end of each branch of a tree iteration would occur.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Background==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Background==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=2014&amp;oldid=prev</id>
		<title>Jka: /* UML Diagram */</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=2014&amp;oldid=prev"/>
		<updated>2007-04-05T19:55:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;UML Diagram&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;a href=&quot;http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;amp;diff=2014&amp;amp;oldid=1981&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=1981&amp;oldid=prev</id>
		<title>Jka at 16:06, 30 March 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=1981&amp;oldid=prev"/>
		<updated>2007-03-30T16:06:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:06, 30 March 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l56&quot; &gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;actual polygon. A method in the class (drawPolygon) will cause each side of the&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;actual polygon. A method in the class (drawPolygon) will cause each side of the&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;polygon to be drawn, turning the appropriate angle between each side.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;polygon to be drawn, turning the appropriate angle between each side.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==UML Diagram==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Image:Project4.png]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=1979&amp;oldid=prev</id>
		<title>Jka at 15:55, 30 March 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.inthewings.net/index.php?title=CIS_3020_Project_4&amp;diff=1979&amp;oldid=prev"/>
		<updated>2007-03-30T15:55:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
In this exercise, you will use a simple string language to define shapes that will be&lt;br /&gt;
drawn using the Turtle and Island classes. The shapes that you draw will be fractal&lt;br /&gt;
shapes defined with a generator and interpreter that you implement.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
To talk about figures (or shapes), we need to define a language describing the shape&lt;br /&gt;
we wish to draw. This language uses a string of characters to represent the actions&lt;br /&gt;
required to draw some specific shape. One simple language definition is:&lt;br /&gt;
&lt;br /&gt;
* “F” represents moving forward some distance (the face)&lt;br /&gt;
* “-” represents turning Right some angle (the face angle)&lt;br /&gt;
* “+” represents turning Left some angle (the face angle)&lt;br /&gt;
&lt;br /&gt;
Assume that the face length is 10 units and that the face angle we are turning (either left&lt;br /&gt;
or right) is 60 degrees. The string “F++F++F” defines an equilateral triangle:&lt;br /&gt;
&lt;br /&gt;
# “F” – move forward 10 units,&lt;br /&gt;
# “+” – turn left 60 degrees,&lt;br /&gt;
# “+” – turn left 60 degrees,&lt;br /&gt;
# “F” – move forward 10 units,&lt;br /&gt;
# “+” – turn left 60 degrees,&lt;br /&gt;
# “+” – turn left 60 degrees, and&lt;br /&gt;
# “F” – move forward 10 units.&lt;br /&gt;
&lt;br /&gt;
Fractals consist of a starting shape, called the Initiator, and a pattern, called the&lt;br /&gt;
Generator. Replacing every side of an Initiator with the Generator creates a new shape,&lt;br /&gt;
the next generation Initiator. For example, suppose our Initiator is the equilateral triangle&lt;br /&gt;
defined above (“F++F++F”) and our Generator is the string “F-F++F-F”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Initiator 0: F++F++F Generator: F-F++F-F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replacing every “F” in Initiator 0 with the Generator creates Initiator 1 shown below.&lt;br /&gt;
Note the use of color in Initiator 1 and the fact that Initiator 1 is scaled so its overall size&lt;br /&gt;
is 10 units on a side (the original side length). Each group of red characters is a&lt;br /&gt;
Generator that has replaced one “F” in Initiator 0. The black “+”s correspond to the two&lt;br /&gt;
groups of two “+”s in Initiator 0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Initiator 1: F-F++F-F++F-F++F-F++F-F++F-F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Subsequent generations (Initiator 2, Initiator 3, etc.) are generated in a similar manner:&lt;br /&gt;
replacing each “F” with the Generator string.&lt;br /&gt;
&lt;br /&gt;
To simplify the process of specifying and drawing a snowflake, we will use two classes,&lt;br /&gt;
a Generator class and an InterpreterTurtle class. The Generator class will be used to&lt;br /&gt;
create a string representing one side of the polygon that we will draw. The side will be&lt;br /&gt;
constructed so the direction that we are facing is the same when we start and end the&lt;br /&gt;
drawing of the side. This only occurs when the string representing a side contains an&lt;br /&gt;
identical number of left and right turns and is reversible (it looks the same going&lt;br /&gt;
forwards or backwards through the string) A string having these characteristics is&lt;br /&gt;
defined to be balanced. As a result, Generator strings must be balanced. For example,&lt;br /&gt;
the string “F-F+F+F-F” is balanced and could represent a side or Generator, while “F-&lt;br /&gt;
F+F+F” is not and could not be used.&lt;br /&gt;
&lt;br /&gt;
The InterpreterTurtle class will use the string created by the Generator class to draw the&lt;br /&gt;
actual polygon. A method in the class (drawPolygon) will cause each side of the&lt;br /&gt;
polygon to be drawn, turning the appropriate angle between each side.&lt;/div&gt;</summary>
		<author><name>Jka</name></author>
		
	</entry>
</feed>