Hi, I am trying to create a 2D sinusoidal (or cos) structure using functions but I am running into some problems. Hopefully someone here can give me a hand. I am attaching a picture of the structure I would like to describe.
In essence, I need to define a function where meep will check if the
y-axis value (let's call it "p") in the box is greater than the value
returned from cos(x). This means that for every xy pair, a pre-defined
value would be given if the y position is lower or higher than the
cos(x).
I was thinking of something around the lines of this:
(define (f p x)
(if (> (vector-y p) (cos(vector-x x)) 1 0))
In my mind this reads like: If the value of y is greater than the
solution of sin(x), than y=1 else y=0.
Then when describing the geometry:
(make block (center 0 0 0) (size 1 1 infinity)
(material (make material-function (epsilon-func f))))
I get no error message but the block is
formed is appears uniform.
Any help appreciated!
Nic
cos.png
Description: PNG image
_______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

