Hi!

Steven explained such a problem on the list.

You can do so:

;--------------------------------------

(define-param df2 (+ df p)) ;radius of the second level


(define-param N1 (+ (/ 360 fststep) 1)) ;number of sectors
                        ;on the first level of holes
(define-param N2 (+ (/ 360 secstep) 1)) ; similarly for
                                        ;the second level

(set! default-material
    (make dielectric (epsilon eps)))


(define first-level
 (map
   (lambda (angle)
(make cylinder (center (* df (cos(deg->rad angle)))
(* df (sin(deg->rad angle)))  0)
(height infinity) (radius r)  (material air)))
 (arith-sequence 0 fststep N1)
))

(define second-level
 (map
   (lambda (angle)
(make cylinder (center (* df2 (cos(deg->rad angle)))
(* df2 (sin(deg->rad angle))) 0)
(height infinity) (radius r)  (material air)))
 (arith-sequence 0 secstep N2)
))


(set! geometry (append
 (list (make cylinder (center 0 0) (radius d)
(height infinity)(material air)))
 first-level
 second-level
))

;----------------------------------------------

If you have more levels of holes, then you can define
a func-level, depending on r-level, step-angle, and
r-holes.

(define (func-level r-level step-angle r-holes)
 (map
   (lambda (step-angle)
     (make cylinder
 (center (* r-level (cos(deg->rad step-angle)))
       (* r-level (sin(deg->rad step-angle)))  0)
 (height infinity) (radius r-holes)
     (material air)))
 (arith-sequence 0 step-angle (+ (/ 360 step-angle) 1))
))


(set! geometry (append
 (list (make cylinder (center 0 0) (radius d)
       (height infinity)(material air)))
 (func-level df fststep r)
 (func-level df2 secstep r)
))
;------------------------------------------------

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to