Re: mpb : how to duplicate a geometry object

"Steven G. Johnson" <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
On Sep 15, 2009, at 2:48 AM, Julien Arlandis wrote:
>
> (define air (make dielectric (epsilon 12)))
>
> (define whole1 (make cylinder (center -0.2 0 0) (radius 0.06)  
> (height infinity) (material air) ))
>
> (define whole2 (make cylinder (center 0.3 0 0) (radius 0.04) (height  
> infinity) (material air) ))
>
> (set! geometry (list whole1 whole2))
>
> => 2 wholes

(I think you mean "hole", not "whole".)

>
> If I add :
>
> (geometric-object-duplicates (vector3 1 0 0) 1 10 whole1))

This does not modify the geometry object.  You have to append the  
results of geometric-object-duplicates to the geometry if you want to  
use it, e.g.

(set! geometry (append geometry (geometric-object-duplicate ...)))

Steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.