Monday, September 6, 2010

Waving around in MEEP - Scheme and Python

I finally get to learn some proper functional programming with MEEP and its Scheme based interface. MEEP is an FDTD - Finite Difference Time domain based simulator for electromagnetic waves, something I am trying to shoehorn into vegetation simulation. There is thankfully prebuilt cylinder primitives I can use to generate stems. So far I have managed put them in the Z and X axis and not in the Y axis which is of interest to me. The ring demo runs fine with some modifications and produces some nice and weird looking waves. Scheme is pretty easy to get around as a scripting interface, in spite of some polish math notation ( + (+ (+ (air water) earth ) fire ) = hooray !!)

I also got the Python bindings up and running. Time to see if my Python generated plant geometries and soil surfaces can be plugged straight into a 2D MEEP run. MEEP supports cylinder, ellipse, cone and block primitives. Making plants will be fairly easy, may be I can make the soil surface with dielectric blocks of random size.
Post a Comment