<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
</div>I'm sure you've done this, but I had fun making lots of them:<br>
<br></blockquote><div><br></div><div>I did. I have a set of functions that deals with that. Some notes on that kind of thing; rotating and translating is ok for quick tests but for lots of them you are way better off with (hsrndvec) and (maim) or you'll end up with bunches of them in some spots. What's also cool is adding constructs that hold a location and a radius and adding those to a list. Then you can check for a point that you picked whether it isn't within the radius of a thing that's already there and there will be no clipping. You do need to calculate distances over the sphere surface for that. Oh and I have a function to pick spots on the sphere within a certain range of a given point. I use that for villages, forests and so on. My list also keeps track of what kind of object a certain entry is. That's so that in the future I could try to keep -say- factories (todo) away from -say- residential areas. I didn't yet get into that. I did fix the issue that this example has where larger buildings will have corners that are floating in the air already.</div>
<div><br></div><div>It's all done procedurally, and different every time. I didn't yet plug these new houses into that (I still need to make the other roof types work with the new system) but the way it's coded it should fit with what I already did. </div>
<div> </div><div>I could share the code for that stuff if anyone needs it. Some of those things were major breakthroughs for me, but I'm refreshing on my highschool 3d math and learning Scheme. It's probably not of so much interest to list members who will be experts in both. I plan on sharing the whole thing once it's "done" and others will be able to run it or add stuff.</div>
<div><br></div><div>But yes, it's great fun. My first test for building on a sphere looked roughly like your code (but without the "perspective") and one look at that first test made me sure that spheres are the way to go. It's just too cute to resist. That and it's amusing to face just how crazy living on a sphere really is;</div>
<div><a href="http://www.flickr.com/photos/41408203@N02/4388424662/">http://www.flickr.com/photos/41408203@N02/4388424662/</a></div><div><br></div><div>I mean; if you build a house with vertical walls then your attic will be larger than the ground floor (in surface area) and the ceiling will be lower at the centre, assuming you placed a flat ceiling on top of the walls. That's clearly loony, but that's what our world is like. Just a little bit, but it is.</div>
<div><br></div><div>Cheers,</div><div>Kas.</div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
(define (random-house)<br>
    (with-state<br>
        (rotate (vector (* (rndf) 360) (* (rndf) 360) 0))<br>
<div class="im">        (translate (vector 0 0 (- diam .1)))<br>
</div>        (let ((x (* (rndf) 2))<br>
              (y (* (rndf) 2))<br>
              (h (* 5 (rndf))))<br>
                (build-block  x y h)<br>
                (build-roof-duo x y .5 h (vector 1 0 0)))))<br>
<br>
(for ((i (in-range 0 100)))<br>
        (random-house))<br>
<br>
cheers,<br>
<font color="#888888"><br>
dave<br>
<br>
<br>
</font></blockquote></div><br>