Difference between revisions of "Branch Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
Line 4: Line 4:
  
 
=Code to Implement=
 
=Code to Implement=
 +
==Turtle==
 +
 +
==OpenGLStackUtils==
 +
<nowiki>class OpenGLStackUtils
 +
  def self.push_do_pop
 +
    raise :not_yet_implemented
 +
  end
 +
end<nowiki>
 +
 
==Branch==
 
==Branch==
 
  <nowiki>class Branch
 
  <nowiki>class Branch
   def render
+
   def branch(length, line_width_in_pixels, depth_remaining)
 +
    raise :not_yet_implemented
 
   end
 
   end
 
end</nowiki>
 
end</nowiki>
  
 
{| class="wikitable" style="text-align: center; "
 
{| class="wikitable" style="text-align: center; "
|[[File:Branch_0.svg]]
+
|[[File:Branch_MaxDepth0.png]]
|[[File:Branch_1.svg]]
+
|[[File:Branch_MaxDepth1.png]]
|[[File:Branch_2.svg]]
+
|[[File:Branch_MaxDepth2.png]]
|[[File:Branch_3.svg]]
+
|[[File:Branch_MaxDepth3.png]]
|[[File:Branch_4.svg]]
+
|[[File:Branch_MaxDepth4.png]
|[[File:Branch_5.svg]]
+
|[[File:Branch_MaxDepth5.png]]
|[[File:Branch_6.svg]]
 
|[[File:Branch_7.svg]]
 
 
|-
 
|-
|iter=0
+
|max_depth: 0
|iter=1
+
|max_depth: 1
|iter=2
+
|max_depth: 2
|iter=3
+
|max_depth: 3
|iter=4
+
|max_depth: 4
|iter=5
+
|max_depth: 5
|iter=6
 
|iter=7
 
 
|}
 
|}

Revision as of 08:25, 24 November 2020

Lindenmayer system

Dragon trees.jpg


Code to Implement

Turtle

OpenGLStackUtils

class OpenGLStackUtils
  def self.push_do_pop
    raise :not_yet_implemented
  end
end<nowiki>

==Branch==
 <nowiki>class Branch
  def branch(length, line_width_in_pixels, depth_remaining)
    raise :not_yet_implemented
  end
end
Branch MaxDepth0.png Branch MaxDepth1.png Branch MaxDepth2.png Branch MaxDepth3.png [[File:Branch_MaxDepth4.png] Branch MaxDepth5.png
max_depth: 0 max_depth: 1 max_depth: 2 max_depth: 3 max_depth: 4 max_depth: 5