Nautilus Shell

This routine creates a 3D Mesh in the form of a nautilus shell. No user input is required, the shell parameters are fixed.

;   create a nautilus shell 
;  ----- July.2003 ----- 
(defun c:nautilus( / radius Rad_inc n m ang1M ang1N old ) 
  (setq Rad_Inc 0.2      ;radius increment 
   n 25         ;mesh N size 
   m 60         ;mesh M size 
   ang1N (/ (* 2.0 pi) n)   ;angular increment 
   ang1M (/ pi 20.0)   ;angular increment 
   angN 0.0      ;angle in N direction 
   old (getvar "osmode")) 
  (command "3dmesh" (1+ n) m) 
  (setvar "osmode" 0) 
  (repeat (1+ n) 
    (setq Radius 0.0      ;radius of cross section 
     angM 0.0      ;angle in M direction 
     angN (+ angN ang1N)) 
    (repeat m 
   (setq Radius (+ Radius Rad_Inc) 
       angM (+ angM ang1M) 
       p (list (* (+ Radius (* Radius (cos angN))) (cos angM)) 
          (* Radius (sin angN)) 
          (* (+ Radius (* Radius (cos angN))) (sin angM))))) 
      )        ;repeat m 
    )      ;repeat n+1 
  (setvar "osmode" old) 
  )      ;defun 
(princ "\nRoutine loaded. Type NAUTILUS at the command prompt.") 
Download nautilus.lsp 1.03 KB

The result of this routine is illustrated below:

See the original topic for more details.