Showing posts with label geodesic. Show all posts
Showing posts with label geodesic. Show all posts

Wednesday, January 17, 2007

geodesic domes in second life

Success, the geodesic dome script actually works!


(looks like a Blue Poseball got very angry at me...)

As I mentioned yesterday, the domes start off as a 20-triangle-faced object, an icosohedron. To make it geodesic, you take each triangle, and split it into n^2 smaller triangles, and smooth them out to the surface of a sphere.

So, for increasing values of n, you get more triangles used to form the sphere:
- n=1: 20 triangles (what I had yesterday, an icosahedron)
- n=2: 80 triangles (the one I'm trapped in up above)
- n=4: 320 triangles (the bottom one, but using larger triangles)
- n=6: 720 triangles (shown below)

I wrote it to be fully scalable, so that you could make the spheres / domes as big as you want. I'm not sure how many prims it would take to crash the sim, so I didn't try to make any bigger than 720 triangles, although I know people have made ones in SL with more than 1,000 triangles. Still, with a prim size limit of 10 meters, using 720 triangles would allow you to make a sphere that was >90 meters across, or 360 triangles for a dome, which is more useful for a build anyhow.

Rez in progress, for a 720-prim sphere


All done! Behold, the Blue Poseball of Doom!


This one actually uses fewer (320), but larger triangles, so the completed sphere is larger than the ones above.


OK, this is just about the largest geodesic sphere you can make with 720 triangles (the triangles are nearly maxxed out at 9.8 meters). I can't zoom out far enough to get the whole thing in. Trying to make it bigger started running into problems of encroaching on neighboring sims, so I don't think I'll try to do the 1280-prim sphere.

"That's no moon... It's a... giant blue poseball..."



But, that still leaves the question... What do I do with these things now?

Tuesday, January 16, 2007

hamster's revenge, a first step towards geodesic domes

For no real good reason, I thought it'd be fun to try to write a script to generate geodesic domes. Other people have already successfully used programs outside of SL (Blender), and then imported the coordinates into SL and used scripts to rez the objects there. Seifert Surface has a huge one that houses his sculpture garden.

But it seemed like it'd be an interesting challenge to try to do it fully in SL. First off, though, I had no idea what a geodesic dome _really_ was. Google is a great tool... A bunch of Google'ing, with fun-filled sites like: Geodesic Dome -- from Wolfram MathWorld, and I started to understand it. A potentially useful site is "Desert Domes," which includes calculators if you actually wanted to build one in real life. The calculators will eventually be useful to make sure I stay within the 10m maximum size prim limit.

One common way to generate a geodesic is to start with a icosahedron, which is a 20-sided object composed entirely of twenty identical equilateral triangles. From the center of the icosahedron, ALL vertices lie on the surface of a sphere, so the icosahedron is a decent 20-faced approximation of a sphere.

To make a geodesic sphere, you divide up each triangular face into n^2 identical triangles, and then "push out" the points of those triangles to the surface of the sphere. The bigger 'n' is, the smoother your geodesic dome will be. (And the huger the number of triangles you'll need.)

Back in November, Seifert Surface posted a set of scripts that would generate parametric surfaces in SL. I didn't care about that part, BUT, it included a nice set of functions to rez a triangle if you fed it the corners, which is exactly what I'd need.

I figured, since the basis of a geodesic sphere is an icosahedron, I'd start with trying to rez that. Bizarrely, it worked on my first try.

Here's the rezzer in action:


And if you happen to be sitting on the rezzer while it's doing its work...


...you get your very own hamster ball to run around in!


Loads of fun, if you make it physical, and allow anyone to move it. Let's play "Roll the dorky scripter around"!

Next step towards making geodesic domes will be to subdivide each of the 20 triangles of the icosahedron into n^2 triangles, and "pushing" them out to the surface of a sphere, and then connecting all the new vertices with smaller triangles.