Hi all.

I have been dealing many days with a problem without any success. In my program 
I define a list, let's call it "PHC", by shifting a geometrical object, 
cylinder, with geometric-objects-duplicates. The cylinder is therefore a list 
which contains its properties: centre (centre . #V), (height . H), (radius . 
R), and so on. In particular, the property radius is a pair in the 3rd position 
of the list circle: (list-ref cylinder 3) gives (radius . R) and, also, if I do 
(object-property-value cylinder 'radius) = R. Now, what I want to do is to 
create a new list, PhC-disorder, composed by circles with the same positions of 
those of PhC but each with different (random) radius. Then, I try this:

(define PhC-disorder (map
                     (lambda(obj)
                      (set-cdr! (list-ref obj 3) (random:normal))
                     obj)
                     PhC))

My problem is that it changes the radius of all the cylinders the same way! And 
I want a different (random) value for all of them. I know that the function 
shift-geometric-object does with the cylinder centre the same that I want to do 
with the radius.

I would really thank any help or advise!!


David

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

Reply via email to