[racket] Svannah fractals.

From: Ken Hegeland (hegek87 at yahoo.com)
Date: Sat Nov 13 03:08:43 EST 2010

I suppose I should have clarified that, yes, its from the book, section 27.1.4.

--- On Sat, 11/13/10, Noel Welsh <noelwelsh at gmail.com> wrote:

From: Noel Welsh <noelwelsh at gmail.com>
Subject: Re: [racket] Svannah fractals.
To: "Ken Hegeland" <hegek87 at yahoo.com>
Cc: users at lists.racket-lang.org
Date: Saturday, November 13, 2010, 7:35 AM

I this in reference to a HtDP exercise, or a personal project? If the
later you might be interested in


The function tree defines a context-free grammar for drawing ... well, guess.


On Sat, Nov 13, 2010 at 3:00 AM, Ken Hegeland <hegek87 at yahoo.com> wrote:
> I have a nearly working code, it draws the tree, but it is slightly off. I realize what is wrong that is causing the problem, for each recursive call I used a set angle. The tree draws all the left branches at the same angle and all right branches at the same angle. I end up with a picture of a tree with the left branch not having any more left branches, only right branches. The right side of the tree has only left branches, no right branches.
> My first thought for gradually changing the angle is to use something like (- a 10) for the angle in one  recursive call, and (+ a 10) in the next, but this produces a straight line with other lines way off to the right side. I am using a helper function which converts an angle from degrees in radians to help me more easily visualize where the branches should point. Is my thought process going in the correct direction? If anyone wants to see the code I have feel free to email me, as always, thanks in advance for any help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101113/bbf4b29b/attachment.html>

Posted on the users mailing list.