Difference between revisions of "Recursive Circles Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 32: Line 32:
 
=Outside Circles=
 
=Outside Circles=
 
{{RacketToImplement|outside_circles|outside-circles|recursive_circles}}
 
{{RacketToImplement|outside_circles|outside-circles|recursive_circles}}
 +
 +
NOTE: to avoid layout problems, make the next level outside-circles one third the radius of the current one.
  
 
  <nowiki>(outside-circles radius n)
 
  <nowiki>(outside-circles radius n)

Latest revision as of 18:53, 20 October 2026

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
(shrinking-to-the-right-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

NOTE: to avoid layout problems, make the next level outside-circles one third the radius of the current one.

(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