Abstract
Finite-difference time-domain (FDTD) electromagnetic simulations are a computational method that has seen much success in the study of biological optics; however, such simulations are often hindered by the difficulty of faithfully replicating complex biological microstructures in the simulation space. Recently, we designed simulations to calculate the trajectory of electromagnetic light waves through realistically reconstructed retinal photoreceptors and found that cone photoreceptor mitochondria play a substantial role in shaping incoming light. In addition to vision research and ophthalmology, such simulations are broadly applicable to studies of the interaction of electromagnetic radiation with biological tissue. Here, we present our method for discretizing complex 3D models of cellular structures for use in FDTD simulations using MEEP, the MIT Electromagnetic Equation Propagation software, including subpixel smoothing at mesh boundaries. Such models can originate from experimental imaging or be constructed by hand. We also include sample code for use in MEEP. Implementation of this algorithm in new code requires understanding of 3D mathematics and may require several weeks of effort, whereas use of our sample code requires knowledge of MEEP and C++ and may take up to a few hours to prepare a model of interest for 3D FDTD simulation. In all cases, access to a facility supercomputer with parallel processing capabilities is recommended. This protocol offers a practical solution to a significant challenge in the field of computational electrodynamics and paves the way for future advancements in the study of light interaction with biological structures.
Key points
-
This protocol provides a detailed roadmap for scientists interested in performing FDTD computational simulations to probe the interactions of electromagnetic waves (e.g., visible light or microwave radiation) with complex structures such as organs or biological cells.
-
This approach converts 3D models obtained by using microscopy to a ‘discretized’ form compatible with FDTD; the model surface data are used to perform subpixel smoothing to increase simulation accuracy.
Similar content being viewed by others
Data availability
The data used in this protocol to make these figures have been made available as part of a Figshare public repository41. It is shared under a GPL 3.0+ license.
Code availability
The code used in this protocol to make these figures has been made freely available as part of a Figshare public repository41. It is shared under a GPL 3.0+ license.
References
Taflove, A. A perspective on the 40-year history of FDTD computational electrodynamics. Appl. Comput. Electromagn. Soc. J. 22, 1–21 (2007).
McCoy, D. E., Shneidman, A. V., Davis, A. L. & Aizenberg, J. Finite-difference time-domain (FDTD) optical simulations: a primer for the life sciences and bio-inspired engineering. Micron 151, 103160 (2021).
Endler, J. A. & Mappes, J. The current and future state of animal coloration research. Philos. Trans. R. Soc. Lond. B Biol. Sci. 372, 20160352 (2017).
Pozo, A. M., Pérez-Ocón, F. & Jiménez, J. R. FDTD analysis of the light propagation in the cones of the human retina: an approach to the Stiles–Crawford effect of the first kind. J. Opt. A: Pure Appl. Opt. 7, 357–363 (2005).
Solovei, I. et al. Nuclear architecture of rod photoreceptor cells adapts to vision in mammalian evolution. Cell 137, 356–368 (2009).
Stavenga, D. G. & Wilts, B. D. Oil droplets of bird eyes: microlenses acting as spectral filters. Philos. Trans. R. Soc. Lond. B Biol. Sci. 369, 20130041 (2014).
Wilby, D. & Roberts, N. W. Optical influence of oil droplets on cone photoreceptor sensitivity. J. Exp. Biol. 220, 1997–2004 (2017).
Kreysing, M. et al. Photonic crystal light collectors in fish retina improve vision in turbid water. Science 336, 1700–1703 (2012).
Sankaran, K. Are you using the right tools in computational electromagnetics? Eng. Rep. 1, e12041 (2019).
Ball, J. M., Chen, S. & Li, W. Mitochondria in cone photoreceptors act as microlenses to enhance photon delivery and confer directional sensitivity to light. Sci. Adv. 8, eabn2070 (2022).
Stavenga, D. G., Leertouwer, H. L. & Wilts, B. D. Magnificent magpie colours by feathers with layers of hollow melanosomes. J. Exp. Biol. 221, jeb174656 (2018).
McCoy, D. E. et al. Microstructures amplify carotenoid plumage signals in tanagers. Sci. Rep. 11, 8582 (2021).
Davis, A. L. et al. Ultra-black camouflage in deep-sea fishes. Curr. Biol. 30, 3470–3476.e3 (2020).
Lemcoff, T. et al. Brilliant whiteness in shrimp from ultra-thin layers of birefringent nanospheres. Nat. Photon. 17, 485–493 (2023).
Saba, M., Wilts, B. D., Hielscher, J. & Schröder-Turk, G. E. Absence of circular polarisation in reflections of butterfly wing scales with chiral gyroid structure. Mater. Today Proc. 1, 193–208 (2014).
Wilts, B. D., Wijnen, B., Leertouwer, H. L., Steiner, U. & Stavenga, D. G. Extreme refractive index wing scale beads containing dense Pterin pigments cause the bright colors of Pierid butterflies. Adv. Opt. Mater. 5, 1600879 (2017).
Agez, G., Bayon, C. & Mitov, M. Multiwavelength micromirrors in the cuticle of scarab beetle Chrysina gloriosa. Acta Biomaterialia 48, 357–367 (2017).
Wilts, B. D. et al. Evolutionary-optimized photonic network structure in white beetle wing scales. Adv. Mater. 30, e1702057 (2018).
Chandler, C. J. et al. Structural colour in Chondrus crispus. Sci. Rep. 5, 11645 (2015).
Heil, C. M. et al. Mechanism of structural colors in binary mixtures of nanoparticle-based supraballs. Sci. Adv. 9, eadf2859 (2023).
Vukusic, P. & Sambles, J. R. Photonic structures in biology. Nature 424, 852–855 (2003).
AlSawaftah, N., El-Abed, S., Dhou, S. & Zakaria, A. Microwave imaging for early breast cancer detection: current state, challenges, and future directions. J. Imaging 8, 123 (2022).
Saeki, M. et al. FDTD simulation study of ultrasonic wave propagation in human radius model generated from 3D HR-pQCT images. Phys. Med. 10, 100029 (2020).
Vakarin, V. et al. Metamaterial-engineered silicon beam splitter fabricated with deep UV immersion lithography. Nanomaterials (Basel) 11, 2949 (2021).
Pokhrel, S., Shankar, V. & Simpson, J. J. 3-D FDTD modeling of electromagnetic wave propagation in magnetized plasma requiring singular updates to the current density equation. IEEE Trans. Antennas Propag. 66, 4772–4781 (2018).
Nagelberg, S. et al. Reconfigurable and responsive droplet-based compound micro-lenses. Nat. Commun. 8, 14673 (2017).
Yee, K. Numerical solution of initial boundary value problems involving Maxwell’s equations in isotropic media. IEEE Trans. Antennas Propagat. 14, 302–307 (1966).
Jacucci, G., Vignolini, S. & Schertel, L. The limitations of extending nature’s color palette in correlated, disordered systems. Proc. Natl Acad. Sci. USA 117, 23345–23349 (2020).
Dunning, J. et al. How woodcocks produce the most brilliant white plumage patches among the birds. J. R. Soc. Interface 20, 20220920 (2023).
Wilts, B. D., Michielsen, K., De Raedt, H. & Stavenga, D. G. Sparkling feather reflections of a bird-of-paradise explained by finite-difference time-domain modeling. Proc. Natl Acad. Sci. USA 111, 4363–4368 (2014).
Michielsen, K., De Raedt, H. & Stavenga, D. G. Reflectivity of the gyroid biophotonic crystals in the ventral wing scales of the Green Hairstreak butterfly, Callophrys rubi. J. R. Soc. Interface 7, 765–771 (2009).
Dolan, J. A. et al. Optical properties of gyroid structured materials: from photonic crystals to metamaterials. Adv. Opt. Mater. 3, 12–32 (2015).
Holland, R. Pitfalls of staircase meshing. IEEE Trans. Electromagn. Compat. 35, 434–439 (1993).
Bourke, S. A., Dawson, J. F., Flintoft, I. D. & Robinson, M. P. Errors in the shielding effectiveness of cavities due to stair-cased meshing in FDTD: application of empirical correction factors. In 2017 International Symposium on Electromagnetic Compatibility - EMC EUROPE 1–6 Available at https://ieeexplore.ieee.org/document/8094791 (2017).
Wu, R.-B. & Itoh, T. Hybrid finite-difference time-domain modeling of curved surfaces using tetrahedral edge elements. IEEE Trans. Antennas Propag. 45, 1302–1309 (1997).
Dunn, A. K., Smithpeter, C. L., Welch, A. J. & Richards-Kortum, R. R. Finite-difference time-domain simulation of light scattering from single cells. J. Biomed. Opt. 2, 262–266 (1997).
Liu, J., Brio, M. & Moloney, J. V. Subpixel smoothing finite-difference time-domain method for material interface between dielectric and dispersive media. Opt. Lett. 37, 4802–4804 (2012).
Deinega, A. & Valuev, I. Subpixel smoothing for conductive and dispersive media in the finite-difference time-domain method. Opt. Lett. 32, 3429–3431 (2007).
Farjadpour, A. et al. Improving accuracy by subpixel smoothing in the finite-difference time domain. Opt. Lett. 31, 2972–2974 (2006).
Oskooi, A. F., Kottke, C. & Johnson, S. G. Accurate finite-difference time-domain simulation of anisotropic media by subpixel smoothing. Opt. Lett. 34, 2778–2780 (2009).
Ball, J. M. & Li, W. Sample code and data for converting and discretizing complex 3D models for FDTD electromagnetic simulations. Preprint at https://doi.org/10.6084/m9.figshare.c.6293238.v1 (2022).
Stavenga, D. G., Leertouwer, H. L. & Wilts, B. D. Quantifying the refractive index dispersion of a pigmented biological tissue using Jamin–Lebedeff interference microscopy. Light Sci. Appl. 2, e100 (2013).
Barer, R. & Joseph, S. Refractometry of living cells: Part III. Technical and optical methods. J. Cell Sci. s3-96, 423–447 (1955).
Kholodtsova, M. N., Daul, C., Loschenov, V. B. & Blondel, W. C. P. M. Spatially and spectrally resolved particle swarm optimization for precise optical property estimation using diffuse-reflectance spectroscopy. Opt. Express 24, 12682–12700 (2016).
Çapoğlu, İ. R., Taflove, A. & Backman, V. Computation of tightly-focused laser beams in the FDTD method. Opt. Express 21, 87–101 (2013).
Oskooi, A. F. et al. Meep: a flexible free-software package for electromagnetic simulations by the FDTD method. Comput. Phys. Commun. 181, 687–702 (2010).
Gao, J.-Y. & Wang, X.-H. Toward the development of an efficient and stability-improved FDTD method for anisotropic magnetized plasma. Prog. Electromagn. Res. Lett. 104, 113–120 (2022).
Joseph, R. M. & Taflove, A. FDTD Maxwell’s equations models for nonlinear electrodynamics and optics. IEEE Trans. Antennas Propag. 45, 364–374 (1997).
Hormann, K. & Agathos, A. The point in polygon problem for arbitrary polygons. Comput. Geom. 20, 131–144 (2001).
Sampson, D. M., Dubis, A. M., Chen, F. K., Zawadzki, R. J. & Sampson, D. D. Towards standardizing retinal optical coherence tomography angiography: a review. Light Sci. Appl. 11, 63 (2022).
Burns, S. A., Elsner, A. E., Sapoznik, K. A., Warner, R. L. & Gast, T. J. Adaptive optics imaging of the human retina. Prog. Retin. Eye Res. 68, 1–30 (2019).
Labin, A. M., Safuri, S. K., Ribak, E. N. & Perlman, I. Müller cells separate between wavelengths to improve day vision with minimal effect upon night vision. Nat. Commun. 5, 4319 (2014).
Meadway, A. & Sincich, L. C. Light propagation and capture in cone photoreceptors. Biomed. Opt. Express 9, 5543–5565 (2018).
Weigert, M., Subramanian, K., Bundschuh, S. T., Myers, E. W. & Kreysing, M. Biobeam—multiplexed wave-optical simulations of light-sheet microscopy. PLoS Comput. Biol. 14, e1006079 (2018).
Subramanian, K. et al. Rod nuclear architecture determines contrast transmission of the retina and behavioral sensitivity in mice. eLife 8, e49542 (2019).
Osnabrugge, G., Leedumrongwatthanakun, S. & Vellekoop, I. M. A convergent Born series for solving the inhomogeneous Helmholtz equation in arbitrarily large media. J. Comput. Phys. 322, 113–124 (2016).
Thendiyammal, A., Osnabrugge, G., Knop, T. & Vellekoop, I. M. Model-based wavefront shaping microscopy. Opt. Lett. 45, 5101–5104 (2020).
Santos, J. M. et al. A 3D CAD model input pipeline for REFMUL3 full-wave FDTD 3D simulator. J. Instrum. 16, C11013 (2021).
Thon, S., Gesquière, G. & Raffin, R. A low cost antialiased space filled voxelization of polygonal objects. In Proceedings of the International Conference Graphicon 2004 (GraphiCon Scientific Society, 2004); https://www.graphicon.ru/en/conference/2004/proceedings
Feito, F. R. & Torres, J. C. Inclusion test for general polyhedra. Comput. Graph. 21, 23–30 (1997).
Ooms, K., De Maeyer, P. & Neutens, T. A 3D inclusion test on large dataset. In Developments in 3D Geo-Information Sciences (eds. Neutens, T. & Maeyer, P.) 181–199 (Springer, 2010).
Wang, W., Li, J., Sun, H. & Wu, E. Layer-based representation of polyhedrons for point containment tests. IEEE Trans. Vis. Comput. Graph. 14, 73–83 (2008).
Horvat, D. & Zalik, B. Ray-casting point-in-polyhedron test. In Proceedings of the Central European Seminar on Computer Graphics (CESCG, 2012); https://old.cescg.org/CESCG-2012/
Szucki, M. & Suchy, J. S. A voxelization based mesh generation algorithm for numerical models used in foundry engineering. Metall. Foundry Eng. 38, 43–43 (2012).
Berens, M. K., Flintoft, I. D. & Dawson, J. F. Structured mesh generation: open-source automatic nonuniform mesh generation for FDTD simulation. IEEE Antennas Propag. Mag. 58, 45–55 (2016).
Beuthan, J., Minet, O., Helfmann, J., Herrig, M. & Müller, G. The spatial variation of the refractive index in biological cells. Phys. Med. Biol. 41, 369–382 (1996).
Zhao, H., Brown, P. H. & Schuck, P. On the distribution of protein refractive index increments. Biophys. J. 100, 2309–2317 (2011).
Sidman, R. L. The structure and concentration of solids in photoreceptor cells studied by refractometry and interference microscopy. J. Biophys. Biochem. Cytol. 3, 15–30 (1957).
Batsanov, S. S., Ruchkin, E. D. & Poroshina, I. A. Refractive Indices of Solids (Springer, 2016).
Vukusic, P. & Stavenga, D. G. Physical methods for investigating structural colours in biological systems. J. R. Soc. Interface 6, S133–S148 (2009).
Kumar, A. et al. Dual-view plane illumination microscopy for rapid and spatially isotropic imaging. Nat. Protoc. 9, 2555–2573 (2014).
Bossy, E., Padilla, F., Peyrin, F. & Laugier, P. Three-dimensional simulation of ultrasound propagation through trabecular bone structures measured by synchrotron microtomography. Phys. Med. Biol. 50, 5545–5556 (2005).
Kremer, J. R., Mastronarde, D. N. & McIntosh, J. R. Computer visualization of three-dimensional image data using IMOD. J. Struct. Biol. 116, 71–76 (1996).
Chandler, C. J., Wilts, B. D., Brodie, J. & Vignolini, S. Structural color in marine algae. Adv. Opt. Mater. 5, 1600646 (2017).
Januszewski, M. et al. High-precision automated reconstruction of neurons with flood-filling networks. Nat. Methods 15, 605–610 (2018).
Arridge, S., Zee, P., van der, Delpy, D. T. & Cope, M. Particle sizing in the Mie scattering region: singular-value analysis. Inverse Probl. 5, 671 (1989).
Knabe, W., Skatchkov, S. & Kuhn, H.-J. “Lens mitochondria” in the retinal cones of the tree-shrew Tupaia belangeri. Vis. Res. 37, 267–271 (1997).
Acknowledgements
This research was supported by the Intramural Research Program of the National Institutes of Health, National Eye Institute. We thank J. Angueyra for providing comments on an earlier version of the paper. FDTD simulations and execution of the discretization code were performed by using the computational resources of the NIH HPC Biowulf cluster (https://hpc.nih.gov).
Author information
Authors and Affiliations
Contributions
J.M.B. developed the protocol, wrote the manuscript and prepared figures. W.L. provided supervision as well as editing and feedback on the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Protocols thanks Ramkumar Sabesan, Bodo Wilts and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Related links
Key reference using this protocol
Ball, J. M. et al. Sci. Adv. 8, eabn2070 (2022): https://doi.org/10.1126/sciadv.abn2070
Extended data
Extended Data Fig. 2 Schematized diagrams for the hierarchical file structures output by the discretization protocol provided here.
Dashed vertical lines and ellipses represent implied additional elements that have been omitted here for clarity. Bracketed descriptors indicate the size and type of data stored for key elements or provide other clarifying details.
Extended Data Fig. 3 Top-level point-classification flow diagram.
Note that lowercase n values here and in Extended Data Figs. 4–6 represent iteration count variables and should not be confused with normal vectors; e.g., ‘nmito’ represents the current mitochondria object index. Steps marked ‘STOP’ indicate end conditions in which classification of a point can be definitively identified as indicated. Diamond blocks indicate branching decision points. Double-plus (++) signs are used to increment element counts within loops. Proceed to ‘precise checks’ (Extended Data Fig. 4) where indicated.
Extended Data Fig. 4 ‘Precise check’ flow diagram to classify points as needed when simple checks (Extended Data Fig. 3) fail to classify p.
Extended Data Fig. 5 Top-level flow diagram to calculate subpixel averaging parameters for voxels identified as boundary intersections (Extended Data Fig. 4; see also Extended Data Fig. 3 for symbol clarification).
Extended Data Fig. 6 Flow diagram to perform 3D fill fraction calculations when directed during subpixel averaging (Extended Data Fig. 5).
See Extended Data Figs. 3–5 for additional information. Note that for a finite boundary of width θ′ centered upon T′′, two sets of fill fraction calculations must be performed: once for the portion of the unit cube behind the inner surface (lower boundary) and a second time for the portion of the unit cube behind the outer surface (upper boundary).
Extended Data Fig. 7 Flow diagram to perform 2D fill fraction calculations when directed during subpixel averaging (Extended Data Fig. 5).
See Extended Data Figs. 3–6 for additional information. The first step is to determine which 2D plane (i.e., X-Y, Y-Z or X-Z) is appropriate for computations and to calculate appropriate plane parameters. In the block marked ‘Determine case for fill fraction calculation’, each block presents a calculation whose negative versus positive result determines which case number (in gray) to use for the remainder of this diagram. Note that the height and width of the squares in the final block are 1.
Supplementary information
Supplementary Information
Supplementary Tutorial
Supplementary Video 1
Animation depicting the use of the rigid body physics engine in Blender to fill the cone photoreceptor inner segment membrane ‘container’ with arbitrary shapes representing alternative mitochondria morphologies. The development of this model is detailed in the tutorial found in Supplementary Information.
Rights and permissions
About this article
Cite this article
Ball, J.M., Li, W. Using high-resolution microscopy data to generate realistic structures for electromagnetic FDTD simulations from complex biological models. Nat Protoc 19, 1348–1380 (2024). https://doi.org/10.1038/s41596-023-00947-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s41596-023-00947-z
- Springer Nature Limited