<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I suppose I should have clarified that, yes, its from the book, section 27.1.4.<br><br>--- On <b>Sat, 11/13/10, Noel Welsh <i><noelwelsh@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Noel Welsh <noelwelsh@gmail.com><br>Subject: Re: [racket] Svannah fractals.<br>To: "Ken Hegeland" <hegek87@yahoo.com><br>Cc: users@lists.racket-lang.org<br>Date: Saturday, November 13, 2010, 7:35 AM<br><br><div class="plainMail">I this in reference to a HtDP exercise, or a personal project? If the<br>later you might be interested in<br><br> <a href="https://github.com/noelwelsh/splatter/blob/master/demo.ss" target="_blank">https://github.com/noelwelsh/splatter/blob/master/demo.ss</a><br><br>The function tree defines a context-free grammar for drawing ... well,
guess.<br><br>HTH,<br>N.<br><br>On Sat, Nov 13, 2010 at 3:00 AM, Ken Hegeland <<a ymailto="mailto:hegek87@yahoo.com" href="/mc/compose?to=hegek87@yahoo.com">hegek87@yahoo.com</a>> wrote:<br>><br>> 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.<br>><br>> 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.<br></div></blockquote></td></tr></table><br>