LSR Posted July 31, 2006 Posted July 31, 2006 I thought I share this to you guys; It's my first tutorial contribution to this forum. I did this using 2000i. If you find it hard to follow; my apology. The following figures are icosahedron and truncated icosahedron. You can find the coordinates of these from this site. http://en.wikipedia.org/wiki/icosahedron http://en.wikipedia.org/wiki/Truncated_icosahedron I used the regular icosahedron coordinates and truncate them but you can also used the coordinates of truncated icosahedron as well. As you can see none of the centroid of the pentagons and hexagons are in any axes (x,y,z axis) as shown from top view. I rotated the truncated icosahedron so that one of the pentagons is on the z-axis. See top view with pentagon in red and hexagon in green You have to manipulate the UCS so that you can use the regular rotate command. (You can use the 3d rotate as well but I prefer the 2d rotate) Once you have that, you have to isolate the pentagon and hexagon to make a solid. You have to make a multiple copies first before you can isolate them. And you have to enlarge the image larger than the ball. Isolate first the pentagon on the z-axis and erase the rest. Retrace the pentagon to create a polyline for extrusion. In this case I used the centroid of the pentagon, draw a circle and redraw using the polygon command. I also created a line (red) in z-axis from the centroid of pentagon to center of the ball at 0,0,0. This line also represents the radius of the ball (Ball size is from 27" to 28" in circumference). I also created two lines (in red) from the centroid to the vertex of the pentagon and from the vertex to the 0,0,0. This line represents the taper angle of the extrusion. Draw another profile as region or boundary to represents the size of the ball or to shape the top face of the pentagon. (in magenta). Extrude the pentagon with the tapered length and revolved the region. Using the solid editing, subtract the pentagon from revolved profile. Fillet the corners of the face only of the pentagon. This fillet represents the stitching of the ball. Next is the Hexagon, isolate the one on the YZ plane (see top view of icosahedron) then rotate it to the Z-axis. Do the same procedure as above for the pentagon. Once you have the solid, you have to rotate it back to their original location. Array the hexagon. You can manipulate the others by using copy, rotate and array. This is the half of the soccer ball. The other half is the mirror image. Hope you guys enjoyed the games in last world cup. Larry Quote
WagglyFawn Posted July 31, 2006 Posted July 31, 2006 Using the solid editing, subtract the pentagon from revolved profile. Fillet the corners of the face only of the pentagon Do you mean to say subtract the profile from the pentagon?? Btw, that looks awesome! Quote
X Posted August 1, 2006 Posted August 1, 2006 very nice work! i'm going to try it out when i get some time umm.... for sleepy people like me, how exactly do we construct the truncated icosahedron again? i looked it up on wikipedia like you said, and then my mind just went its just one of those things that as soon as you see the solution, you're like 'd'oh! i knew that... ' thanks Quote
WagglyFawn Posted August 1, 2006 Posted August 1, 2006 X, I believe you take a look at the ratios (golden ration=1.618) then you can easily construct the three rectangles on each plane to make up the vertices of the icosahedron. Once you've done that simply slice the corners properly and then you'll notice you've made the proper amount of hexagons and octagons. "This polyhedron can be constructed from an icosahedron with the 12 vertices truncated (cut off) such that one third of each edge is cut off at each of both ends." Quote
X Posted August 1, 2006 Posted August 1, 2006 oh, alright. i didnt know if there was a command or something that you cold just plug some stuff in and it would make it for you. that would make a pretty nice little lisp Quote
WagglyFawn Posted August 1, 2006 Posted August 1, 2006 X, if you'd like a dwg of the truncated icosahedron you could PM me with your e-mail address. Or if you'd like the satisfaction of doing it yourself that's just as well Quote
LSR Posted August 1, 2006 Author Posted August 1, 2006 Hi guys, Here is the permutations of coordinates of truncated icosahedron; (0.00000000 1.00000000 4.85410197) (0.00000000 -1.00000000 -4.85410197) (0.00000000 1.00000000 -4.85410197) (0.00000000 -1.00000000 4.85410197) (1.00000000 4.85410197 0.00000000) (1.00000000 -4.85410197 0.00000000) (-1.00000000 4.85410197 0.00000000) (-1.00000000 -4.85410197 0.00000000) (4.85410197 0.00000000 1.00000000) (4.85410197 0.00000000 -1.00000000) (-4.85410197 0.00000000 1.00000000) (-4.85410197 0.00000000 -1.00000000) (2.00000000 4.23606798 1.61803399) (-2.00000000 4.23606798 1.61803399) (2.00000000 4.23606798 -1.61803399) (-2.00000000 4.23606798 -1.61803399) (2.00000000 -4.23606798 1.61803399) (-2.00000000 -4.23606798 1.61803399) (2.00000000 -4.23606798 -1.61803399) (-2.00000000 -4.23606798 -1.61803399) (4.23606798 1.61803399 2.00000000) (-4.23606798 1.61803399 2.00000000) (4.23606798 1.61803399 -2.00000000) (-4.23606798 1.61803399 -2.00000000) (4.23606798 -1.61803399 2.00000000) (-4.23606798 -1.61803399 2.00000000) (4.23606798 -1.61803399 -2.00000000) (-4.23606798 -1.61803399 -2.00000000) (1.61803399 2.00000000 4.23606798) (-1.61803399 2.00000000 4.23606798) (1.61803399 2.00000000 -4.23606798) (-1.61803399 2.00000000 -4.23606798) (1.61803399 -2.00000000 4.23606798) (-1.61803399 -2.00000000 4.23606798) (1.61803399 -2.00000000 -4.23606798) (-1.61803399 -2.00000000 -4.23606798) (1.00000000 3.61803399 3.23606798) (-1.00000000 3.61803399 3.23606798) (1.00000000 3.61803399 -3.23606798) (-1.00000000 3.61803399 -3.23606798) (1.00000000 -3.61803399 3.23606798) (-1.00000000 -3.61803399 3.23606798) (1.00000000 -3.61803399 -3.23606798) (-1.00000000 -3.61803399 -3.23606798) (3.61803399 3.23606798 1.00000000) (-3.61803399 3.23606798 1.00000000) (3.61803399 3.23606798 -1.00000000) (-3.61803399 3.23606798 -1.00000000) (3.61803399 -3.23606798 1.00000000) (-3.61803399 -3.23606798 1.00000000) (3.61803399 -3.23606798 -1.00000000) (-3.61803399 -3.23606798 -1.00000000) (3.23606798 1.00000000 3.61803399) (-3.23606798 1.00000000 3.61803399) (3.23606798 1.00000000 -3.61803399) (-3.23606798 1.00000000 -3.61803399) (3.23606798 -1.00000000 3.61803399) (-3.23606798 -1.00000000 3.61803399) (3.23606798 -1.00000000 -3.61803399) (-3.23606798 -1.00000000 -3.61803399) And this is the permutation of coordinates of regular icosahedron; (0.0000000000 1.0000000000 1.6180339887) (0.0000000000 -1.0000000000 -1.6180339887) (0.0000000000 1.0000000000 -1.6180339887) (0.0000000000 -1.0000000000 1.6180339887) (1.0000000000 1.6180339887 0.0000000000) (-1.0000000000 -1.6180339887 0.0000000000) (1.0000000000 -1.6180339887 0.0000000000) (-1.0000000000 1.6180339887 0.0000000000) (1.6180339887 0.0000000000 1.0000000000) (-1.6180339887 0.0000000000 -1.0000000000) (-1.6180339887 0.0000000000 1.0000000000) (1.6180339887 0.0000000000 -1.0000000000) And this is the lisp I found way back in 1991 from Cadence Magazine; (defun C:pt_in1 (/ i file fp pt) (setvar "cmdecho" 0) (setq i 1) (while i (setq fp (findfile (getstring "\Input file: "))) (if file (progn (setq fp (open file "r")) (setq i nil) ) (princ "\nInvalid filename.") ) ) (setq pt 1) (while pt (setq pt (read-line fp)) (if pt (progn (setq pt (read pt)) (command "point" pt) ) ) ) (closed fp) (princ) ) Have fun and show us your team colors when you're done! I'm making another one that shows the maple leaf. Larry Quote
X Posted August 1, 2006 Posted August 1, 2006 so how do we load the file into the lisp? i saved the coordinates in a txt file, but nothing i tried to load it into the lisp worked! what do i need to do? Quote
WagglyFawn Posted August 1, 2006 Posted August 1, 2006 Yeah I did the same thing and it just tells me that it's an invalid input file. What extension do we need to save it as? Quote
tzframpton Posted August 1, 2006 Posted August 1, 2006 so how do we load the file into the lisp? i saved the coordinates in a txt file, but nothing i tried to load it into the lisp worked! what do i need to do? LOL, you need to go buy a book on AutoLISP, which is the programming language behind AutoCAD. walk before you run.... lol Quote
X Posted August 1, 2006 Posted August 1, 2006 i've done programming before, so i have a pretty good idea what's going on in the program it's not like im going about this blindly... Quote
tzframpton Posted August 1, 2006 Posted August 1, 2006 i've done programming before, so i have a pretty good idea what's going on in the program it's not like im going about this blindly... oh okay, sorry.... i just assumed since AutoLISP is about 25 years old now and LISP even older. lol Quote
X Posted August 1, 2006 Posted August 1, 2006 lol, yeah. i hadn't even heard about lisp before i came here, to be honest but i've done stuff with VB, J#, C++, and that good stuff so the logic flow makes sense to me, im just not familiar with all of the commands Quote
LSR Posted August 1, 2006 Author Posted August 1, 2006 oops! sorry. Line 5 was wrong. Here is the correct one: (defun C:pt_in1 (/ i file fp pt) (setvar "cmdecho" 0) (setq i 1) (while i (setq file (findfile (getstring "\Input file: "))) (if file (progn (setq fp (open file "r")) (setq i nil) ) (princ "\nInvalid filename.") ) ) (setq pt 1) (while pt (setq pt (read-line fp)) (if pt (progn (setq pt (read pt)) (command "point" pt) ) ) ) (closed fp) (princ) ) Save the file in ASCII form or .txt Change your PDMODE to 34 so that you can see your points Quote
LSR Posted August 1, 2006 Author Posted August 1, 2006 Once the points are entered, go to one of the 3D isometric views so that you can see your points Larry Quote
X Posted August 2, 2006 Posted August 2, 2006 ah, excellent. I'll post mine when it's ready. thanks for the nifty guide EDIT: um, mine's turning out to be kinda not a soccer ball, and instead of fixing it, i kinda ran with it and so it's going to be similar based off of the prinicple...but not a soccer ball. this is just a preview, i'll put the final up later. Quote
X Posted August 4, 2006 Posted August 4, 2006 im not sure if i'm allowed to do this or not, so feel free to scold me if i'm not supposed to, but i ended up making it into a gif, and the gif prog goofed up the colors on a few frames, but it turned out alright overall i think. *shrug* the frames are supposed to be 10/100ths of a second each so hopefully it will run okay... >_o awesome tutorial, it sure kept me entertained I only used one light, right in the middle of the ball. then i just changed the intensity of the light and the refraction and self-illumination of the 'core' material. and the real renders look better, but the gif maker was kinda meeeeeeeeeeeeeehhhhhhhhhhhh..... Quote
lasershows Posted September 1, 2006 Posted September 1, 2006 Hi LSR, I am very new to autocad and have a 90% complete progect, I just need a ball like in your examples, however, I have no clue how to use lisp and also it will be a one time opperation. is it possible you could send me an autocad dwg of the ball? regards Andy Quote
lasershows Posted September 1, 2006 Posted September 1, 2006 would you mind sending me a dwg of this ball? I have no idea how to use lisp even tho I did try loading the files, while the first script loads (Tools, autolisp, loadapplication) nothing else happens: Command: _appload drawing3.lsp successfully loaded. Also, did I specify the filename correctly? myfile.txt (defun C:pt_in1 (/ i file fp pt) (setvar "cmdecho" 0) (setq i 1) (while i (setq fp (findfile (getstring "\Input file: myfile.txt"))) (if file (progn (setq fp (open file "r")) (setq i nil) ) (princ "\nInvalid filename.") ) ) (setq pt 1) (while pt (setq pt (read-line fp)) (if pt (progn (setq pt (read pt)) (command "point" pt) ) ) ) (closed fp) (princ) ) This ballis perfect for my project, I just cant get touse it, very frustrating as you can imagine and I am in a huge lack of time panick. Please someone heeeeeeeeelp!!! Andy Quote
tzframpton Posted September 1, 2006 Posted September 1, 2006 i think the whole point is for you to learn to do it yourself.... the tutorial is easy enough, you should be able to do it. Quote
Recommended Posts
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.