GridUtils

Coordinate systems and transformations for optical field grids.

Overview

The GridUtils module provides:

  • Spatial coordinate generation for optical field grids
  • 2D coordinate transformations (translations, rotations)
  • Coordinate composition for complex geometries

Quick Example

using FluxOptics
using Statistics

# Generate 2D coordinate grid
xv, yv = spatial_vectors((128, 128), (2.0, 2.0); offset=(-5.0, 30.5))

(mean(xv), mean(yv))  # Grid center = -offset
(5.0, -30.5)
# Create transformation: shift then rotate
transform = Rot2D(π/4) ∘ Shift2D(10.0, 5.0)

# Apply to a point
point = transform([0.0, 0.0])
2-element StaticArraysCore.SVector{2, Float64} with indices SOneTo(2):
  3.5355339059327386
 10.606601717798213

Key Functions

See Also

  • Modes for using coordinates with optical modes
  • Fields for ScalarField grid structure

Index