Skip to main content

Grin

Struct Grin 

Source
pub struct Grin {
    pub kind: GrinKind,
    pub dt: f64,
}
Expand description

面の後ろの屈折率分布

Fields§

§kind: GrinKind§dt: f64

OpticStudio の刻み Δt(パラメータ 1)。ここでは刻みの初めの値にだけ使う

Implementations§

Source§

impl Grin

Source

pub fn surf_type(&self) -> SurfType

面タイプ

Source

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 だけ符号を変える

Source

pub fn mirror_x(&mut self)

媒質を x について裏返す(x → −x)。Gradium は分布の軸の偏心 d_x と傾き t_x の符号を、Gradient 9 は 形の傾き tan α の符号を変える(屈折率は x について対称)

Source

pub fn step(&self) -> f64

刻みの初め(光路)

Source

pub fn eval(&self, lam: f64, p: V3) -> Option<(f64, V3)>

媒質の局所座標の点 p、波長 lam [µm] の屈折率 n と n∇n。分布の範囲の外(端を止めた側)は None

Source

pub fn symmetric(&self) -> bool

軸の周りに回転対称か(Gradium の公差の項・Gradient 9 の形の傾きがない)

Source

pub fn vertex_index(&self, lam: f64) -> Option<f64>

頂点(局所座標の原点)の屈折率

Source

pub fn ref_index(&self) -> Option<f64>

頂点の基準波長の屈折率(Gradium のパラメータ 3。Gradient 9 は None)

Source

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 Clone for Grin

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Grin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Grin

Source§

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

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl PartialEq for Grin

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Grin

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.