Greedy
Greedy Algorithm with Brute-Force Search, 鈴木らの論文1に基づく多焦点Gain
.
use autd3::prelude::*;
use autd3_gain_holo::{EmissionConstraint, Pa, Greedy, GreedyOption, Sphere};
use std::num::NonZeroU8;
fn main() {
let x1 = 0.;
let y1 = 0.;
let z1 = 0.;
let x2 = 0.;
let y2 = 0.;
let z2 = 0.;
let _ =
Greedy::<Sphere> {
foci: vec![
(Point3::new(x1, y1, z1), 5e3 * Pa),
(Point3::new(x2, y2, z2), 5e3 * Pa),
],
option: GreedyOption {
phase_div: NonZeroU8::new(16).unwrap(),
constraint: EmissionConstraint::Uniform(EmitIntensity::MAX),
..Default::default()
},
};
}
#include <autd3.hpp>
#include "autd3/gain/holo.hpp"
using namespace autd3;
using gain::holo::Pa;
int main() {
const auto x1 = 0.0;
const auto y1 = 0.0;
const auto z1 = 0.0;
const auto x2 = 0.0;
const auto y2 = 0.0;
const auto z2 = 0.0;
auto g = gain::holo::Greedy(
std::vector<std::pair<Point3, gain::holo::Amplitude>>{
{Point3(x1, y1, z1), 5e3 * Pa},
{Point3(x2, y2, z2), 5e3 * Pa},
},
gain::holo::GreedyOption{
.phase_div = 16,
.constraint = gain::holo::EmissionConstraint::Uniform(
std::numeric_limits<EmitIntensity>::max())});
return 0;
}
using AUTD3Sharp.Gain.Holo;
using AUTD3Sharp;
using AUTD3Sharp.Utils;
using static AUTD3Sharp.Units;
var x1 = 0.0f;
var y1 = 0.0f;
var z1 = 0.0f;
var x2 = 0.0f;
var y2 = 0.0f;
var z2 = 0.0f;
new Greedy(
foci: [
(new Point3(x1, y1, z1), 5e3f * Pa),
(new Point3(x2, y2, z2), 5e3f * Pa)
],
option: new GreedyOption
{
PhaseDiv = 16,
EmissionConstraint = EmissionConstraint.Uniform(EmitIntensity.Max),
}
);
import numpy as np
from pyautd3 import EmitIntensity
from pyautd3.gain.holo import Greedy, EmissionConstraint, GreedyOption, Pa
x1 = 0.0
y1 = 0.0
z1 = 0.0
x2 = 0.0
y2 = 0.0
z2 = 0.0
Greedy(
foci=[(np.array([x1, y1, z1]), 5e3 * Pa), (np.array([x2, y2, z2]), 5e3 * Pa)],
option=GreedyOption(
phase_div=16,
constraint=EmissionConstraint.Uniform(EmitIntensity.MAX),
),
)
phase_div
は位相の離散化深度, デフォルトは上記の通り.
パラメータの詳細は論文1を参照されたい.
1
Suzuki, Shun, et al. “Radiation Pressure Field Reconstruction for Ultrasound Midair Haptics by Greedy Algorithm with Brute-Force Search.” IEEE Transactions on Haptics (2021).