Difference between revisions of "Recursive Circles Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
(Created page with "=Motivation= We will recursively generate some images with the [https://docs.racket-lang.org/teachpack/2htdpimage.html Racket Image Library]. =Code To Investigate= ==Racket I...")
 
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._beside%29%29 beside]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._beside%29%29 beside]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._above%29%29 above]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._above%29%29 above]
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._overlay%29%29 overlay] [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._overlay%2Falign%29%29 overlay/align]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._rotate%29%29 rotate]
 
 
===shapes===
 
===shapes===
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._triangle%29%29 triangle]
 
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._circle%29%29 circle]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._circle%29%29 circle]
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._square%29%29 square]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._rectangle%29%29 rectangle]
 
* [https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._frame%29%29 frame]
 
  
 
=Shrinking Circles=
 
=Shrinking Circles=
{{RacketToImplement|sierpinski|sierpinski-triangle<br>sierpinski-carpet|sierpinski_and_cantor}}
+
{{RacketToImplement|shrinking_to_the_right_circles|shrinking-to-the-right-circles|recursive_circles}}
  
  <nowiki>(define (sierpinski-triangle side-length n)
+
  <nowiki>(outside-circles radius n)
 
   (raise 'not-yet-implemented #t))</nowiki>
 
   (raise 'not-yet-implemented #t))</nowiki>
  
 
{| class="wikitable" style="text-align: center; "
 
{| class="wikitable" style="text-align: center; "
 
|[[File:Shrinking-to-the-right-circles_0.svg|200px]]
 
|[[File:Shrinking-to-the-right-circles_0.svg|200px]]
|[[File:Shrinking-to-the-right-circles_1.svg|200px]]
+
|[[File:Shrinking-to-the-right-circles_1.svg|300px]]
|[[File:Shrinking-to-the-right-circles_2.svg|200px]]
+
|[[File:Shrinking-to-the-right-circles_2.svg|350px]]
|[[File:Shrinking-to-the-right-circles_3.svg|200px]]
+
|[[File:Shrinking-to-the-right-circles_3.svg|375px]]
|[[File:Shrinking-to-the-right-circles_4.svg|200px]]
+
|[[File:Shrinking-to-the-right-circles_4.svg|387px]]
 
|-
 
|-
 
|n=0
 
|n=0
Line 37: Line 31:
  
 
=Outside Circles=
 
=Outside Circles=
{{RacketToImplement|cantor|cantor-stool|sierpinski_and_cantor}}
+
{{RacketToImplement|outside_circles|outside-circles|recursive_circles}}
  
==Stool==
+
  <nowiki>(outside-circles radius n)
  <nowiki>(define (cantor-stool width height n)
 
 
   (raise 'not-yet-implemented #t))</nowiki>
 
   (raise 'not-yet-implemented #t))</nowiki>
  
 
{| class="wikitable" style="text-align: center; "
 
{| class="wikitable" style="text-align: center; "
 
|[[File:Outside-circles_0.svg|200px]]
 
|[[File:Outside-circles_0.svg|200px]]
|[[File:Outside-circles_1.svg|200px]]
+
|[[File:Outside-circles_1.svg|300px]]
|[[File:Outside-circles_2.svg|200px]]
+
|[[File:Outside-circles_2.svg|400px]]
|[[File:Outside-circles_3.svg|200px]]
+
|[[File:Outside-circles_3.svg|500px]]
|[[File:Outside-circles_4.svg|200px]]
+
|[[File:Outside-circles_4.svg|600px]]
 
|-
 
|-
 
|n=0
 
|n=0

Latest revision as of 06:59, 21 March 2022

Motivation

We will recursively generate some images with the Racket Image Library.

Code To Investigate

Racket Image Library

placement

shapes

Shrinking Circles

file: src/main/racket/recursive_circles/shrinking_to_the_right_circles.rkt Racket-logo.svg
functions: shrinking-to-the-right-circles
(outside-circles radius n)
  (raise 'not-yet-implemented #t))
Shrinking-to-the-right-circles 0.svg Shrinking-to-the-right-circles 1.svg Shrinking-to-the-right-circles 2.svg Shrinking-to-the-right-circles 3.svg Shrinking-to-the-right-circles 4.svg
n=0 n=1 n=2 n=3 n=4

Outside Circles

file: src/main/racket/recursive_circles/outside_circles.rkt Racket-logo.svg
functions: outside-circles
(outside-circles radius n)
  (raise 'not-yet-implemented #t))
Outside-circles 0.svg Outside-circles 1.svg Outside-circles 2.svg Outside-circles 3.svg Outside-circles 4.svg
n=0 n=1 n=2 n=3 n=4