<div id="result_box" dir="ltr">Thanks for the comments <br> I have to be more careful. <br> I thought that it might be good to have a mechanism that can remedy such errors in real time. <br><br> Greetings <br> Lucas</div>
<br><br><div><span class="gmail_quote">2008/9/10, Claude Heiland-Allen <<a href="mailto:claudiusmaximus@goto10.org">claudiusmaximus@goto10.org</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span class="q">lucas samaruga wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(define (render n f)<br>
(cond ((not (zero? n))<br>
</blockquote>
<br></span>
Small point, what happens if you have n < 0 ?<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(build-sphere 10 10)<br>
</blockquote>
<br>
[snippy]<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(render (- n 1) f)<br>
(render (- n 1) f)<br>
(render (- n 1) f)<br>
(render (- n 1) f)<br>
(render (- n 1) f)<br>
(render (- n 1) f)<br>
</blockquote>
<br>
[snippy]<br>
<br>
At each level you have a sphere, and also 6 of the next level down.
So as you increase the level, you have 6x the number of spheres,
which goes up pretty quickly.<span class="q"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
;(render 10 4) ; for a hang<br>
</blockquote>
<br></span>
This gives you over 6^10 spheres, which is quite a lot (more than 60 million)!<br>
<br>
So not surprising you get problems :)<br>
<br>
(for comparison, I have a fractal I wrote in C, with "only" 1 million
single points, and that takes about 1/2 a second per frame to draw).<br>
<br>
<br>
Claude<br><span class="sg">
-- <br>
<a href="http://claudiusmaximus.goto10.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://claudiusmaximus.goto10.org</a><br>
</span></blockquote></div><br>