# Geodesic Sphere

## Recommended Posts

I need to design a Geodesic sphere, but I don't know how to :-/ I tried a program called ICOSA that installs into AutoCAD, but still no luck

##### Share on other sites

This is what Vaker is talking about Geodesic sphere,how you make one I dont know.It's possible Fuccaro might have some idea,looks like a wired framed sphere.

##### Share on other sites

Hi.

Try this link http://www.desertdomes.com/domecalc.html from

##### Share on other sites

if you have access to Max or Viz then it's pretty simple

##### Share on other sites

I wrote a short demo program.

How it works: consider a sphere containing a triangle. The middle of each edge is projected on the sphere and based on these points and the initial 3 corners 4 new triangles are created. This iterative process is repeated generating more and more triangles approximating better and better the spherical surface.

After you run the program you may pan/zoom/orbit, you may move the objects on to an other layer or you may even delete them. By running the program again you will get the next level - or you will cause the computer to hang-up.

Have fun!

```;| GEOdhesical "surface" demo
[email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email]
__________________Dec. 2004_____|;
(defun c:geo( / tr1 pl a i c m t1)
(if (not *tr*) (init))
(foreach t1 *tr*
(setq pl (list (nth 1 t1) (nth 2 t1) (nth 3 t1) (nth 1 t1)) i 0 m nil)
(repeat 3
(setq a (nth i pl) b (nth (setq i (1+ i)) pl)
c (c:cal "plt(a,b,0.5)")
c (c:cal "pld(orig,c,100)")
m (cons c m))
)
(setq tr1 (cons (make3dpoly m) tr1)
tr1 (cons (make3dpoly (list (nth 1 t1) (nth 0 m) (nth 2 m))) tr1)
tr1 (cons (make3dpoly (list (nth 2 t1) (nth 2 m) (nth 1 m))) tr1)
tr1 (cons (make3dpoly (list (nth 3 t1) (nth 1 m) (nth 0 m))) tr1))
)
(setq *tr* tr1)
(command "color" (setq *color* (1+ *color*)))
(strcat "Done, " (if (< (length *tr*) 17) "" "you may try to ")
"run the program again"
(if (> (length *tr*) 1023) " AT YOUR OWN RISK!!!" ""))
)

(defun make3dpoly (vertlist / point)
(entmake (list '(0 . "POLYLINE")'(66 . 1)'(100 . "AcDb3dPolyline")'(70 . 9)))
(foreach point vertlist
(entmake (list (cons 0 "VERTEX")'(100 . "AcDb3dPolylineVertex")'(70 . 32)(cons 10 point))))
(entmake '((0 . "SEQEND")))
(cons (entlast) vertlist)
)

(defun init( / osmode rs d rc)
(setvar "CMDECHO" 0)
(if (not (member "geomcal.arx" (arx))) (arxload "geomcal"))
(setq rs 100.0    ;radius of sphere
d 45.0        ;distance of cutting plane from the origin
rc (sqrt (- (* rs rs) (* d d)))
*tr* nil    ;list of triangles
orig '(0 0 0)    ;center of the sphere -global variable!
*color* 0)
(setq *tr* (cons (make3dpoly (mapcar
'(lambda(x) (reverse (cons d (reverse (polar '(0 0) (* x (/ PI 3)) rc)))))
'(0 2 4))) *tr*))
)
```

##### Share on other sites

Outstanding Fuccaro you get a star for that one.

Am I right in thinking that the routine creates one quarter of a hemisphere? So a full hemisphere is possible by Polar Array.

I have two small requests. Is it possible to have each subsequent iteration delete the objects from the previous one? I did 4 iterations and ended up with a lot of stuff I needed to delete - maybe this should be an option the user is prompted for. Or perhaps it may just be easier to put each iteration on a new layer. Also, is it possible to draw the triangle as 3D Faces rather than 3D Ploylines? This would then create a geodesic dome that could be shaded or rendered.

##### Share on other sites

Ah, I just thought of a third thing. In order to facilitate a Polar Array, could the generated form be orientated so that one of the apexes was in the upper Z position with the opposite curve on the base plane?

##### Share on other sites

Before you start a new iteration you may delete/recolor/relayer some or all of the objects. The triangles are recorded into a list (called *tr*) and the program will work without problems based on those data (tested).

All of the "triangles" are in fact closed plines so using the REGION command you should be able to convert them from a snap. The only problem I anticipate: the operation can be very time consuming for say 1024 triangles...

So I will think again before to upgrade the program to the "two stars" level

The program doesn't generate a quarter of a hemisphere. I placed almost randomly the initial triangle in the sphere. By changing value of "d" in the "init" routine the plane containing the triangle will be placed at other distance from the center point.

Why to array and render the dome? It is simpler to draw a sphere and render that one.

Well, it is a just limited demo program I found interesting to write -nothing more.

##### Share on other sites

OK, I appreciate that this is just your way of exercising your brain

I just thought that if you were writing a routine to create a part of a geodesic sphere, it might just as well be useable. I know, I ask too much ...again.

##### Share on other sites

Probable because I work in mechanical field I can't see what is it good for this program -even with the changes you mentioned.

##### Share on other sites

In Architecture the geodesic dome is a very important structure. Many architects have used it but probably the most celebrated was Buckminster Fuller. See Spaceship Earth as an example. It would be very useful to have a routine that could create a geodesic dome. I'm sure many of my students would use it and others interested in architecture. Simply using AutoCAD's own spheres is not the same as the structure is quite different.

other uses for a

geodesic dome

##### Share on other sites

Took me a few moments to work out what that link was all about

Try zorb.com to put your mind at rest.

And of course, the geodesic dome is at the heart of one of the UK's finest vew visitor attractions, the Eden Project.

##### Share on other sites

In the link about the Spaceship Earth I recognize an other approach. Starting from a triangle with the corners on the sphere the center point is projected "out" to the surface. Four new triangles are generated based on the corners of the first triangle and the projection. I will try to write a program for this -the triangles generated by the Lisp I posted previously are not identical. This is what happens when a some one tries an architectural work after he studied mechanics .

About the Eden Project: the sphere is covered by a hexagonal mesh -even simpler to generate.

Interesting theme...

##### Share on other sites

I am new to autocad and I've been tasked to make a geodesic dome and i came across this script and how exactly do i do that? I've tried using the various scripting editors within autocad and so far nothing works.

Like I said I'm new to autocad so I don't have the faintest idea how to run scripts or things of that sort. editing objects is mostly what I know how to do so any assistance would be greatly appreciated.

##### Share on other sites

It is a LISP. See this on instructions for using LISP....How to use LISP

##### Share on other sites

That worked great. Thanks alot. I'm sure I'll have more questions as I work further into AutoCAD.

EDIT: So I was using the lsp script and it functioned fantastically, except I got a little carried away pushing it and no matter what i do to get it to reset to the initial piece it keeps going from where it left of and it breaking autoCAD. Is there a way to get it to reset to the default value?

##### Share on other sites

Welcome to the forum.

You will need to ask fuccarro about the lisp.

##### Share on other sites

To reset the lisp routine, you can restart Autocad. Or type "(init)" on the command line (including the parentheses). Or better, type "(setq *tr* nil)".

##### Share on other sites

That is just freakin AMAZING... Thanks Fuccaro for your programs, I'll never understand all of it but it is fun to play and learn.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.