pub struct Grin {
pub kind: GrinKind,
pub dt: f64,
}Expand description
面の後ろの屈折率分布
Fields§
§kind: GrinKind§dt: f64OpticStudio の刻み Δt(パラメータ 1)。ここでは刻みの初めの値にだけ使う
Implementations§
Source§impl Grin
impl Grin
Sourcepub fn flip_z(&mut self)
pub fn flip_z(&mut self)
媒質を z について裏返す(z → −z、x・y はそのまま。鏡の後に置くとき)。Gradium は分布の多項式を u → 1 − u で書き直し(端の扱いの左右も入れ替える)、Δz を z_max / t_z − Δz に、分布の軸の傾き t_x・t_y の 符号を変える(偏心はそのまま)。Gradient 9 は媒質が z によらないので、形の傾き tan だけ符号を変える
Sourcepub fn mirror_x(&mut self)
pub fn mirror_x(&mut self)
媒質を x について裏返す(x → −x)。Gradium は分布の軸の偏心 d_x と傾き t_x の符号を、Gradient 9 は 形の傾き tan α の符号を変える(屈折率は x について対称)
Sourcepub fn eval(&self, lam: f64, p: V3) -> Option<(f64, V3)>
pub fn eval(&self, lam: f64, p: V3) -> Option<(f64, V3)>
媒質の局所座標の点 p、波長 lam [µm] の屈折率 n と n∇n。分布の範囲の外(端を止めた側)は None
Sourcepub fn vertex_index(&self, lam: f64) -> Option<f64>
pub fn vertex_index(&self, lam: f64) -> Option<f64>
頂点(局所座標の原点)の屈折率
Sourcepub fn paraxial(
&self,
lam: f64,
y: f64,
u: f64,
z0: f64,
t: f64,
sgn: f64,
) -> Option<(f64, f64, f64)>
pub fn paraxial( &self, lam: f64, y: f64, u: f64, z0: f64, t: f64, sgn: f64, ) -> Option<(f64, f64, f64)>
近軸の受け渡し: 局所 z = z0 の面で高さ y・傾き u(屈折の後)の光線を、z0 から z0 + t まで 進めた高さ・傾き・屈折率(z0 は座標ブレークを挟んだ続きの区間。傾き・偏心は見ない)(sgn は展開した向き。直進なら y + sgn t u)。Gradium の分布の軸の偏心・傾きは 軸上の屈折率の変化としてだけ入れ、Gradient 9 の形の傾きは見ない。傾けない系では小さい実光線の極限と 一致する(OpticStudio の近軸は G8A で 7e-7、G9A で 2e-6 ずれる。近似とみて合わせない)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grin
impl<'de> Deserialize<'de> for Grin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Grin
impl JsonSchema for Grin
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Grin
Auto Trait Implementations§
impl Freeze for Grin
impl RefUnwindSafe for Grin
impl Send for Grin
impl Sync for Grin
impl Unpin for Grin
impl UnsafeUnpin for Grin
impl UnwindSafe for Grin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more