Jump to content
Guest dangermouse

Mobius Strip?

Recommended Posts

Guest dangermouse

Hi everyboby,

This is purely a sitting infront of autocad with nothing better to do question,is it possible to draw a "MOBIUS STRIP" with autocad.

it would be cool to do, have fun trying its baffled me, but then again thats not hard . :!:

 

 

always smiling dangermouse :D

Share this post


Link to post
Share on other sites
fuccaro

;        MOEBIUS SURFACE   
;      [email="mfuccaro@hotmail.com"]mfuccaro@hotmail.com[/email]
;;;;;;;;;;;;- 21.05.2003 -;
(defun c:mb()
 (setq xmax 200 ymax 11;you may change here the dimensions
   x 0 rad2 (/ xmax (* 2 PI))
   save (list (getvar "osmode") (getvar "cmdecho")))
 (setvar "cmdecho" 0)
 (setvar "osmode" 0)
 (command "3dmesh" (1+ xmax) ymax)
 (repeat (1+ xmax)
   (setq y (- (/ ymax 2)))
   (repeat ymax
     (setq ang1 (/ (* x PI) xmax)     ;twist along OY
       x1 x
       y1 (* y (cos ang1))
       z1 (* y (sin ang1)))
     (setq ang2 (/ (* x1 2 PI) xmax)  ;bend on OZ
       x2 (* rad2 (sin ang2))
       y2 y1
       z2 (* (+ rad2 z1) (cos ang2)))
     (command (list x2 y2 z2))
     (setq y (1+ y)))
   (setq x (1+ x)))
 (command "vpoint" (list 1 1 1))
 (setvar "osmode" (car save))
 (setvar "cmdecho" (cadr save))
 (princ)
 )

You may change the xmax and ymax -with Notepad or with any other text editor- but keep the ymax impair.

 

*** editing ***

As I mentioned before (read bellow) the code must be cleaned before you can use it. Here it goes:

;        MOBIUS SURFACE   
;      mfuccaro@hotmail.com
;;;;;;;;;;;;- 21.05.2003 -;
(defun c:mb()
 (setq xmax 200 ymax 11;you may change here the dimensions
   x 0 rad2 (/ xmax (* 2 PI))
   save (list (getvar "osmode") (getvar "cmdecho")))
 (setvar "cmdecho" 0)
 (setvar "osmode" 0)
 (command "3dmesh" (1+ xmax) ymax)
 (repeat (1+ xmax)
   (setq y (- (/ ymax 2)))
   (repeat ymax
     (setq ang1 (/ (* x PI) xmax)     ;twist along OY
       x1 x
       y1 (* y (cos ang1))
       z1 (* y (sin ang1)))
     (setq ang2 (/ (* x1 2 PI) xmax)  ;bend on OZ
       x2 (* rad2 (sin ang2))
       y2 y1
       z2 (* (+ rad2 z1) (cos ang2)))
     (command (list x2 y2 z2))
     (setq y (1+ y)))
   (setq x (1+ x)))
 (command "vpoint" (list 1 1 1))
 (setvar "osmode" (car save))
 (setvar "cmdecho" (cadr save))
 (princ)
 )

Edited by fuccaro
cleaning the character coding error

Share this post


Link to post
Share on other sites
Guest dangermouse

Hi,

absolutly superb, thank you very much indeed.

 

always smiling dangermouse :D

Share this post


Link to post
Share on other sites
fuccaro

And here is an image:

 

moebius.gif

Share this post


Link to post
Share on other sites
CADTutor

Fantastic! Is there no end to this mans talent?

Share this post


Link to post
Share on other sites
fuccaro

Thank you CADTutor! As always I feel good reading your appreciation. What did you find

Share this post


Link to post
Share on other sites
CADTutor

What is most fantastic is the through response to the request. I must admit that my first reaction was, "Mobius Strip in AutoCAD? Don't even go there!" Once again, your rather more pragmatic approach wins the day.

Share this post


Link to post
Share on other sites
Guest dangermouse

Hi,

 

The mobius strip question was more of a challenge for the "BRAINS" and for mear mortals like me to gaze in wonder :o at the results.I must find out where they hand out thease brain things.joking aside i think the way you take a problem and find a solution is great.are there seperate courses for learning lisp routines or is it just a case of knowing computer programming. :D

 

