Plane

Plane output a plane wave.

use autd3::prelude::*;
#[allow(unused_variables)]
fn main() {
let x = 0.;
let y = 0.;
let z = 0.;
let nx = 0.;
let ny = 0.;
let nz = 0.;
let theta = 0.;
let g = Plane::new(UnitVector3::new_normalize(Vector3::new(nx, ny, nz)));
}
#include<autd3.hpp>
int main() {
const auto nx = 0.0;
const auto ny = 0.0;
const auto nz = 1.0;
auto g = autd3::Plane(autd3::Vector3(nx, ny, nz));
return 0; }
using AUTD3Sharp.Utils;
using AUTD3Sharp.Gain;
var nx = 0.0f;
var ny = 0.0f;
var nz = 1.0f;
var g = new Plane(new Vector3(nx, ny, nz));
from pyautd3 import Plane
nx = 1.0
ny = 0.0
nz = 0.0
g = Plane([nx, ny, nz])

Specify the direction of the plane wave in the constructor of Plane.

Set intensity

You can change emission intensity by with_intensity method.

use autd3::prelude::*;
#[allow(unused_variables)]
fn main() {
let x = 0.;
let y = 0.;
let z = 0.;
let nx = 0.;
let ny = 0.;
let nz = 0.;
let theta = 0.;
let g = Plane::new(UnitVector3::new_normalize(Vector3::new(nx, ny, nz)))
            .with_intensity(0xFF)
            .with_phase_offset(0x00);
}
#include<autd3.hpp>
#include <limits>
int main() {
const auto nx = 0.0;
const auto ny = 0.0;
const auto nz = 1.0;
auto g = autd3::Plane(autd3::Vector3(nx, ny, nz))
             .with_intensity(0xFF)
             .with_phase_offset(0x00);
return 0; }
using AUTD3Sharp.Utils;
using AUTD3Sharp.Gain;
using AUTD3Sharp;
var nx = 0.0f;
var ny = 0.0f;
var nz = 1.0f;
var g = new Plane(new Vector3(nx, ny, nz))
                .WithIntensity(0xFF)
                .WithPhaseOffset(0x00);
from pyautd3 import Plane
nx = 1.0
ny = 0.0
nz = 0.0
g = Plane([nx, ny, nz])\
        .with_intensity(0xFF)\
        .with_phase_offset(0x00)