always smiling dangermouse.

 

watch this space for the next challenge.

Share this post


Link to post
Share on other sites
Mr T

Looks like a strip for about 2/3s then a twisted RULESURF ?????

 

Nick

Share this post


Link to post
Share on other sites
fuccaro

Nick

The dimensions are not important. If the Mobius strip is not a commonly used concept: it looks like a ribbon twisted first around its longitudinal axis and than the ends are joined together.

Show us your way to draw the Mobius strip. It will be not the first when you make just with AutoCAD things I created with Lisp.

Share this post


Link to post
Share on other sites
Mr T

The Power of RULESURF :shock:

 

1) Draw the outline shape.

 

2) Draw a '3D polyline' to create the curve profile that twists.

Repeat the '3D polyline' but mirror around 180 degs.

 

3) Set 'SURFTAB1' to 20, it will create a smoother surface, with 20 segments.

 

4) RULESURF the 2 3D polylines together.

 

NB The source is not an ellipse but could be if you wish.

 

Hey presto, a couple of minutes and a MOBIUS thingymijig !! :roll:

 

:P Nick

 

http://www.eezylearn.pwp.blueyonder.co.uk/images/mob1.jpg

http://www.eezylearn.pwp.blueyonder.co.uk/images/mob2.jpg

Share this post


Link to post
Share on other sites
CADTutor

"Draw a '3D polyline' to create the curve profile that twists."

 

Hmm... sounds easy when you say it like that but I reckon I'll be sticking with fuccaro's LISP routine should I ever need to draw a Mobius strip.

 

By the way, in case you were wondering, the strip was named after August Mobius (1790-1868), German mathematician who invented it. :wink:

Share this post


Link to post
Share on other sites
Mr T

If you look at the polyline I have drawn it snapping to an end point then a midpoint then another end point then mirrored it. That was pretty easy. Only three points to draw !

 

Nick

Share this post


Link to post
Share on other sites
fuccaro

Nick

I was sure you will find a way to do it. But let me ask you: there is a surface or are two surfaces with two common edges creating the ilusion of a single one?

Share this post


Link to post
Share on other sites
Mr T
Nick

I was sure you will find a way to do it. But let me ask you: there is a surface or are two surfaces with two common edges creating the ilusion of a single one?

 

It's a single twisted rulesurf. Since the two polylines twist when you then create a surface between them the surface is twisted also. A RULESURF is a surface between any two entities

 

Curve to curve, line to line circle to circle, rectangle to rectangle etc etc. The best thing is it works easily across planes. Unlike the dreaded REGIONs which only work co-planar (same plane ie same XY plane)

 

Anyway covering a MATHS lesson on mortgages, boring !. Not teaching graphics just now.

 

Nick

 

PS I'll do a detailed RULESURF tutorial soon, good weather for rock climbing inthe evenings just now, here in Scotland.

Share this post


Link to post
Share on other sites
fuccaro
The mobius thread was interesting to see. I didn't even know what the term meant before now :oops:

Just out of curiousity, what exactly would a mobius be used for?

The Mobius strip is a funny object: it has a single surface. Create a Mobius strip from a paper ribbon and put it on the table. Move a pencil along it. You will end up with a continuous closed line. Cut the strip and examine the ribbon: on both of sides you have lines!

On the ancient times I used a printer with an inked ribbon. That ribbon was twisted. In this way it was used on both of sides (longer life).

Other utilities of the Mobius strip? Somebody else?

Share this post


Link to post
Share on other sites
Mr T

I suppose you could design a double edged V belt used in car engines for drive belts etc and have it twisted as above to improve the life.

 

Nick

Share this post


Link to post
Share on other sites
fuccaro

Rob

This is an ... interesting way to... save paper. Saving paper we will save the trees. We will have more oxygen for our planet and we will live longer. I am sure that your paper saving invention has nothing to do with the fact that you are Scottish! :D

Share this post


Link to post
Share on other sites
Mr T
I am sure that your paper saving invention has nothing to do with the fact that you are Scottish! :D

 

oh no not the scottish jokes pleeese.

 

Nick

(Scottish n proud of it)

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...