2 WaveField Rel PolygonSource Rel Rel WaveField ( wfl) PolygonSource ( psl) / wfl/psl wfl/psl

Size: px
Start display at page:

Download "2 WaveField Rel PolygonSource Rel Rel WaveField ( wfl) PolygonSource ( psl) / wfl/psl wfl/psl"

Transcription

1 WaveFieldTools

2 2 WaveField Rel PolygonSource Rel Rel WaveField ( wfl) PolygonSource ( psl) / wfl/psl wfl/psl Acrobat Reader

3 3 I WaveField WaveField MS Visual Studio.NET (Visual Studio 2003) MS Visual Studio MS Visual Studio Intel C++ Compiler WaveField WaveField FFT WaveField FFT sinc

4 FFT FFT void Start(int MsgLevel = 1) void Start(const char* fname) void Start(int MsgLevel, const char* fname) void PrintLog(const char* format,...) void PrintL(const char* format,...) void Printf(const char* format,...) double GetTickSec() FILE* GetLogFile(void) void SetNumThreads() void SetNumThreads(int n) void PushNumThreads(int n) int PopNumThreads(void) int GetNumThreads(void) void SetDynamicThreads(bool onoff) bool GetDynamicThreads(void) int GetNumProcs(void)

5 / FFT / void* Malloc(size t size, const char* msg = NULL) void Free(void* p) void SetFftLib(FftLib fl) FftLib GetFftLib(void) / WF void CreateFileMpWf(const char* fname, unsigned short int size) int GetSizeMpWf(const char* fname) void CreateFileSegWf(const char* fname, unsigned short int mx, unsigned short int my) int GetSizeSegWf(const char* fname, int& mx, int& my) void SetErrorHandling(ErrorHandling eh) ErrorHandling GetErrorHandling(void) void Error(ErrorCode n, const char* funcname, const char* msg) WFL ERROR1(n) WFL ERROR(n, msg) const char* GetErrorString(ErrorCode n) int GetMajorVersion(void) int GetMinorVersion(void) int GetPatchNumber(void) const char* GetVersionString(void) Platform GetPlatform(void) const char* GetPlatformString(void) DevelopEnv GetCreateEnv(void)) const char* GetCreateEnvString(void) DevelopEnv GetDevelopEnv(void) const char* GetDevelopEnvString(void) DevelopEnv GetTargetEnv(void) const char* GetTargetEnvString(void) CpuType GetCpuType(void) const char* GetCpuTypeString(void) const char* GetCreateEnvVersionString(void) const char* GetCreateTimeStamp(void) void SetPositionTolerance(double t) const double& GetPositionTolerance(void)

6 6 const RMatrix& RMatrixX(double t) const RMatrix& RMatrixY(double t) const RMatrix& RMatrixZ(double t) const RMatrix& CRMatrixX(double t) const RMatrix& CRMatrixY(double t) const RMatrix& CRMatrixZ(double t) InterpolFunc GetInterpolFunc(Interpol interpol) InterpolFunc Pi PI Deg DEG WaveField WaveField(void) WaveField(int nxy) WaveField(int nx, int ny) WaveField(int nx, int ny, double pxy) WaveField(int nx, int ny, double px, double py) WaveField(int nx, int ny, double px, double py, double wavelength) WaveField(const WaveField& wf); WaveField(void) void Dispose(void) WaveField& Init(Complex* d = NULL) Complex* GetDataPointer(void) WaveField& Clear(void) WaveField& CopyParam(const WaveField& source) WaveField& CopyData(const WaveField& source)

7 7 static void SetDefault(long nxy) static void SetDefault(long nx, long ny) static void SetDefault(long nx, long ny, double pxy) static void SetDefault(long nx, long ny, double px, double py) static void SetDefault(long nx, long ny, double px, double py, double lmd).. 66 static void SetDefaultWavelength(double lmd) static double GetDefaultWavelength(void) static void SetDefaultNx(long nx) static void SetDefaultNy(long ny) static long GetDefaultNx(void) static long GetDefaultNy(void) static void SetDefaultPx(double px) static void SetDefaultPy(double py) static double GetDefaultPx(void) static double GetDefaultPy(void) bool IsRealSpace(void) const bool IsComplexAmplitude(void) const bool IsFourierSpace(void) const bool IsSpectrum() const bool IsComplexForm(void) const bool IsPolarForm(void) const double GetWavelength(void) const LightWave& SetWavelength(double lambda) double GetWavenumber(void) const WaveField& SetWavenumber(double k) float& k(void) size t N(void) const size t GetN(void) const const long& GetNx(void) const const long& GetNy(void) const WaveField& SetNx(long n) WaveField& SetNy(long n) long& Nx(void) long& Ny(void) const double& GetPx(void) const const double& GetPy(void) const

8 8 WaveField& SetPx(double pitch) WaveField& SetPy(double pitch) double& Px(void) double& Py(void) ( ) Complex& operator[](int i) Complex GetPixel(int i, int j) const WaveField& SetPixel(int i, int j, Complex val) Complex& Pixel(int i, int j) double GetReal(int i, int j) const double GetImag(int i, int j) const WaveField& SetReal(int i, int j, double val) WaveField& SetImag(int i, int j, double val) float& Real(int i, int j) float& Imag(int i, int j) double GetAmplitude(int i, int j) void SetAmplitude(int i, int j, double val) Phase GetPhase(int i, int j) void SetPhase(int i, int j, double val) double GetIntensity(int i, int j) void SetIntensity(int i, int j, double val) WaveField& SetConst(const Complex& c) WaveField& SetConstReal(double a) WaveField& SetConstImag(double b) WaveField& SetConstAmplitude(double A) WaveField& SetConstPhase(double p) WaveField& SetConstWin(const Complex& c) WaveField& SetConstWinReal(double a) WaveField& SetConstWinImag(double b) WaveField& SetConstWinAmplitude(double A) WaveField& SetConstWinPhase(double p) double X(int i) const double Y(int j) const int I(double x) const int J(double y) const int IJ(int i, int j) const

9 9 double GetMaxX(void) const double GetMinX(void) const double GetMaxY(void) const double GetMinY(void) const double GetWidth(void) const double GetHeight(void) const double GetMaxX(void) const double GetMinX(void) const double GetMaxY(void) const double GetMinY(void) const WaveField& ShiftZeroFill(Axis axis, double dxy) WaveField& ShiftZeroFill(double dx, double dy) WaveField& Rotate(const WaveField& source, RMatrix& crmat, SFrequency* c = NULL, Interpol ip = CUBIC8, bool Jacobian = false) WaveField& RotateFs(const WaveField& source, RMatrix& crmat, SFrequency* c = NULL, Interpol ip = CUBIC8, bool Jacobian = false) WaveField& ImageRotation(int n) WaveField& SwitchQuadrant(void) WFL RECT& Window(void) WaveField& SetWindow(const WFL RECT& r) WaveField& SetWindow(int left, int right, int bottom = 0, int top = 0) WaveField& SetWindow(double left, double right, double bottom = 0.0, double top = 0.0) WaveField& SetWindowMax(void) WaveField& SetWindowCommon(WaveField& signal) WaveField& TransferWindow(WaveField& source) WaveField& operator=(const WaveField& wf) WaveField& operator*=(const WaveField& wf) WaveField& operator/=(const WaveField& wf) WaveField& operator+=(const WaveField& wf) WaveField& operator-=(const WaveField& wf)

10 10 WaveField& operator*=(double val) WaveField& operator*=(const ComplexDouble& val) WaveField& operator/=(double val) WaveField& operator/=(const ComplexDouble& val) WaveField& operator+=(const ComplexDouble& val) WaveField& operator-=(const ComplexDouble& val) WaveField& SetNormalVector(Vector v) Vector GetNormalVector(void) const WaveField& SetOrigin(Point p) Point GetOrigin(void) const Vector GetUnitVectorX(void) const Vector GetUnitVectorY(void) const RMatrix GetCRMatrixLG(void) const RMatrix GetCRMatrixGL(void) const Point GetLocalPosition(Point p) const Point GetGlobalPosition(Point p) const Plane GetPlane(void) const Line GetOpticalAxis(void) const PointArray GetFrame(int n = 0) const WaveField& Add(const WaveField& wf) WaveField& Multiply(const WaveField& wf) WaveField& ResamplingAdd(const WaveField& wf, Interpol ip = CUBIC8) WaveField& ResamplingMultiply(const WaveField& wf, Interpol ip = CUBIC8) 82 WaveField& ResamplingCopy(const WaveField& source, Interpol ip = CUBIC8) void SaveAsBmp(const char* fname, Mode mode, Gradation cs = GRAY) const void SaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw) const void SaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw, double max, double min = 0.0) const void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs = GRAY) const void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw) const void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw, double max, double min = 0.0) const

11 11 WaveField& LoadBmp(const char* fname, Mode mode, Complex backg = Comp(0, 0)) void SaveAsLw(const char* fname, OptionHead* ohh = NULL) const void WinSaveAsLw(const char* fname, OptionHead* ohh = NULL) const.. 86 WaveField& LoadLw(const char* fname, OptionHead* ohh = NULL) void SaveAsText(const char* fname, int j = 0) const void SaveAsCsv(const char* fname, Axis axis = X AXIS, int ij = 0) const.. 87 void SaveAsPTF(const char* fname) const void SaveAsDE(const char* fname) const WaveField& LoadDE(const char* fname) void SaveAsCA(const char* fname) const WaveField& LoadCA(const char* fname) void SaveAsHBI(...) const WaveField& LoadHBI(...) void SaveAsText(const char* fname, int j = 0) const void SaveAsWf(const char* fname) const void WinSaveAsWf(const char* fname) const WaveField& LoadWf(const char* fname) void SaveAsMpWf(const char* fname, unsigned short int ix) const WaveField& LoadMpWf(const char* fname, unsigned short int ix, bool* exist = NULL) WaveField& LoadParamMpWf(const char* fname, unsigned short int ix, bool* exist = NULL) void SaveAsSegWf(const char* fname, unsigned short int ii, unsigned short int jj) const void SaveParamSegWf(const char* fname) const WaveField& LoadSegWf(const char* fname, unsigned short int ii, unsigned short int jj, bool* exist = NULL) WaveField& LoadParamSegWf(const char* fname, unsigned short int ii, unsigned short int jj, bool* exist = NULL) WaveField& ConvToPolarForm(void) WaveField& ConvToComplexForm(void) WaveField& ConvToIntensity(void) WaveField& ConvToLogIntensity(void) WaveField& ConvToAbsolute(void) WaveField& Normalize(float max = 1.0) WaveField& NormalizeWin(float max = 1.0)

12 ( ) WaveField& Fft(int s) WaveField& FakeFft() WaveField& ScaledFft(int ax, int ay) ( ) WaveField& AsmProp(double d) WaveField& AsmPropFs(double d) WaveField& ExactAsmProp(double d) WaveField& ShiftedAsmProp(const WaveField& source, int prec = 1) WaveField& ShiftedAsmPropAdd(const WaveField& source, int prec = 1).. 97 WaveField& ShiftedAsmPropEx(const WaveField& source) WaveField& ShiftedAsmPropAddEx(const WaveField& source) WaveField& FresnelProp(double d) WaveField& FourierProp(double f) WaveField& BackFourierProp(double f) WaveField& ShiftedFresnelProp(const WaveField& source) WaveField& ShiftedFresnelProp(const WaveField& source, const ShiftedFresnelPropDescriptor& sfpd) WaveField& ShiftedFresnelProp(const Vector& origin, double px, double py) WaveField& ShiftedFresnelProp(const Vector& origin, double px, double py, const ShiftedFresnelPropDescriptor& sfpd) WaveField& ShiftedFresnelPropAdd(const WaveField& source, const Shifted- FresnelPropDescriptor& sfpd) WaveField& ShiftedFresnelPropEx(const WaveField& source) WaveField& ShiftedFresnelPropAddEx(const WaveField& source) WaveField& SetGaussian(double w, double n = 2.0, double a = 1.0) WaveField& SetSeparableGaussian(double wx, double wy, double nx = 2.0, double ny = 2.0, double a = 1.0) WaveField& SetRect(double wx, double wy, double a = 1.0); WaveField& AddSphericalWave(Point p, Phase phs, double a, WindowFunc w) WaveField& AddSphericalWave(Point p, Phase phs, double a) WaveField& AddSphericalWave(Point p) WaveField& AddSphericalWaveSqr(const SphericalWaveDescriptor& swd, double x, double y, double z, double a = 1.0, double InitPhase = 0, WindowFunc w = RECTANGLE) WaveField& SetRandomPhase(void)

13 13 WaveField& ModRandomPhase(void) WaveField& SetQuadraticPhase(double f) WaveField& MultiplyPlaneWave(double CosA, double CosB, Phase phs = 0.0) WaveField& MultiplyPlaneWave(Vector dir, Phase phs = 0.0) WaveField& SetPlaneWave(double CosA, double CosB, Phase phs = 0.0) WaveField& SetPlaneWave(Vector dir, Phase phs = 0.0) double GetSquareSum(void) const double GetSquareSumWhole(void) const double GetSquareAverage(void) const double GetAbsoluteSum(void) const double GetAmplitudeSum(void) const double GetAbsoluteAverage(void) const double GetAmplitudeAverage(void) const double GetAbsoluteMax(void) const double GetAmplitudeMax(void) const double GetAmplitudeMaxWhole(void) const double GetAmplitudeVariance(void) const ComplexDouble GetScaleFactor(const WaveField& signal) const double GetSnr(const WaveField& signal, const ComplexDouble& scalefactor) const double GetEnergyRatioInWindow(void) const WaveField& CreateRealHistogram(int level = 512) const double GetOverlapFactor(const WaveField& sig) const WaveField& HardClipPhase(int level) WaveField& HardClipAmplitude(int level) WaveField& PartialClipPhase(int level, double epsilon) WaveField& PartialClipAmplitude(int level, double epsilon) Complex GetInterpolVal(double x, double y, Interpol ip = CUBIC8) const Complex GetInterpolVal(double x, double y, InterpolFunc intfunc = &Cubic8Interpol) const Complex Cubic8Interpol(double x, double y) const Complex Cubic6Interpol(double x, double y) const Complex Cubic4Interpol(double x, double y) const Complex LinearInterpol(double x, double y) const Complex AdjacentInterpol(double x, double y) const

14 14 Complex BiLinear(double x, double y) const Complex BiCubic(double x, double y) const Complex NearestNeighbor(double x, double y) const WaveField& Replicate(int mxy = 1) WaveField& Replicate(int mx, int my) WaveField& EnlargeZeroFill(int mxy = 1) WaveField& EnlargeZeroFill(int mx, int my) WaveField& Embed(int mxy = 1) WaveField& Embed(int mx, int my) WaveField& Extract(int mxy = 1) WaveField& Extract(int mx, int my) WaveField& ReduceByAverage(int mxy = 1) WaveField& ReduceByAverage(int mx, int my) WaveField& ExtractWindow(const WaveField& source, Complex backg = Complex(0.0, 0.0)) WaveField& Subdivide(int mxy = 1) WaveField& Subdivide(int mx, int my) WaveField& Pixelation(int mxy = 1) WaveField& Pixelation(int mx, int my) WaveField& DrawLine(int x1, int y1, int x2, int y2, const Complex& val = Comp(1.0, 0.0)) WaveField& Paint(int x, int y, const Complex& val = Comp(1.0, 0.0)) WaveField& PaintTriangle(int x1, int y1, int x2, int y2, int x3, int y3, const Complex& val = Comp(1.0, 0.0)) WaveField& PaintTriangle(const PointArray& pa, const Complex& val = Comp(1.0, 0.0)) Complex/ComplexDouble Complex(const float& a = 0.0, const float& b = 0.0) ComplexDouble(double a = 0.0, double b = 0.0) Complex(const ComplexDouble& c) ComplexDouble(const Complex& c) void SetReal(double a) double GetReal(void) const float& real(void) double& real(void)

15 15 void SetImag(double b) double GetImag(void) const float& imag(void) double& imag(void) double GetAmplitude(void) void SetAmplitude(double val) Phase GetPhase(void) void SetPhase(double val) double GetIntensity(void) void SetIntensity(double val) void Comp(float a = 0.0, float b = 0.0) Complex Conjugate(void) const Complex& operator=(const Complex& c) Complex& operator=(const ComplexDouble& c) ComplexDouble& operator=(const Complex& c) ComplexDouble& operator=(const ComplexDouble& c) Complex& operator+=(const Complex& c) Complex& operator-=(const Complex& c) ComplexDouble& operator+=(const ComplexDouble& c) ComplexDouble& operator-=(const ComplexDouble& c) Complex& operator*=(const Complex& c) Complex& operator*=(double c) ComplexDouble& operator*=(const ComplexCouble& c) ComplexDouble& operator*=(double c) Complex& operator/=(const Complex& c) Complex& operator/=(double c) ComplexDouble& operator/=(const ComplexCouble& c) ComplexDouble& operator/=(double c) Complex operator+(const Complex& rhs) const Complex operator-(const Complex& rhs) const ComplexDouble operator+(const ComplexCouble& rhs) const ComplexDouble operator-(const ComplexCouble& rhs) const Complex operator*(const Complex& rhs) const Complex operator*(double rhs) const ComplexDouble operator*(const ComplexCouble& rhs) const ComplexDouble operator*(double rhs) const

16 16 Complex operator/(const Complex& rhs) const Complex operator/(double rhs) const ComplexDouble operator/(const ComplexCouble& rhs) const ComplexDouble operator/(double rhs) const Complex operator-(void) const ComplexDouble operator-(void) const bool operator==(const Complex& rhs) const bool operator==(const ComplexCouble& rhs) const Complex/ComplexDouble double abs(complexdouble c) Phase arg(complexdouble c) double norm(complexdouble c) ComplexDouble euler(double t) ComplexDouble exp(complexdouble c) ComplexDouble polar(double A, double t) Complex Comp(float r = 0.0, float i = 0.0) Phase Phase(void) Phase(double phase) Phase(float phase) Phase( Phase phase) operator double() const Phase operator+(phase p) Phase operator-(phase p) Phase Phase(double phase) Phase(float phase) operator double() const Vector/Point Vector(double x = 0, double y = 0, double z = 0) Point(double x = 0, double y = 0, double z = 0) double GetX() const double GetY() const double GetZ() const

17 17 void SetX(double val) void SetY(double val) void SetZ(double val) double& X() double& Y() double& Z() static Vector I(void) static Vector J(void) static Vector K(void) double GetLength(void) const Vector& SetLength(double len) double GetSqure(void) const Vector& Normalize(void) Vector GetNormalized(void) const double GetDistance(Point p) const double GetDistance(const Line& line)const double GetDistance(const Plane& plane)const bool IsInline(const Line& line) const bool IsInplane(const Plane& plane) const bool IsEmpty() Vector operator-(void) const Vector operator*(double rhs) const Vector operator/(double rhs) const Vector& operator*=(double rhs) Vector& operator/=(double rhs) Vector operator-(const Vector& rhs) const Vector operator+(const Vector& rhs) const Vector& operator-=(const Vector& rhs) Vector& operator+=(const Vector& rhs) double operator*(const Vector& vec) Vector operator&(const Vector& vec) const Vector& operator&=(const Vector& vec) Vector& operator*=(const RMatrix& mat) bool operator==(const Vector& rhs) const bool operator!=(const Vector& rhs) const PointArray

18 18 PointArray(int n = 0) PointArray(const Point& p) PointArray(const LineSegment& ls) int GetN(void) const const Point& GetPoint(int i) const Point& At(int i) const void SetPoint(int i, const Point& p) void Insert(const Point& p) void Insert(int i, const Point& p) void Remove(void) void Remove(int i) PointArray& Rotate(const RMatrix& r) PointArray GetBoundingBox(void) const Vector GetCenter(void) const void SetCenter(const Vector& p) void Localize(void) double GetMaxX(void) const double GetMaxY(void) const double GetMaxZ(void) const double GetMinX(void) const double GetMinY(void) const double GetMinZ(void) const double GetWidth(void) const double GetHeight(void) const double GetDepth(void) const Plane GetPlane(void) const PointArray& ProjectionOn(const Plane& plane) PointArray& ProjectionOn(const Plane& plane, const Line& line) bool IsInplane(void) const void SaveAsCsv(const char* fname) const Point& operator[](int i) const PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) bool operator==(const PointArray& rhs)

19 19 bool operator!=(const PointArray& rhs) LineSegment LineSegment() LineSegment(const Point& begin, const Point& end) const Point& GetBegin(void) const const Point& GetEnd(void) const double GetLength(void) const Vector GetVector(void)const Vector GetUnitVector(void) const PointArray& Rotate(const RMatrix& r) bool IsParallel(const Plane& plane) const bool IsEmpty(void) const bool operator==(const LineSegment& ls) bool operator!=(const LineSegment& ls) PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) Line Line(void) Line(const Point& p, const Vector& n) Line(const LineSegment& ls) const Point& GetPoint(void) const const Vector GetUnitVector(void) const double GetDistance(const Point& p) const const Point& GetVerticalPoint(const Point& p) const Point GetIntersectionPoint(const Plane& plane) const bool IsParallel(Plane& plane) const bool Include(const Point& p) const PointArray& Rotate(const RMatrix& r) bool IsEmpty(void) const bool operator==(const Vector& rhs) const bool operator!=(const Vector& rhs) const

20 20 PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) static Line X(void) static Line Y(void) static Line Z(void) Plane Plane(void) Plane(const Point& p1, const Point& p2, const Point& p3) Plane(const Point& p, const Vector& n) const Vector& GetNormalVector(void) const double GetDistance(void) const double GetDistance(const Point& p) const double GetX(double y, double z) const double GetY(double x, double z) const double GetZ(double x, double y) const Point GetIntersectionPoint(const Line& line) const Line GetIntersectionLine(const Plane& plane) const Point GetVerticalPoint(const Point& p) const PointArray& Rotate(const RMatrix& r) bool IsParallel(const Line& line) const bool IsParallel(const Plane& plane) const Include(const Point& p) const bool IsEmpty(void) const bool operator==(const Plane& plane) const bool operator!=(const Plane& plane) const PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat)

21 21 static Plane XY(void) static Plane YZ(void) static Plane ZX(void) SFrequency SFrequency() SFrequency(double lmd, double u, double v) double GetWavelength(void) const void SetWavelength(double val) SFrequency& SetU(double val) SFrequency& SetV(double val) SFrequency& SetUV(double u, double v) double GetU(void) const double GetV(void) const double GetW(void) const double CalcW(void) const void Normalize(void) SFrequency& Rotate(const RMatrix& r) SFrequency operator-(const SFrequency& rhs) SFrequency operator+(const SFrequency& rhs) RMatrix RMatrix(void) RMatrix(const Vector& dest, const Vector& source) RMatrix GetInverse(void) Vector operator*(const Vector& p) const RMatrix operator*(const RMatrix& rhs) const SFrequency operator*(const SFrequency& sf) const static const RMatrix& RotationX(double t) static const RMatrix& RotationY(double t) static const RMatrix& RotationZ(double t) static const RMatrix& CRotationX(double t) static const RMatrix& CRotationY(double t) static const RMatrix& CRotationZ(double t) StopWatch

22 StopWatch(void) void Reset(void) void Start(void) void Stop(void) double Read(void) FftLib ComplexForm WindowFunc Mode Interpol Axis ErrorCode ErrorHandling Gradation Platform CpuType DevelopEnv SphericalWaveDescriptor SphericalWaveDescriptor(double wavelength, double px, double py, Vector ref=vector(0, 0, 1.0)) bool IsSameAs(double wavelength, double px, double py, Vector ref=vector(0, 0, 1.0)) bool operator==(const SphericalWaveDescriptor& swd) ShiftedFresnelPropDescriptor ShiftedFresnelPropDescriptor(double distance, double dpx, double dpy, double spx, double spy, double wavelength, int nx, int ny) ShiftedFresnelPropDescriptor(double distance, double destpx, double destpy, const WaveField& source) bool IsCompatibleWith(double distance, double dpx, double dpy, double spx, double spy, double wavelength, int nx, int ny) const bool IsCompatibleWith(double distance, double dpx, double dpy, const Wave- Field& source) const bool operator==(const ShiftedFresnelPropDescriptor& sfpd) const

23 II PolygonSource PolygonSource MS Visual Studio PolygonSource psl void MultiplyDiffuser(WaveField& fb, const WaveField& diffuser) double CorrectedPolygonAmplitude(const WaveField& pfb, const WaveField& tfb, double brt, double gamma = 0) void PaintPolygonShape(WaveField& fb, const Polygon& polygon, Complex amp) void PaintObjectSilhouette(WaveField& fb, const IndexedFaceSet model) AofCallback IndexedFaceSet

24 IndexedFaceSet() IndexedFaceSet(const PointArray& pa) int GetNumberOfPolygon(void) const int GetNumberOfVertex(int n) const int GetNumberOfPoint(int n) const int GetVertexIndex(int n, int m) const int GetPointIndex(int n, int m) const void Insert(const Point& p) const Point& GetPoint(int n, int m) const const Point& GetVertex(int n, int m) const Point& PointAt(int n, int m) Point& VertexAt(int n, int m) void InsertPolygon(int p1, int p2, int p3, int p4 = -1) Polygon GetPolygon(int n) void SetColor(int n, const Color& cl) const Color& GetColor(int n) const void SetNormalVector(int n, const Vector& vec) const Vector& GetNormalVector(int n) const void AutoNormalVector(void) void SetWidth(double v) void SetHeight(double v) void SetDepth(double v) int LoadWrl(const char* fname) int LoadWrl(const wchar t* fname) int LoadDxf(const char* fname) int LoadDxf(const wchar t* fname) int LoadPov(const char* fname) int LoadPov(const wchar t* fname) int LoadPov(const char* fname, int n) int LoadPov(const wchar t* fname, int n) void Split(IndexedFaceSet& front, IndexedFaceSet& back, double z) void AutoSplit(IndexedFaceSet& front, IndexedFaceSet& back) SurfaceBuilder SurfaceBuilder(double wavelength, double px, double py) SurfaceBuilder(const WaveField& wf) SurfaceBuilder(void)

25 25 double GetPx(void) const double GetPy(void) const double GetWavelength(void) const void SetDiffractionRatio(double df) double GetDiffractionRatio(void) void SetCullingRate(double val) double GetCullingRate(void) void SetPfbExtension(bool onoff) void SetTfbExtension(bool onoff) void SetShader(TfbPaint& sh) TfbPaint& GetShader(void) void SetTexture(TfbPaint& sh) TfbPaint& GetTexture(void) void SetCurrentPolygon(Polygon& p) const Polygon& GetPolygon(void) const void AddPolygonField(WaveField& framebuff) void AddPolygonField(WaveField& framebuff, Interpol ip) void AddObjectField(WaveField& framebuff, IndexedFaceSet& model) void AddObjectField(WaveField& framebuff, IndexedFaceSet& model, Interpol ip) void AddObjectField(WaveField& framebuff, IndexedFaceSet& model, int t) void AddObjectField(WaveField& framebuff, IndexedFaceSet& model, int t, Interpol ip) void AddObjectFieldMt(WaveField& framebuff, IndexedFaceSet& model, Interpol ip = wfl::bicubic)) void AddObjectFieldMt(WaveField& framebuff, IndexedFaceSet& model, int threads, Interpol ip = wfl::bicubic) void SetCallback(AofCallback prog) BoundingBox GetDiffractionRect(const PointArray& pa, double z) int GetNumOfVisible(const IndexedFaceSet& model) bool IsVisible(void) void SetupTfb(WaveField& tfb) void SetupPfb(WaveField& pfb) const void PaintPolygonShape(WaveField& tfb, double amp)

26 26 void RotateFs(WaveField& pfb, const WaveField& tfb, SideOption side) const 182 void SetFrameZ(double fz) double GetFrameZ(void) const Point GetRotationCenter(void) TfbPaint : TfbPaint TfbPaint(double gm) virtual void PaintTfb(WaveField& tfb, const psl::polygon& polyl, const psl::polygon& polyg, const WaveField& pfb) = void SetGamma(double gm) / TfbFlatShading(const WaveField& diffuser, double gam) TfbFlatShading(const WaveField& diffuser, double gam, Vector dir, double env)184 TfbGouraudShading(const WaveField& diff, double gam, Vector dir, double env) TfbPhongShading(const WaveField& diff, double gam, Vector dir, double env) 185 TfbOlthoProjectMapping(const WaveField& texture) psl::polygon Polygon() explicit Polygon(const PointArray& points) explicit Polygon(const IndexedFaceSet& model, int n) void Insert(const Point& p) void Insert(int i, const Point& p) Vector GetNormalVector(void) const Point GetAveragePoint(void) const void SetBrightness(double b) double GetBrightness(void) const void SetColor(const Color& c) const Color& GetColor(void) const Color& Color(void) void ReverseVertexOrder(void) std::ostream& operator (std::ostream& os, const Polygon& polygon) Color Color(void) Color(double red, double green, double blue, double alpha = 0.0)

27 27 double GetBrightness(void) const void SetBrightness(double brt) BoundingBox BoundingBox(void) BoundingBox(const PointArray& pa) BoundingBox GetCommonRegion2D(const BoundingBox& bb) bool IsEmpty2D(void) bool IsEmpty2D(double criterion) bool IsEmpty2D(double cx, double cy) bool IsOverlap2D(const BoundingBox& bb) bool IsOverlap2D(const BoundingBox& bb, double criterion) bool IsOverlap2D(const BoundingBox& bb, double cx, double cy) PointArray GetFrame2D(int n) ImagingViewer ImagingViewer() void SetImagingDistance(double v) double GetImagingDistance(void) const void SetPupilDiameter(double v) double GetPupilDiameter(void) const void View(const WaveField& wf, Point p) void ViewWf(const char* fname, Point p) void SetHumanEyeParam(void) SegWaveField (Segmented wave-field) SegWaveField(const char* fn = NULL) SegWaveField(int mx, int my, const char* fn = NULL) SegWaveField(int mx, int my, const WaveField& temp, const char* fn = NULL) SegWaveField(int mx, int my, int nx, int ny, const char* fn = NULL) SegWaveField(double width, double height, const char* fn = NULL) SegWaveField(double width, double height, const WaveField& temp, const char* fn = NULL) const char* GetFileName(void) const void Dispose(void) void Dispose(const char* fn)

28 28 void Init(void) static void SetDefault(int mx, int my) int GetMx(void) const int GetMy(void) const void SetMx(int value) void SetMy(int value) double GetTotalWidth(void) const double GetTotalHeight(void) const Point GetCenter(void) void SetCenter(Point c) void SyncParam(void) WaveField& Segment(int i, int j) void SaveSeg(void) bool Exist(int i, int j) const int GetCx(void) const int GetCy(void) const / void SaveAsSegWf(const char* fname) void LoadSegWf(const char* fname) void SaveAsSegBmp(const char* fname, wfl::mode mode, wfl::gradation cs = wfl::gray) const void SaveAsCombinedBmp(const char* fname, wfl::mode mode, wfl::gradation cs = wfl::gray) void LoadSegBmp(const char* fname, wfl::mode mode) void LoadSegBmpAuto(const char* fname, wfl::mode mode) void SaveAsCombinedLw(const char* fname) SegWaveField& ShiftedAsmProp(SegWaveField& source) SegWaveField& ShiftedFresnelProp(SegWaveField& source)

29 I WaveField

30

31 WaveField WaveField PolygonSource WaveField MS Visual Studio.NET (Visual Studio 2003) WaveField MS Visual Studio 2005 WaveField Visual Studio IntelliSense 64 CPU (64 Visual Studio ) MS Visual Studio 2008 IntelliSense 64 CPU (64 Visual Studio ) Intel C++ Compiler WaveField WaveField Visual Studio 2008 Intel C++ Compiler 11

32 WaveField < >=c:\wavefieldtools < >\include\ *.h, *.cxx WaveField < >\lib\win32\ 32 < >\lib\x64\ 64 wfl.lib WaveField PATH (.exe ) < >\bin\win32\ 32 < >\bin\x64\ 64 wfl.dll

33 WaveField WaveField Example # include <wfl.h> using namespace wfl ; void main ( void ) { Start (); /* */ } wfl.h WaveField wfl.h WaveField WaveFieldLib wfl wfl using namespace wfl::start(); WaveField Start()

34 34 2 wfl.lib wfl.h wfl.lib PATH (*.EXE) wfl.dll N N 2 N N N 2 N E N 2 N N F E N A E N N N 2 N N WaveField 1 WaveField WaveField 1 ( ) Example 1 # include " wfl.h" 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField a (256, 1, 0.01), b (1024, 1, 0.02); 8 9 double f = 0.1; // 0.1 [1/ m] 10 double omega = 2 * Pi * f; // int i; 13 a. Clear (); // a 14 for (i = 0; i < a. GetNx (); i ++) // i < { 16 double x = a.x(i); // i x 17 a. SetReal (i, 0, cos ( omega *x )); // i c o s (x)

35 2.2 WaveField } b. Clear (); 21 for (i = 0; i < b. GetNx (); i ++) // i < { 23 double x = b.x(i); // i x 24 b. SetImag (i, 0, sin ( omega *x )); // i s i n (x) 25 } a. SaveAsCsv (" c o s. csv "); // C S V 28 b. SaveAsCsv (" s i n. csv "); 29 } 7 WaveField 1 N y = 1 a N x = 256 P x = 0.01[m] b N x = 1024 P x = 0.02[m] WaveField Clear() 2.1 [m] SI WaveField 2 n (n: ) 2 n 2 n ()i 0 i < N x for GetNx() Nx() i = N x /2 ( ) N x P x /2 x +(N x /2 1)P x N x P x /2 x < +N x P x /2 (x = +N x P x /2 ) X() ( ) I() (3.1) (3.2) WaveField Complex () SetReal() (17 ) SetImag() (24 )

36 36 2 a b 10 ( )Pi WaveField SaveAsCsv() CSV Example 1 # include " wfl.h" 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField :: SetDefault (512, 1); // 8 WaveField :: SetDefaultPx (0.01); // 9 10 WaveField a, b; // double f = 0.1; // 0.1 [1/ m] 13 double omega = 2 * Pi * f; // 14 int i; 15 b. Clear (); // 16 for (i = 0; i < a. GetNx (); i ++) // i < { 18 Complex c = (0, omega *a.x(i )); 19 a. SetPixel (i, 0, exp (c )); // i e x p ( i 2 f x ) 20 b. SetReal (i, 0, b.x(i)*b.x(i )); // i x 2 21 } 22 a *= b; // a = a * b 23 a *= 3.0; // a = a * 3 24 a. SaveAsCsv (" function. csv "); // C S V 25 } 7 8 SetDefault() SetDefaultPy() 10 a b P x = 0.01[m] a exp() exp(i2πfx) (18, 19 ) b x 2 (20 ) a 3x 2 exp(i2πfx) 19 exp() euler() euler() a.setpixel(i, 0, euler(omega*a.x(i)));

37 2.2 WaveField FFT 1 Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main ( void ) 5 { 6 Start (); 7 WaveField :: SetDefault (1024, 1, 0.01); 8 WaveField a, b; 9 int i; // a 12 a. Clear (); 13 for (i = a.i ( -0.5); i < a.i (+0.5); i ++) 14 a. SetReal (i, 0, 1.0); 15 a. SaveAsCsv (" Rect. csv "); 16 a. Fft ( -1); // 17 a. SaveAsCsv ("FFT - Rect. csv "); // ( ) b 20 b. Clear (); 21 for (i = b.i ( -1.0); i < b.i (+1.0); i ++) 22 b. SetReal (i, 0, fabs (b.x(i ))); 23 b. SaveAsCsv (" lambda. csv "); 24 b. Fft ( -1); // 25 b. SaveAsCsv ("FFT - lambda. csv "); 26 } 1/2 x +1/2 Λ 1 x I() i ( ) Fft() Fft() 1 +1 (3.3) SetRect() a.setrect(1.0, 1.0); ( ) a *= a.getpx(); b *= b.getpx();

38 WaveField 2 WaveField BMP Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main ( void ) 5 { 6 Start (); 7 WaveField f (512, 512, 10e -6); // 512 x int i, j; 9 double z = 100e -3; // 100 m m // f 12 for (j = 0; j < f. GetNy (); j ++) 13 for (i = 0; i < f. GetNx (); i ++) 14 { 15 double x = f.x(i), y = f.y(j); 16 double r = sqrt (x*x + y*y + z*z); 17 f. SetPixel (i, j, polar (1/ r, a. GetWavenumber ()* r )); 18 } f. Normalize (); // 21 f. SaveAsBmp (" SphericalWave - amp. bmp ", AMPLITUDE ); 22 f. SaveAsBmp (" SphericalWave - phs. bmp ", PHASE ); 23 } (x, y, z) (x, y, 0) f(x, y) = r 1 exp[ikr] r = x 2 + y 2 + z 2 (2.1) polar() f(x, y) f f(x, y) 2 BMP SaveAsBmp() WaveField BMP Mode 2.2 Gradation COLOR SaveAsBmp() SaveAsBmp() A A = 0 A = 1 0 A 1.0 Normalize() z

39 2.3 WaveField 2 39 Normalize() z z WaveField AddSphericalWaveSqr() 2.2 (SphericalWave-phs.bmp) Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main ( void ) 5 { 6 Start (); 7 WaveField a (512, 512, 0.1); // 512 x a. SetRect (1.0, 1.0); // 1 a 9 a. Fft ( -1); // 10 a. Normalize (); 11 a. SaveAsBmp (" RectFFT - amp. bmp ", AMPLITUDE, COLOR ); 12 } 11 SaveAsBmp() Gradation COLOR SaveAsBmp() 0

40 40 2 a.saveasbmp("rectfft-amp.bmp", AMPLITUDE, COLOR, 0); 2 FFT FFT WaveField FFT GPGPU FFT () Fft() FFT wfl::setfftlib() 2.3 (RectFFT-amp.bmp) FFT sinc FFT sinc Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main ( void ) 5 { 6 Start (); 7 WaveField a; 8 a. LoadBmp (" shion -128 gs.bmp ", AMPLITUDE ); // 9 a. ModRandomPhase (); // 10 a. SaveAsBmp (" input - amp. bmp ", AMPLITUDE ); // 11 a. SaveAsBmp (" input - phs. bmp ", PHASE ); // 12 a. Fft ( -1); // 13 a. Embed (); // 14 a. Normalize (); 15 a. SaveAsBmp (" EmbededSpectrum - amp. bmp ", AMPLITUDE ); // 16 a. Fft (1); // 17 a. Normalize (); 18 a. SaveAsBmp (" OutputImage. bmp ", AMPLITUDE, GRAY ); // 19 }

41 E F K J = F > F E F K J F D I > F LoadBmp() WaveField a 9 ModRandomPhase() 2.4 sinc Embed() phase dislocation phase dislocation( ) unwrapping ( ) 2 - > 5 F A? J H K = F > F K J F K J 1 = C A > F 2.5 sinc

42 mm 20mm 2 Example (1) 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField a (256, 256, 2e -6); 8 9 // ===== a 10 int i, j; 11 for (i = 0; i < a. Nx (); i ++) 12 { 13 for (j = 0; j < a. Ny (); j ++) 14 { 15 double x = a. itox (i); 16 double y = a. jtoy (j); 17 double r = sqrt (x*x + y*y); 18 if (r < 0.1e -3) // 0.1 m m 19 a. SetPixel (i, j, Complex (1.0, 0)); // else 21 a. SetPixel (i, j, Complex (0, 0)); // } 24 } 25 a. SaveAsBMP (" Aperture. bmp ", AMPLITUDE ); // // ===== 28 a. AsmProp (1e -3); //1 m m 29 a. Normalize (); 30 a. SaveAsBmp (" Diffraction. bmp ", AMPLITUDE ); //( ) 31 } a a 0.1mm (a) = ) F A H J K H A > F >, E B B H =? J E > F 2.6

43 WaveField AsmProp() a AsmProp() WaveField () 2.6(b) [1] 1mm 2.6(b) = ) F A H J K H A > F >, E B B H =? J E > F 2.7 Example (2) 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField a (256, 256, 2e -6); 8 9 // ===== a 10 a. SetGaussian (0.1e -3, 50); // 0.1 m m 11 a. SaveAsBMP (" Aperture. bmp ", AMPLITUDE ); // // ===== 14 a. AsmProp (1e -3); //1 m m 15 a. Normalize (); 16 a. SaveAsBmp (" Diffraction. bmp ", AMPLITUDE ); //( ) 17 } 10 WaveField SetGaussian() 2 SetGaussian() 2

44 ( 50 ) * (b) FFT WaveField AsmProp() AsmProp() 2.6(a) 2.8 Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField a (256, 256, 2e -6); 8 9 a. SetGaussian (0.1e -3, 50); 10 a. SaveAsBMP (" Aperture. bmp ", AMPLITUDE ); // // ===== 13 for ( int i = 1; i <= 3; i ++) 14 { 15 WaveField b = a; // b a 16 double d = 10e -3 * i; // d 17 b. AsmProp (d); // b d 18 char fname [80]; // 19 sprintf ( fname, " Diffraction -%d. bmp ", ( int )(d/1e -3)); 20 b. Normalize (); 21 b. SaveAsBmp ( fname, AMPLITUDE ); //( ) 22 } 23 } = > F >, E B B H =? J E > F >, E B B H =? J E! > F 2.8 AsmProp() (a)10mm (b)20mm (c)30mm *1

45 WaveField b a AsmProp() 2.8(c) 4 ( 2 ) WaveField Embed() Extract() AsmProp() Example ( ) 1 // ===== 2 for ( int i = 1; i <= 3; i ++) 3 { 4 WaveField b = a; 5 double d = 10e -3 * i; 6 b. Embed (1); //4 7 b. AsmProp (d); // 8 b. Extract (1); //4 1 9 char fname [80]; 10 sprintf ( fname, " Diffraction -%d. bmp ", ( int )(d/1e -3)); 11 b. Normalize (); 12 b. SaveAsBmp ( fname, AMPLITUDE ); 13 } = > F >, E B B H =? J E > F >, E B B H =? J E! > F (a)10mm (b)20mm (c)30mm ExactAsmProp() FFT AsmPropFs()

46 FFT 1 FFT 2 *2 FFT 1 WaveField WaveField FresnelProp() Example 1 FFT 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField a (256, 256, 10e -6); 8 a. SetGaussian (0.5e -3, 50); 9 10 // ===== 11 for ( int i = 1; i <= 3; i ++) 12 { 13 WaveField b = a; // b a 14 double d = 20e -3 * i; // d 15 b. FresnelProp (d); // b d 16 b. Normalize (); 17 char fname [80]; // 18 sprintf ( fname, " Diffraction -%d. bmp ", ( int )(d/1e -3)); 19 b. SaveAsBmp ( fname, AMPLITUDE ); //( ) 20 printf (" :%2.0 lf[mm] : % 4. 2 l f %4.2 lf [mm ^2]\ n", 21 d/1e -3, b. GetWidth ()/1e -3, b. GetHeight ()/1e -3); 22 } 23 } 15 FresnelProp() 21 WaveField GetWidth() GetHeight() () FFT 1 FFT *2 CPU

47 FFT Example 1 *** WaveFieldLib <Intel C ++/ Win32 / SSE1 > Rel CPU Core : 4 2 : 2 0 [ mm] : [mm ^2] 3 : 4 0 [ mm] : [mm ^2] 4 : 6 0 [ mm] : [mm ^2] 5... = > F >, E B B H =? J E " > F >, E B B H =? J E $ > F FFT (a)20mm (b)40mm (c)60mm 1 FFT (Shifted Fresnel Method) µm 532nm Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField :: SetDefault (512, 512, 10e -6, 10e -6, 532e -9); 8 WaveField a, b; 9 a. SetGaussian (1e -3); // 1/ e 2 m m 10 b. SetRect (50e -6, 5e -3); // m m 11 b *= a; 12 b. AsmProp (50e -3); // 5 0 m m 13 b. Normalize (); 14 b. SaveAsBmp (" amp. bmp ", AMPLITUDE ); 15 b. SaveAsBmp (" phase. bmp ", PHASE );

48 } a b 1/e 2mm 9 WaveField SetGaussian() 2 WaveField SetRect() 10 (11 ) AsmProp() 2.11 = 2.11 > Example 1 # include <wfl.h> 2 using namespace wfl ; 3 4 void main () 5 { 6 Start (); 7 WaveField :: SetDefault (128, 128, 2e -6); 8 double R = 0.5e -3; // 9 10 // ===== a 11 WaveField a; 12 a. LoadBmp (" Shion -128 gs.bmp ", AMPLITUDE ); 13 a. Embed (3); // 8 x // ===== b 16 WaveField b; 17 b. Embed (3); // a 18 b. SetGaussian (R, 100); // R 19 b. SetQuadraticPhase (10e -3); // 1 0 mm 20 b. SaveAsLw (" lens.lw"); // l w // ===== a 23 a. AsmProp (20e -3); // 2 0 mm // ===== a b 26 b *= a; // ===== b

49 b. AsmProp (20e -3); // 2 0 mm 30 b. Extract (3); // 1/(8*8) 31 b. Normalize (); // 32 b. SaveAsBmp (" image. bmp ", AMPLITUDE ); 33 } a b a 2.12(a) 2µm ( µm 2!) 13 Embed() b SetGaussian() 100 SetQuadraticPhase() 10mm a b b AsmProp() b 20mm 2.12(b) = 4 4 # 4 > 2.12 (a) (b) 20 WaveField SaveAsLw() LW LW WaveField LW WaveField LoadLw() WaveField

50 50 2 WaveFront LW FFT 2.9

51 WaveField void Start(int MsgLevel = 1) void Start(const char* fname) void Start(int MsgLevel, const char* fname) WaveField 1 MsgLevel MsgLevel 1 WaveField 1 2 fname 1 3 MsgLevel fname WaveFieldLib 0 3 0

52 52 3 void PrintLog(const char* format,...) void PrintL(const char* format,...) void Printf(const char* format,...) format & Start() format printf() format PrintLog() CPU PrintL() CPU Printf() printf() Example Start (3," log. txt "); WaveField wf (256, 256); float x = 1.0, y = 2.0; PrintLog ("PrintLog () x = %f, y = %f\n", x, y); PrintL (" PrintL () x = %f, y = %f\n", x, y); Printf (" Printf () printf () x = %f\n", x); Example ( ) *** WaveFieldLib <Intel C ++/ Win32 / SSE1 > Rel CPU Core : 4 *** Build : Jun :12:32 Intel C++ Ver.10.10, Copyright K. Matsushima *** Logging Start from 2008/05/13 15:25:38, File : log. txt >>> CPU Time : Sec (2008/05/13 15:25:38) <<< PrintLog () x = , y = s> PrintL () x = , y = Printf () printf () x = double GetTickSec() Start() CPU StopWatch

53 FILE* GetLogFile(void) Start() void SetNumThreads() void SetNumThreads(int n) WaveFieldLibrary 1 CPU 2 n Start() 1 GetNumProcs() OMP omp get num procs() ()1 void PushNumThreads(int n) WaveFieldLibrary n PopNumThreads() int PopNumThreads(void) PushNumThreads() int GetNumThreads(void) WaveField Example

54 54 3 SetNumThreads (); Printf ("% d ", GetNumThreads ()); void SetDynamicThreads(bool onoff) (onoff=true) (onoff=false) bool GetDynamicThreads(void) int GetNumProcs(void) WaveField Example SetNumThreads (); Printf ("% d ", GetNumProcs ()); / FFT / void* Malloc(size t size, const char* msg = NULL) malloc() 16 SSE ErrorCode MEMORY msg void Free(void* p) Malloc() p void SetFftLib(FftLib fl)

55 FftLib fl FFT WaveFieldLibrary FFT FFT MKL FFT WaveField Fft() FftLib GetFftLib(void) FftLib FFT / WF void CreateFileMpWf(const char* fname, unsigned short int size) size WF fname / WaveField SaveAsMpWf() LoadMpWf() LoadParamMpWf() int GetSizeMpWf(const char* fname) fname WF void CreateFileSegWf(const char* fname, unsigned short int mx, unsigned short int my) mx my WF fname WF / WaveField SaveAsSegWf() LoadSegWf() LoadParamSegWf()

56 56 3 int GetSizeSegWf(const char* fname, int& mx, int& my) fname WF mx my void SetErrorHandling(ErrorHandling eh) WaveFieldLibrary ( ) 2 ErrorHandling eh ErrorCode GetErrorString() WaveFieldException CONSOLE exit(1) ErrorHandling GetErrorHandling(void) ErrorHandling void Error(ErrorCode n, const char* funcname, const char* msg) ErrorCode n funcname msg WFL ERROR() ErrorCode GetErrorString()

57 WFL ERROR1(n) WFL ERROR(n, msg). ErrorCode n 2 msg ErrorCode GetErrorString() #define WFL ERROR1(n) Error(n, FUNCTION ) #define WFL ERROR(n) Error(n, FUNCTION, msg) const char* GetErrorString(ErrorCode n) ErrorCode n ErrorCode int GetMajorVersion(void) int GetMinorVersion(void) int GetPatchNumber(void) WaveFieldLibrary xx.yy.zz xx yy zz const char* GetVersionString(void) xx.yy.zz WaveFieldLibrary Platform GetPlatform(void)

58 58 3 Platform WaveFieldLibrary const char* GetPlatformString(void) WaveFieldLibrary DevelopEnv GetCreateEnv(void)) DevelopEnv WaveFieldLibrary const char* GetCreateEnvString(void) WaveFieldLibrary DevelopEnv GetDevelopEnv(void) DevelopEnv const char* GetDevelopEnvString(void) DevelopEnv GetTargetEnv(void) DevelopEnv WaveFieldLibrary const char* GetTargetEnvString(void) WaveFieldLibrary CpuType GetCpuType(void) CpuType

59 WaveFieldLibrary CPU const char* GetCpuTypeString(void) CPU WaveFieldLibrary CPU const char* GetCreateEnvVersionString(void) WaveFieldLibrary const char* GetCreateTimeStamp(void) WaveFieldLibrary void SetPositionTolerance(double t) const double& GetPositionTolerance(void) [m] const RMatrix& RMatrixX(double t) const RMatrix& RMatrixY(double t) const RMatrix& RMatrixZ(double t) RMatrix x y z t[rad] RMatrix RotationX()

60 60 3 const RMatrix& CRMatrixX(double t) const RMatrix& CRMatrixY(double t) const RMatrix& CRMatrixZ(double t) RMatrix x y z t[rad] RMatrix CRotationX() InterpolFunc GetInterpolFunc(Interpol interpol) InterpolFunc WaveField Interpol InterpolFunc WaveField GetInterpolFunc() typedef Complex (WaveField::*InterpolFunc)(double x, double y) const const double Pi π Example double angle = Pi /2; // 9 0 PI π const double Deg (degree) π/180 Example

61 O N O O N N 3.2 WaveField 61 Phase phs = 15* Deg // 1 5 double angle = 90* Deg ; // 9 0 DEG (degree) π/ WaveField WaveField 2 WaveField 3.1 O N 3.1 WaveField WaveField WaveField 2 (i, j) 2 (0, 0) (N x 1, N y 1) N x N y x y (x, y) (i, j) (x, y)

62 62 3 ( x = i N ) x P x 2 ( y = i N ) y P y 2 x i = P x y j = P y N x N y 2 (3.1) (3.2) ξ ξ (i, j) (x, y) X() Y() (x, y) (i, j) I() J() ( (ˆx, ŷ)) GetOrigin() SetOrigin() z GetNormalVector() SetNormalVector() ẑ WaveField (i, j) top, bottom, right, left 3.3 bottom left top right top 1 right 1 ( )

63 3.2 WaveField 63 O O O 2 O O 2 N N O O O O F E N A 2 O N O O 2 O N N N 2 N N N F E N A N N N 2 N WaveField(void) WaveField(int nxy) WaveField(int nx, int ny) WaveField(int nx, int ny, double pxy) WaveField(int nx, int ny, double px, double py) WaveField(int nx, int ny, double px, double py, double wavelength) 1 2 x y nxy 3 x nx y nx x, y p [ :m] 4 x y px py 5 wavelength [ :m]

64 () N x = N y = 256 P x = P y = 1µm λ = 632.8nm Example // WaveField wf1 ; //512 x WaveField wf2 (512); // 1024 x x, y 1 0 u m WaveField wf3 (1024, 1024, 10e -6); // 2048 x x 5 u m y 1 0 u m WaveField wf3 (2048, 2048, 5e -6, 10e -6); WaveField(const WaveField& wf);

65 3.2 WaveField 65 ~WaveField(void) WaveField void Dispose(void) WaveField WaveField& Init(Complex* d = NULL) WaveField d NULL d NULL d ( ) Clear() d d=null N x N y WaveField SSE 16 wfl::malloc() 16 Complex* GetDataPointer(void) WaveField& Clear(void) WaveField 0

66 66 3 WaveField& CopyParam(const WaveField& source) WaveField N x N y source N x N y SetNx() SetNy() Init() WaveField& CopyData(const WaveField& source) WaveField source N x N y N x N y () WaveField:: WaveField static void SetDefault(long nxy) static void SetDefault(long nx, long ny) static void SetDefault(long nx, long ny, double pxy) static void SetDefault(long nx, long ny, double px, double py) static void SetDefault(long nx, long ny, double px, double py, double lmd) 1 nxy N x N y 2 nx ny N x N y 3 2 pxy P x P y 4 2 px py P x P y 5 4 lmd

67 3.2 WaveField 67 static void SetDefaultWavelength(double lmd) lmd static double GetDefaultWavelength(void) static void SetDefaultNx(long nx) static void SetDefaultNy(long ny) nx ny N x N y static long GetDefaultNx(void) static long GetDefaultNy(void) N x N y static void SetDefaultPx(double px) static void SetDefaultPy(double py) px py P x P y static double GetDefaultPx(void) static double GetDefaultPy(void) P x P y Example // WaveField :: SetDefault (1024, 1); // wf1, w f x e -6 x1e -6, nm WaveField wf1, wf2 ; // 1024 x WaveField :: SetDefault (1024, 1024); WaveField a; // a b x e -6 x1e nm WaveField b;

68 68 3 WaveField :: SetDefualtPy (10e -6); WaveField c (512, 1024); // c x e -6 x10e nm WaveField :: SetDefualtWavelength (532e -9); WaveField c, d, e; // c, d, e x e -6 x10e nm bool IsRealSpace(void) const bool IsComplexAmplitude(void) const ( ) true bool IsFourierSpace(void) const bool IsSpectrum() const () true bool IsComplexForm(void) const true ComplexForm bool IsPolarForm(void) const true ComplexForm

69 3.2 WaveField double GetWavelength(void) const WaveField LightWave& SetWavelength(double lambda) lambda WaveField double GetWavenumber(void) const WaveField WaveField& SetWavenumber(double k) k WaveField float& k(void) WaveField LightWave size t N(void) const size t GetN(void) const WaveField GetNx()*GetNy()

70 70 3 const long& GetNx(void) const const long& GetNy(void) const x y x y WaveField& SetNx(long n) WaveField& SetNy(long n) n x y Init() Example WaveField wf; // w f wf. SetNx (512); // x wf. SetNy (1024); // y wf. Init (); // w f long& Nx(void) long& Ny(void) x y int LightWave Init() const double& GetPx(void) const const double& GetPy(void) const x y

71 3.2 WaveField 71 WaveField& SetPx(double pitch) WaveField& SetPy(double pitch) pitch x y Example WaveField wf; // w f wf. SetPx (100e -6); // x u m wf. SetPx (50e -6); // y 5 0 u m double& Px(void) double& Py(void) double x y LightWave ( ) Complex& operator[](int i) 1 i Example WaveField wf; Complex a; a = wf [10]; // 10 a wf [15]= Comp (1.0, 0.5); // i Complex GetPixel(int i, int j) const Complex (i, j) Example WaveField wf; Complex c = wf. GetPixel (10, 15); // (10,15)

72 72 3 WaveField& SetPixel(int i, int j, Complex val) (i, j) Complex val Example WaveField wf; wf. Pixel (10, 15, Complex (1.0, 0.5); // (10,15) i Complex& Pixel(int i, int j) Complex (i, j) LightWave Example WaveField wf; wf. Pixel (10, 15) = Complex (1.0, 0.5); // (10,15) i double GetReal(int i, int j) const double GetImag(int i, int j) const (i, j) Example WaveField wf; double re = wf. GetReal (10, 50); // (10,50) double im = wf. GetImag (10, 50); // (10,50) WaveField& SetReal(int i, int j, double val) WaveField& SetImag(int i, int j, double val) (i, j) val Example WaveField wf; wf. SetReal (10, 50, 0.53); // (10,50) wf. SetImag (10, 50, 0.0); // (10,50) 0

73 3.2 WaveField 73 float& Real(int i, int j) float& Imag(int i, int j) (i, j) LightWave Example float g = wf. Real (10, 50); // (10,50) wf. Real (23, 1) = 10 * g; // (32,1) wf. Imag (23, 1) *= 3; // (23,1) 3 double GetAmplitude(int i, int j) (i, j) void SetAmplitude(int i, int j, double val) (i, j) val Phase GetPhase(int i, int j) Phase (i, j) π +π void SetPhase(int i, int j, double val) (i, j) val

74 74 3 double GetIntensity(int i, int j) ( 2 ) (i, j) ( 2 ) void SetIntensity(int i, int j, double val) (i, j) ( 2 ) WaveField& SetConst(const Complex& c) WaveField& SetConstReal(double a) WaveField& SetConstImag(double b) WaveField& SetConstAmplitude(double A) WaveField& SetConstPhase(double p) WaveField& SetConstWin(const Complex& c) WaveField& SetConstWinReal(double a) WaveField& SetConstWinImag(double b) WaveField& SetConstWinAmplitude(double A) WaveField& SetConstWinPhase(double p) double X(int i) const x i x i

75 3.2 WaveField 75 double Y(int j) const y j y j int I(double x) const i x i x int J(double y) const j y j y int IJ(int i, int j) const 1 i j 1 double GetMaxX(void) const double GetMinX(void) const double GetMaxY(void) const double GetMinY(void) const () double GetWidth(void) const x ( :m) x double GetHeight(void) const y ( :m)

76 76 3 y double GetMaxX(void) const double GetMinX(void) const double GetMaxY(void) const double GetMinY(void) const () WaveField& ShiftZeroFill(Axis axis, double dxy) WaveField& ShiftZeroFill(double dx, double dy) x y 1 Axis axis dxy 2 x dx y dy WaveField& Rotate(const WaveField& source, RMatrix& crmat, SFrequency* c = NULL, Interpol ip = CUBIC8, bool Jacobian = false) source RMatrix crmat SFrequency c NULL *c Interpol ip Jacobian = true [2, 3] WaveField& RotateFs(const WaveField& source, RMatrix& crmat, SFrequency* c = NULL, Interpol ip = CUBIC8, bool Jacobian = false)

77 3.2 WaveField 77 source [2, 3] source RMatrix crmat SFrequency c NULL *c Interpol ip Jacobian = true Example RMatrix rm = CRMatrixY (15* Deg ); // y 1 5 WaveField a, b; a. LoadLw (" input.lw"); a. Fft ( -1); // a b. FakeFft (); // b b. RotateFs (a, rm ); // a b b. Fft (1); // b b/=b. GetN (); b. SaveAsLw (" result.lw"); WaveField& ImageRotation(int n) 90 (n=1) 180 (n=2) 270 (n=3) Rotate() RotateFs() WaveField& SwitchQuadrant(void) FFT WFL RECT& Window(void) WFL RECT WFL RECT WFL RECT

78 78 3 Example WaveField wf (64, 64); /* */ wf. Window (). left = 10; wf. Window (). right = 20; wf. Window (). top = 10; wf. Window (). bottom = 5; /* */ int width = wf. Window (). right - wf. Window (). right ; int height = wf. Window (). top - wf. Window (). bottom ; WaveField& SetWindow(const WFL RECT& r) WFL RECT r r.left, r.right, r.top, r.bottom WFL RECT MSDN Example WaveField wf (64, 64); WFL_RECT r; r. left =10; r. right 20; r. top = 10; r. bottom = 5; wf. SetWindow (r); WaveField& SetWindow(int left, int right, int bottom = 0, int top = 0) (i, j) WaveField& SetWindow(double left, double right, double bottom = 0.0, double top = 0.0) (x, y) WaveField& SetWindowMax(void) WaveField& SetWindowCommon(WaveField& signal) signal

79 3.2 WaveField 79 WaveField& TransferWindow(WaveField& source) source WaveField WaveField& operator=(const WaveField& wf) WaveField& operator*=(const WaveField& wf) WaveField& operator/=(const WaveField& wf) WaveField& operator+=(const WaveField& wf) WaveField& operator-=(const WaveField& wf) WaveField 2 C WaveField N x N y WaveField 2 Example WaveField wf1, wf2 ; wf1 *= wf2 ; // w f 1 w f 2 w f 1

80 80 3 WaveField& operator*=(double val) WaveField& operator*=(const ComplexDouble& val) WaveField& operator/=(double val) WaveField& operator/=(const ComplexDouble& val) WaveField& operator+=(const ComplexDouble& val) WaveField& operator-=(const ComplexDouble& val) double ComplexDouble val C Example WaveField wf; wf *= Complex (3.0, 2.0); // w f i WaveField& SetNormalVector(Vector v) Vector v Vector GetNormalVector(void) const Vector WaveField& SetOrigin(Point p) Point p Point GetOrigin(void) const Point Vector GetUnitVectorX(void) const Vector GetUnitVectorY(void) const

81 3.2 WaveField 81 Vector x y RMatrix GetCRMatrixLG(void) const RMatrix RMatrix GetCRMatrixGL(void) const RMatrix Point GetLocalPosition(Point p) const Point p Point GetGlobalPosition(Point p) const Point p Plane GetPlane(void) const Plane Line GetOpticalAxis(void) const Line PointArray GetFrame(int n = 0) const PointArray ( ) n = 0 n 1 2 n

82 82 3 x y [1/m] u v z (3.10) w WaveField WaveField& Add(const WaveField& wf) WaveField& Multiply(const WaveField& wf) wf 2 1 source wf ResamplingAdd() ResamplingMultiply() wf Mutiply() 0 Add() WaveField& ResamplingAdd(const WaveField& wf, Interpol ip = CUBIC8) WaveField& ResamplingMultiply(const WaveField& wf, Interpol ip = CUBIC8) wf Interpol ip Add() Multiply()

83 3.2 WaveField 83 source wf Add() Multiply() wf Multiply() Add() WaveField& ResamplingCopy(const WaveField& source, Interpol ip = CUBIC8) source Interpol ip source source source void SaveAsBmp(const char* fname, Mode mode, Gradation cs = GRAY) const void SaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw) const void SaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw, double max, double min = 0.0) const fname 8 BMP BMP

84 84 3 WaveField Mode mode Gradation cs 1 cs cs COLOR 2 cw 3 Gradation cs = GRAY cs = COLOR 10 min max min 0( ) max 255( ) min max 3.1 P x P y BMP 3.1 SaveAsBmp() Mode ( ) INTENSITY AMPLITUDE PHASE π +π REAL IMAGINARY Example WaveField wf (1024, 1024, 10e -6); wf. SetGaussian (5e -3); wf. SaveAsBmp (" Gaussian1. bmp ", PHASE ); // wf. SaveAsBmp (" Gaussian2. bmp ", AMPLITUDE, COLOR, 0); // void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs = GRAY) const void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw) const void WinSaveAsBmp(const char* fname, Mode mode, Gradation cs, int cw, double max, double min = 0.0) const

85 3.2 WaveField 85 BMP SaveAsBmp() WaveField& LoadBmp(const char* fname, Mode mode, Complex backg = Comp(0, 0)) name BMP BMP WaveField Mode mode backg BMP BMP WaveField BMP / BMP BMP BMP BMP WaveField BMP 2 2 BMP 3.2 WaveField Example WaveField wf; wf. LoadBmp (" photo. bmp ", REAL ); // wf. SetConstImag (0.5); // wf. SaveAsBMP (" sample. bmp ", PHASE ); // void SaveAsLw(const char* fname, OptionHead* ohh = NULL) const

86 LoadBmp() , 1 Mode INTENSITY AMPLITUDE PHASE π +π 1 REAL IMAGINARY fname LW LW WaveField ohh NULL ohh LW LW WaveField void WinSaveAsLw(const char* fname, OptionHead* ohh = NULL) const LW SaveAsLw() WaveField& LoadLw(const char* fname, OptionHead* ohh = NULL) LW fname ohh NULL ohh LW ohh LW WaveField ohh

87 3.2 WaveField 87 void SaveAsText(const char* fname, int j = 0) const j fname Excel SetWindowMax() void SaveAsCsv(const char* fname, Axis axis = X AXIS, int ij = 0) const ij x y 1 CSV fname Excel Axis axis x j = 0 SetWindowMax() Example SaveAsCsv() # include <wfl.h> using namespace wfl ; void main ( void ) { Start (); WaveField a (512, 512, 10e -6); a. Clear (); a. SetConstAmplitude (1.0); // 1. 0 a. SetQuadraticPhase (200e -3); // m m (2 ) a. SaveAsCsv (" Lens1. csv "); // x j =0 a. SaveAsCsv (" Lens2. csv ", Y_AXIS, a.j (0.0)); // y x =0.0( j=nx /2) }

88 88 3 void SaveAsPTF(const char* fname) const void SaveAsDE(const char* fname) const WaveField& LoadDE(const char* fname) void SaveAsCA(const char* fname) const WaveField& LoadCA(const char* fname) void SaveAsHBI(...) const WaveField& LoadHBI(...) void SaveAsText(const char* fname, int j = 0) const j fname Excel SetWindowMax() void SaveAsWf(const char* fname) const fname WF WF LW WF WF void WinSaveAsWf(const char* fname) const fname WF WaveField& LoadWf(const char* fname)

89 3.2 WaveField 89 fname WF void SaveAsMpWf(const char* fname, unsigned short int ix) const fname WF ix WF 1 CreateFileMpWf() CreateFileMpWf() () LoadParamMpWf() WaveField& LoadMpWf(const char* fname, unsigned short int ix, bool* exist = NULL) fname WF ix bool exist ix *exist == false *exist == false WaveField& LoadParamMpWf(const char* fname, unsigned short int ix, bool* exist = NULL) fname WF ix bool exist ix *exist == false

90 90 3 void SaveAsSegWf(const char* fname, unsigned short int ii, unsigned short int jj) const fname WF (ii, jj) WF (Segmented WF ) (0,0) 2 WF WF CreateFileSegWf() CreateFileSegWf() WF GetSizeSegWf() WF LoadParamSegWf() void SaveParamSegWf(const char* fname) const fname WF fname WF CreateFileSegWf() CreateFileSegWf() WaveField& LoadSegWf(const char* fname, unsigned short int ii, unsigned short int jj, bool* exist = NULL) fname WF (ii, jj) bool exist (ii, jj)

91 3.2 WaveField 91 *exist == false *exist == false WaveField& LoadParamSegWf(const char* fname, unsigned short int ii, unsigned short int jj, bool* exist = NULL) fname WF (ii, jj) bool exist (ii, jj) *exist == false (ii, jj) WaveField& ConvToPolarForm(void) WaveField& ConvToComplexForm(void) WaveField& ConvToIntensity(void) 0.0 WaveField& ConvToLogIntensity(void)

92 WaveField& ConvToAbsolute(void) 0.0 WaveField& Normalize(float max = 1.0) max WaveField& NormalizeWin(float max = 1.0) max ( ) WaveField& Fft(int s) F (k u, l v) = M m N n [ ( km f(m x, n y) exp s i2π M + ln )] N (3.3) s 1 +1 x y u v

93 3.2 WaveField 93 u = 1 M x v = 1 N y (3.4) P x P y u v M N x y N x N y P x 1 P x N x P y 1 P y N y (3.5) N x N y ComplexForm COMPLEX SPECTRUM SPECTRUM COMPLEX IsComplexAmplitude() IsSpectrum() FFT FFT SetFftLib() GetFftLib() Example WaveField wf; wf. LoadLw (" sample.lw") wf. SaveAsBmpP (" sample. bmp ", PHASE ); // wf.fft ( -1); // wf. SaveAsBmp (" samples. bmp ", PHASE ); // wf.fft (1); // wf /= wf. GetN (); // wf. SaveAsBmp (" sample1. bmp ", PHASE ); // WaveField& FakeFft() (3.5)

94 94 3 ComplexForm COMPLEX SPECTRUM SPECTRUM COMPLEX IsComplexAmplitude() IsSpectrum() WaveField& ScaledFft(int ax, int ay) Scaled FFT F (k u, l v) = M m N n [ ( km f(m x, n y) exp i2π M ax + ln )] N ay (3.6) Fft() ax ay x y u v u = ax M x v = ay N y (3.7) P x P y u v M N x y N x N y P x ax P x N x P y ay P y N y ax = ay = 1 ax = ay = 1 Fft() 4N x N y FFT 2 Fft() FFT SetFftLib() GetFftLib() ComplexForm COMPLEX SPECTRUM SPECTRUM COMPLEX IsComplexAmplitude() IsSpectrum() (3.8)

95 3.2 WaveField ( ) WaveField& AsmProp(double d) [4] d [m] ( ) Fresnel d 10cm Embed() Extract() () ExactAsmProp() ExactAsmProp() 1/4 Example WaveField wf; wf. LoadLw (" sample.lw"); wf. AsmProp (10e -3); wf. Normalize (); wf. SaveAsLw (" sample1.lw"); // // Example WaveField wf; wf. LoadLw (" sample.lw"); wf. Embed (1); wf. AsmProp (10e -3); wf. Extract (1) wf. Normalize (); wf. SaveAsLw (" sample1.lw"); // // // // WaveField& AsmPropFs(double d) [4] ( ) d [m] ( ) Fresnel d 10cm AsmProp() FFT Embed() FFT Extract()

96 96 3 Example WaveField wf; wf. LoadLw (" sample.lw"); wf.fft ( -1); wf. AsmPropFs (10e -3); wf.fft (1); wf. Normalize (); wf. SaveAsLw (" sample1.lw"); // // // // WaveField& ExactAsmProp(double d) [4] d [m] ( ) Fresnel d AsmProp() AsmProp() 4 AsmProp() Example WaveField wf; wf. LoadLw (" sample.lw"); wf. EactAsmProp (10e -3); wf. Normalize (); wf. SaveAsLw (" sample1.lw"); // // WaveField& ShiftedAsmProp(const WaveField& source, int prec = 1) source prec [5] x, y source z P x P y ShiftedFresnelProp() ShiftedFresnelProp()

97 3.2 WaveField 97 prec prec Example WaveField a, b; a. LoadLw (" input.lw"); b. CopyParam (a); a. SetOrigin ( Vector (0, 0, 0)); // a (0, 0, 0) b. SetOrigin ( Vector (10e -3, 10e -3, 50e -3)); // b (10, 10, 50)[ mm] b. ShiftedAsmProp (a); // a b b b. SaveAsLw (" result.lw"); WaveField& ShiftedAsmPropAdd(const WaveField& source, int prec = 1) source prec [5] ShiftedAsmProp() P x P y WaveField& ShiftedAsmPropEx(const WaveField& source) source ShiftedAsmProp() source WaveField& ShiftedAsmPropAddEx(const WaveField& source) source [5] ShiftedAsmPropAdd() source

98 98 3 WaveField& FresnelProp(double d) Fresnel d [m] ( ) d Fresnel WaveField& FourierProp(double f) f [m] 2f ( ) WaveField& BackFourierProp(double f) f [m] 2f () WaveField& ShiftedFresnelProp(const WaveField& source) WaveField& ShiftedFresnelProp(const WaveField& source, const ShiftedFresnelPropDescriptor& sfpd) WaveField& ShiftedFresnelProp(const Vector& origin, double px, double py) WaveField& ShiftedFresnelProp(const Vector& origin, double px, double py, const ShiftedFresnelPropDescriptor& sfpd) 1 2 source [6] source (out-place ) 3 4 origin px py (in-place ) 2 4 ShiftedFresnelPropDescriptor sfpd x, y P x P y out-place source z in-place origin

99 3.2 WaveField 99 ShiftedFresnelPropEx() ShiftedFresnelAdd() Example out-place WaveField a, b; a. LoadLw (" input.lw"); a. SetOrigin ( Vector (0, 0, 0)); // a (0, 0, 0) b. SetOrigin ( Vector (10e -3, 10e -3, 100e -3); // b (10, 10, 100)[ mm] b. ShiftedFresnelProp (a); // a b b b. SaveAsLw (" result.lw"); Example out-place WaveField a; a. LoadLw (" input.lw"); a. SetOrigin ( Vector (0, 0, 0)); // a (0, 0, 0) double d = 100e -3, px = 5e -6, py = 3e -6; SetDefault (a. GetNx (), a. GetNy (), px, py, a. GetWavelength ()); WaveField b, c, d; b. SetOrigin ( Vector (10e -3, 0, d )); c. SetOrigin ( Vector ( -10e -3, 0, d )); d. SetOrigin ( Vector (0, 10e -3, d )); // ShiftedFresnelDescriptor sfpd (d, px, py, a); // b. ShifteFresnelProp (a, sfpd ); // a b c. ShifteFresnelProp (a, sfpd ); // a c d. ShifteFresnelProp (a, sfpd ); // a d b. SaveAsLw (" result -b.lw"); c. SaveAsLw (" result -c.lw"); d. SaveAsLw (" result -d.lw"); Example in-place WaveField a; a. LoadLw (" input.lw"); a. SetOrigin ( Vector (0, 0, 0)); // a (0, 0, 0) a. ShiftedFresnelProp ( Vector (10e -3, 10e -3, 100e -3, a. GetPx ()/2, a. GetPx ()); // a a. SaveAsLw (" result.lw"); WaveField& ShiftedFresnelPropAdd(const WaveField& source, const ShiftedFresnelPropDescriptor& sfpd) source WaveField& ShiftedFresnelPropEx(const WaveField& source) source

100 100 3 ShiftedFresnelProp() source WaveField& ShiftedFresnelPropAddEx(const WaveField& source) source 1 ShiftedFresnelPropAdd() source WaveField& SetGaussian(double w, double n = 2.0, double a = 1.0) 0 w [m] n a [ ( ) n ] x2 + y f(x, y) = a exp 2 w n = 2 n > 2 WaveField& SetSeparableGaussian(double wx, double wy, double nx = 2.0, double ny = 2.0, double a = 1.0) wx [m] x wy [m] y nx x ny y a f(x, y) = a exp [ ( x ) nx ( ] y ny wx wy) n = 2 n > 2

101 3.2 WaveField 101 WaveField& SetRect(double wx, double wy, double a = 1.0); x wx [m] y wy [m] a 0 0 WaveField& AddSphericalWave(Point p, Phase phs, double a, WindowFunc w) WaveField& AddSphericalWave(Point p, Phase phs, double a) WaveField& AddSphericalWave(Point p) Point p a ( ) Phase phs WindowFunc w WaveField& AddSphericalWaveSqr(const SphericalWaveDescriptor& swd, double x, double y, double z, double a = 1.0, double InitPhase = 0, WindowFunc w = RECTANGLE) SphericalWaveDescriptor swd (x, y, z) a InitPhase(= 0 2π) ( ) WindowFunc w (RECTANGLE ) InitPhase 0 2π InitPhase SphericalWaveDescriptor swd Example WaveField wf (512, 512); // SphericalWaveDescriptor sfd ( wf. GetWavelength (), wf. GetPx (), wf. GetPy ();

102 102 3 wf. Celar (); wf. AddSphericalWaveRF (sfd, 0.1e -3, -0.1e -3, -1e -3); // wf. AddSphericalWaveRF (sfd, -0.1e -3, 0.1e -3, -1e -3); // WaveField& SetRandomPhase(void) 1 ModRandomPhase() WaveField& ModRandomPhase(void) SetRandamPhase() WaveField& SetQuadraticPhase(double f) f 2 WaveField& MultiplyPlaneWave(double CosA, double CosB, Phase phs = 0.0) WaveField& MultiplyPlaneWave(Vector dir, Phase phs = 0.0) 1 x CosA y CosB phs 2 dir phs 2 dir phs WaveField& SetPlaneWave(double CosA, double CosB, Phase phs = 0.0) WaveField& SetPlaneWave(Vector dir, Phase phs = 0.0) 1 x CosA y CosB phs

103 3.2 WaveField dir phs 1 2 dir phs double GetSquareSum(void) const 2 2 double GetSquareSumWhole(void) const 2 2 double GetSquareAverage(void) const 2 2 double GetAbsoluteSum(void) const double GetAmplitudeSum(void) const ( ) double GetAbsoluteAverage(void) const double GetAmplitudeAverage(void) const ( ) ( )

104 104 3 double GetAbsoluteMax(void) const double GetAmplitudeMax(void) const ( ) ( ) double GetAmplitudeMaxWhole(void) const ( ) ( ) double GetAmplitudeVariance(void) const ( ) ( ) ComplexDouble GetScaleFactor(const WaveField& signal) const signal f(x, y) f sig (x, y) f(x m, y n ) αf sig (x m, y n ) 2 (m,n) W α f(x m, y n )fsig(x m, y n ) α = (m,n) W (m,n) W f sig (x m, y n ) 2 W signal signal ( 3.4 ) double GetSnr(const WaveField& signal, const ComplexDouble& scalefactor) const S/N signal S/N scalefactor signal

105 3.2 WaveField 105 signal ( 3.4) GetScaleFactor() 3.4 GetSnr() double GetEnergyRatioInWindow(void) const ( 1.0) WaveField& CreateRealHistogram(int level = 512) const 1 WaveField level 1 WaveField 2 1 WaveField 1 WaveField Px level Example WaveField wf (512, 512); // wf. SetSphericalWave (0, 0, 10e -3); // WaveField hist ; //

106 106 3 hist = wf. CreateRealHistogram (); // float max = hist. Real (0,0); // int i; for (i = 0; i < hist.nx (); i ++) if ( max > hist. Real (i, 0)) max = hist. Real (i, 0); double GetOverlapFactor(const WaveField& sig) const sig WaveField& HardClipPhase(int level) level π π WaveField& HardClipAmplitude(int level) level WaveField& PartialClipPhase(int level, double epsilon) level π π epsilon 3.5 ε ε = 0.5 WaveField& PartialClipAmplitude(int level, double epsilon) level

107 3.2 WaveField N A A N epsilon 3.5 ε ε = Complex GetInterpolVal(double x, double y, Interpol ip = CUBIC8) const Complex GetInterpolVal(double x, double y, InterpolFunc intfunc = &Cubic8Interpol) const 1 Interpol ip (x, y) 2 InterpolFunc intfunc Interpol CUBIC8 [7] GetInterpolFunc()

108 108 3 Complex Cubic8Interpol(double x, double y) const Complex Cubic6Interpol(double x, double y) const Complex Cubic4Interpol(double x, double y) const Cubic [7] (x, y) Interpol CUBIC8 CUBIC6 CUBIC4 Complex LinearInterpol(double x, double y) const (x, y) Interpol LINEAR Complex AdjacentInterpol(double x, double y) const (x, y) Interpol ADJACENT Complex BiLinear(double x, double y) const (x, y) Interpol BILINEAR Complex BiCubic(double x, double y) const (x, y)

109 3.2 WaveField 109 Interpol BICUBIC Complex NearestNeighbor(double x, double y) const (x, y) Interpol NEAREST NEIGHBOR m mxy=1 2(= 2 1 ) mxy=2 4(= 2 2 ) WaveField& Replicate(int mxy = 1) WaveField& Replicate(int mx, int my) 1 x y 2 mxy ( 3.6) 2 x 2 mx y 2 my 3.6 Replicate()

110 110 3 WaveField& EnlargeZeroFill(int mxy = 1) WaveField& EnlargeZeroFill(int mx, int my) 1 x y 2 mxy 0 ( 3.7) 2 x 2 mx y 2 my 3.7 EnlargeZeroFill() 3.8 Embed() WaveField& Embed(int mxy = 1) WaveField& Embed(int mx, int my) 1 x y 2 mxy 0 ( 3.8) 2

111 3.2 WaveField 111 x 2 mx y 2 my WaveField& Extract(int mxy = 1) WaveField& Extract(int mx, int my) 1 x y 2 mxy 1 ( 3.9) 2 x 2 mx 1 y 2 my Extract() WaveField& ReduceByAverage(int mxy = 1) WaveField& ReduceByAverage(int mx, int my) 1 x y 2 mxy 1 ( 3.9) 2 x 2 mx 1 y 2 my 1 mxy mx my WaveField& ExtractWindow(const WaveField& source, Complex backg = Complex(0.0, 0.0)) source

112 112 3 backg source 2 source N x N y WaveField& Subdivide(int mxy = 1) WaveField& Subdivide(int mx, int my) WaveField& Pixelation(int mxy = 1) WaveField& Pixelation(int mx, int my) 1 x y 2 mxy ( 3.10) 2 x 2 mx y 2 my 1 x y 2 mxy 1 2 x 2 mx 1 y 2 my Subdivide() & Pixelation() WaveField& DrawLine(int x1, int y1, int x2, int y2, const Complex& val = Comp(1.0, 0.0)) (x1, y1) (x2, y2) val

113 3.3 Complex/ComplexDouble 113 WaveField& Paint(int x, int y, const Complex& val = Comp(1.0, 0.0)) (x, y) val val WaveField& PaintTriangle(int x1, int y1, int x2, int y2, int x3, int y3, const Complex& val = Comp(1.0, 0.0)) WaveField& PaintTriangle(const PointArray& pa, const Complex& val = Comp(1.0, 0.0)) 1 (x1, y1), (x2, y2), (x3, y3) val 2 PointArray pa 3 (x, y) val z Complex/ComplexDouble Complex ComplexDouble Complex ComplexDouble

114 114 3 Complex(const float& a = 0.0, const float& b = 0.0) ComplexDouble(double a = 0.0, double b = 0.0) Complex(const ComplexDouble& c) ComplexDouble(const Complex& c) Complex ComplexDouble void SetReal(double a) a double GetReal(void) const float& real(void) double& real(void) void SetImag(double b) b double GetImag(void) const

115 3.3 Complex/ComplexDouble 115 float& imag(void) double& imag(void) double GetAmplitude(void) void SetAmplitude(double val) Phase GetPhase(void) Phase π +π void SetPhase(double val) double GetIntensity(void) ( 2 ) ( 2 ) void SetIntensity(double val) ( 2 )

116 116 3 void Comp(float a = 0.0, float b = 0.0) a b Complex Conjugate(void) const Complex& operator=(const Complex& c) Complex& operator=(const ComplexDouble& c) ComplexDouble& operator=(const Complex& c) ComplexDouble& operator=(const ComplexDouble& c) Complex& operator+=(const Complex& c) Complex& operator-=(const Complex& c) ComplexDouble& operator+=(const ComplexDouble& c) ComplexDouble& operator-=(const ComplexDouble& c) Complex& operator*=(const Complex& c) Complex& operator*=(double c) ComplexDouble& operator*=(const ComplexCouble& c) ComplexDouble& operator*=(double c)

117 3.3 Complex/ComplexDouble 117 Complex& operator/=(const Complex& c) Complex& operator/=(double c) ComplexDouble& operator/=(const ComplexCouble& c) ComplexDouble& operator/=(double c) Complex operator+(const Complex& rhs) const Complex operator-(const Complex& rhs) const ComplexDouble operator+(const ComplexCouble& rhs) const ComplexDouble operator-(const ComplexCouble& rhs) const 2 Complex operator*(const Complex& rhs) const Complex operator*(double rhs) const ComplexDouble operator*(const ComplexCouble& rhs) const ComplexDouble operator*(double rhs) const 2 Complex operator/(const Complex& rhs) const Complex operator/(double rhs) const ComplexDouble operator/(const ComplexCouble& rhs) const ComplexDouble operator/(double rhs) const 2 Complex operator-(void) const ComplexDouble operator-(void) const

118 118 3 bool operator==(const Complex& rhs) const bool operator==(const ComplexCouble& rhs) const Complex/ComplexDouble double abs(complexdouble c) c = a + ib a 2 + b 2 Phase arg(complexdouble c) Phase c = a + ib Arg(c) = tan 1 b/a double norm(complexdouble c) 2 c = a + ib 2 a 2 + b 2 ComplexDouble euler(double t) ComplexDouble Eular t exp(it) = cos t + i sin t ComplexDouble exp(complexdouble c) ComplexDouble c = a + ib exp(c) = exp(a)(cos b + i sin b) ComplexDouble polar(double A, double t) ComplexDouble A t A exp(it) = A(cos t + i sin t) Complex Comp(float r = 0.0, float i = 0.0)

119 3.4 Phase 119 Complex Complex 3.4 Phase 2π φ double Phase π φ < +π wrap Phase(void) Phase(double phase) Phase(float phase) Phase( Phase phase) double float 3 (wrap) Phase operator double() const double double Example Phase ph = ; // d o u b l e P h a s e double pd = ( double ) ph;// P h a s e d o u b l e Phase operator+(phase p) Phase operator-(phase p) Phase Phase wrap

120 Phase wrap wrap Phase(double phase) Phase(float phase) 1 double 2 float operator double() const double double Example Phase p = ( _Phase ) PI /2; // d o u b l e P h a s e w r a p 3.5 Vector/Point 3 WaveField Point Vector Vector /Point 2 2 SetPositionTolerance() GetPositionTolerance() Vector /Point 1

121 3.5 Vector/Point Vector(double x = 0, double y = 0, double z = 0) Point(double x = 0, double y = 0, double z = 0) (x, y, z) (x, y, z) double GetX() const double GetY() const double GetZ() const x y z void SetX(double val) void SetY(double val) void SetZ(double val) x y z double& X() double& Y() double& Z() x y z static Vector I(void) static Vector J(void) static Vector K(void) x y z Example Vector v; v = Vector ::I ()*3 + Vector ::J ()*2 + Vector ::K ()*4; // v =(3,2,4)

122 122 3 double GetLength(void) const Vector& SetLength(double len) len double GetSqure(void) const 2 2 Vector& Normalize(void) Vector GetNormalized(void) const double GetDistance(Point p) const double GetDistance(const Line& line)const double GetDistance(const Plane& plane)const p Line line Plane plane bool IsInline(const Line& line) const Line line line

123 3.5 Vector/Point 123 GetPositionTolerance() SetPositionTolerance() bool IsInplane(const Plane& plane) const Plane plane plane GetPositionTolerance() SetPositionTolerance() bool IsEmpty() Vector operator-(void) const Vector operator*(double rhs) const Vector operator/(double rhs) const rhs 2 Vector& operator*=(double rhs) Vector& operator/=(double rhs) rhs

124 124 3 Vector operator-(const Vector& rhs) const Vector operator+(const Vector& rhs) const rhs 2 Vector& operator-=(const Vector& rhs) Vector& operator+=(const Vector& rhs) rhs double operator*(const Vector& vec) ( ) vec 2 Vector operator&(const Vector& vec) const ( ) vec 2 Vector& operator&=(const Vector& vec) vec Vector& operator*=(const RMatrix& mat) 3 3 mat v *= M; v Mv RMatrix Example Vector vec (1, 0, 0), vv; RMatrix mat = RMatrixX (30* Deg );

125 3.6 PointArray 125 vec *= mat ; // V e c t o r vv = mat * vec ; // R M a t r i x bool operator==(const Vector& rhs) const bool operator!=(const Vector& rhs) const rhs true 2 () GetPositionTolerance() wfl::setpositiontolerance() 3.6 PointArray Point 3 3 STL vector<point> PointArray(int n = 0) PointArray(const Point& p) PointArray(const LineSegment& ls) 1 n Point 2 Point p 1 3 LineSegment 2 int GetN(void) const const Point& GetPoint(int i) const

126 126 3 Point i i GetN() Point& At(int i) const Point i i GetN() Example PointArray pa( pp ); pa.at (0) *= 3.0; // 3 void SetPoint(int i, const Point& p) i Point p i GetN() ( ) Insert() void Insert(const Point& p) void Insert(int i, const Point& p) 1 Point p 2 i p i GetN() ( )

127 3.6 PointArray 127 void Remove(void) void Remove(int i) 1 2 i i GetN() ( ) PointArray& Rotate(const RMatrix& r) RMatrix r PointArray GetBoundingBox(void) const 2 PointArray PointArray x, y, z Example // P o i n t A r r a y p a 1 PointArray pa2 = pa1. GetBoundingBox (); cout << " :" << pa2 [0] << endl ; cout << " :" << pa2 [1] << endl ; cout << ":" << ( pa2 [0] + pa2 [1])/2.0 << endl ; Vector GetCenter(void) const Vector void SetCenter(const Vector& p) Vector p

128 128 3 void Localize(void) double GetMaxX(void) const double GetMaxY(void) const double GetMaxZ(void) const GetBoundingBox() double GetMinX(void) const double GetMinY(void) const double GetMinZ(void) const GetBoundingBox() double GetWidth(void) const double GetHeight(void) const double GetDepth(void) const x y z 0

129 3.6 PointArray 129 Plane GetPlane(void) const Plane 3 PointArray& ProjectionOn(const Plane& plane) PointArray& ProjectionOn(const Plane& plane, const Line& line) 1 Plane plane 2 Line line Plane plane bool IsInplane(void) const void SaveAsCsv(const char* fname) const fname CSV Point& operator[](int i) const Point i PointArray& operator=(const PointArray& rhs) rhs PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) Vector rhs

130 130 3 PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) Point 1 m 2 RMatrix mat bool operator==(const PointArray& rhs) rhs true bool operator!=(const PointArray& rhs) rhs true 3.7 LineSegment PointArray PointArray Line LineSegment() LineSegment(const Point& begin, const Point& end) 1 2 Point begin end const Point& GetBegin(void) const const Point& GetEnd(void) const Point

131 3.7 LineSegment 131 double GetLength(void) const Vector GetVector(void)const Vector Vector GetUnitVector(void) const Vector PointArray& Rotate(const RMatrix& r) PointArray RMatrix r bool IsParallel(const Plane& plane) const Plane plane bool IsEmpty(void) const bool operator==(const LineSegment& ls) ls

132 132 3 bool operator!=(const LineSegment& ls) ls PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) PointArray 3.8 Line LineSegment PointArray LineSegment LineSegment Line(void) Line(const Point& p, const Vector& n) Line(const LineSegment& ls) 1 (0, 0, z) 2 Point p Vector n 3 LineSegment ls const Point& GetPoint(void) const Point

133 3.8 Line 133 const Vector GetUnitVector(void) const LineSegment GetUnitVector() Vector p n t r = tn + p r double GetDistance(const Point& p) const Point p const Point& GetVerticalPoint(const Point& p) const Point p Point Point GetIntersectionPoint(const Plane& plane) const Plane plane Point bool IsParallel(Plane& plane) const Plane plane true bool Include(const Point& p) const Point p p true

134 134 3 PointArray& Rotate(const RMatrix& r) PointArray RMatrix r bool IsEmpty(void) const LineSegment IsEmpty() bool operator==(const Vector& rhs) const rhs rhs p true bool operator!=(const Vector& rhs) const rhs PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) PointArray

135 3.9 Plane static Line X(void) static Line Y(void) static Line Z(void) Line x y z 3.9 Plane PointArray PointArray Plane(void) Plane(const Point& p1, const Point& p2, const Point& p3) Plane(const Point& p, const Vector& n) 1 (x, y, 0) 2 Point 3 p1, p2, p3 3 Vector n 1 p const Vector& GetNormalVector(void) const Vector n n r = n x x + n y y + n z z = d (3.9) d 0 n d GetDistance()

136 136 3 double GetDistance(void) const double GetDistance(const Point& p) const 1 (3.9) d 2 Point p double GetX(double y, double z) const double GetY(double x, double z) const double GetZ(double x, double y) const Point GetIntersectionPoint(const Line& line) const Point Line line Line GetIntersectionLine(const Plane& plane) const Line Plane plane Point GetVerticalPoint(const Point& p) const Point Point p PointArray& Rotate(const RMatrix& r) PointArray RMatrix r

137 3.9 Plane 137 bool IsParallel(const Line& line) const bool IsParallel(const Plane& plane) const Line line Plane plane Include(const Point& p) const Point p true bool IsEmpty(void) const true bool operator==(const Plane& plane) const plane true bool operator!=(const Plane& plane) const plane

138 138 3 PointArray& operator=(const PointArray& rhs) PointArray& operator-=(const Vector& rhs) PointArray& operator+=(const Vector& rhs) PointArray& operator*=(double m) PointArray& operator*=(const RMatrix& mat) PointArray static Plane XY(void) static Plane YZ(void) static Plane ZX(void) Plane (x, y, 0), (0, y, z) (x, 0, z) 3.10 SFrequency Vector (u, v, w) u 2 + v 2 + w 2 = λ 2 (3.10) u, v, w Vector Vector w u v w Normalize() SFrequency() SFrequency(double lmd, double u, double v) 1 2 lmd x u, y v z w u w (3.10)

139 3.10 SFrequency 139 double GetWavelength(void) const void SetWavelength(double val) val SFrequency& SetU(double val) SFrequency& SetV(double val) val x y z w (3.10) SFrequency& SetUV(double u, double v) u x v y z w (3.10) double GetU(void) const double GetV(void) const [m 1 ] x y double GetW(void) const [m 1 ] z SetU(), SetV(), SetUV() w Normalize() double CalcW(void) const [m 1 ]

140 140 3 z w void Normalize(void) z w SFrequency& Rotate(const RMatrix& r) Vector RMatrix r SFrequency operator-(const SFrequency& rhs) SFrequency operator+(const SFrequency& rhs) SFrequency w (z ) (3.10) 3.11 RMatrix SqrMatrix RMatrix(void) RMatrix(const Vector& dest, const Vector& source) (Rodrigues rotation formula) Vector source Vector dest

141 3.11 RMatrix 141 RMatrix GetInverse(void) RMatrix Vector operator*(const Vector& p) const Vector Vector p RMatrix operator*(const RMatrix& rhs) const RMatix RMatrix rhs SFrequency operator*(const SFrequency& sf) const SFrequency SFrequency sf SFrequency Normalize() w static const RMatrix& RotationX(double t) static const RMatrix& RotationY(double t) static const RMatrix& RotationZ(double t) RMatrix 3 3 x y z t[rad] RMatrixX()

142 142 3 static const RMatrix& CRotationX(double t) static const RMatrix& CRotationY(double t) static const RMatrix& CRotationZ(double t) RMatrix 3 3 x y z t[rad] CRMatrixX() 3.12 StopWatch StopWatch StopWatch(void) void Reset(void) void Start(void) void Stop(void)

143 double Read(void) Example StopWatch StopWatch a, b; WaveField wfa (256, 256), wfb (1024, 1024); int i; for (i = 0; i < 10000; i ++) { b. Start (); // b wfb. Fft ( -1); // w f b b. Stop (); // b a. Start (); // a // ********** w f a ************ // a. Stop (); // a } b. Start (); // b wfb. Fft (1); // w f b b. Stop (); // b a. Start (); // a // ********** w f a ************ // a. Stop (); // a Printf (" w f b :%f\n", b. Read ()); Printf (" w f a :%f\n", a. Read ()); FftLib WaveField FFT MKL Intel Math Kernel Library FFT OOURA Split-Radix FFT FFT ComplexForm WaveField COMPLEX (c = a + bi)

144 144 3 SPECTRUM m (x, y) m 1 (u, v) POLAR (c = A exp(iθ)) POLAR SPECTRUM WindowFunc NONE RECTANGLE BARTLETT HAMMING HANNING Mode WaveField INTENSITY REAL IMAGINARY PHASE AMPLITUDE WaveField SaveAsBmp() Interpol LINEAR CUBIC CUBIC4 CUBIC6 CUBIC8 SINC ADJACENT BILINEAR Cubic 4 Cubic 6 Cubic 8 Cubic sinc

145 BICUBIC NEAREST NEIGHBOR (=ADJACENT) Axis X AXIS x x Y AXIS y y WaveField SaveAsCsv() ErrorCode WaveFieldLib WFL NO ERROR MEMORY FILEOPEN PARAMETER ( ) FILEWRITE FILEREAD SOMETHINGWRONG COMPLEX FORM ComplexForm / INVALID TYPE ComplexForm / INTERNAL ErrorHandling CONSOLE ( ) EXCEPTION Gradation WaveField GRAY COLOR WaveField SaveAsBmp()

146 146 3 Platform WIN32 32bit Edition Windows X64 64bit Edtion Windows CLR Windows Common Language Runtime CLI Windows Common Language Infrastructure LINUX32 32bit Linux CpuType CPU 1 SSE1 Streaming SIMD Extension 1 Intel/AMD CPU DevelopEnv ( ) ICC Intel C++ MSC Microsoft C++ GCC GNU gcc 3.14 WaveFieldLib SphericalWaveDescriptor WaveField AddSphericalWaveSqr() SphericalWaveDescriptor(double wavelength, double px, double py, Vector ref=vector(0, 0, 1.0)) SphericalWaveDescriptor wavelength WaveField (px, py) Vector ref

147 () bool IsSameAs(double wavelength, double px, double py, Vector ref=vector(0, 0, 1.0)) true bool operator==(const SphericalWaveDescriptor& swd) swd ShiftedFresnelPropDescriptor WaveField ShiftedFresnelProp() ShiftedFresnelPropDescriptor(double distance, double dpx, double dpy, double spx, double spy, double wavelength, int nx, int ny) ShiftedFresnelPropDescriptor(double distance, double destpx, double destpy, const WaveField& source) ShiftedFresnelPropDescriptor 1 distance dpx, dpy spx spy wavelength nx ny 2 source

148 148 3 bool IsCompatibleWith(double distance, double dpx, double dpy, double spx, double spy, double wavelength, int nx, int ny) const bool IsCompatibleWith(double distance, double dpx, double dpy, const WaveField& source) const true bool operator==(const ShiftedFresnelPropDescriptor& sfpd) const true

149 II PolygonSource

150

151 PolygonSource PolygonSource MS Visual Studio 2008 IntelliSense 64 CPU (64 Visual Studio ) PolygonSource < >=c:\wavefieldtools < >\include\ *.h PolygonSource < >\lib\win32\ 32 < >\lib\x64\ 64 psl.lib

152 152 4 PolygonSource PATH (.exe ) < >\bin\win32\ 32 < >\bin\x64\ 64 psl.dll < >\data\ Diffuser1024x1024.lw

153 PolygonSource PolygonSource [8, 9] ( ) *1 Example 1 # include " psl.h" 2 using namespace wfl ; 3 using namespace psl ; 4 5 int main ( void ) 6 { 7 Start (); 8 9 // x- z 10 psl :: Polygon triangle (3); 11 triangle [1]. SetX (0.5); 12 triangle [1]. SetZ (- sqrt (3.0)/2.0); 13 triangle [2] = triangle [1]; 14 triangle [2]. SetX ( -0.5); // 17 triangle. Localize (); // 18 triangle *= 2e -3; //1 : m 19 triangle *= RMatrixY (15* Deg )* RMatrixX (30* Deg ); // // 22 double px = 4e -6, py = 4e -6; // 23 int nx = 1024, ny = 1024; // 24 WaveField frame (nx, ny, px, py ); //(x,y,0) 25 frame. Clear (); // 28 WaveField diffuser (0); // 29 diffuser. LoadLw (" diffuser1024x1024.lw"); // 30 Vector light ( -1.0, -1.0, -1.0); // 31 double env = 0.3; // 32 double gamma = 0.5; // 33 TfbFlatShading flatshader ( diffuser, gamma, light, env ); // // S u r f a c e B u i l d e r 36 SurfaceBuilder sb( frame ); 37 sb. SetShader ( flatshader ); // *1 2010/04/22 SurfaceBuilder

154 // 40 sb. SetCurrentPolygon ( triangle ); 41 sb. AddPolygonField ( frame ); frame. SaveAsLw (" frame.lw"); 44 } psl.h PolygonSource psl.h PolygonSource PolygonSourceLib psl psl Polygon psl Polygon 10 psl::polygon triangle(3) PolygonSource WaveField WaveField wfl::start() psl.lib psl.h psl.lib PATH (*.EXE) psl.dll Polygon 3 (x, y, z) = (0, 0, 0) triangle[0] (x, 0, z) 2 x z 1[m] PointArray Localize() 18

155 5.1 PolygonSource 155 2[mm] 19 RMatrix x 30 y WaveField ( z ) (x, y, 0) 17 Localize() ( ) / SurfaceBuilder SurfaceBuilder (6.4 ) (6.3.2 ) SurfaceBuilder sb 35 frame SetCurrentPolygon() AddPolygonField() PolygonSource CG Example 1 # include " psl.h" 2 using namespace wfl ; 3 using namespace psl ; 4 5 int main ( void ) 6 { 7 Start (); wfl :: SetNumThreads (); // 8 9 // 10 IndexedFaceSet model ; 11 model. LoadWrl (" cube. wrl "); // 12 model. Localize (); // 13 model. SetWidth (2e -3); // 2 m m 14

156 // 16 double px = 4e -6, py = 4e -6; // 17 int nx = 1024, ny = 1024; // 18 WaveField frame (nx, ny, px, py ); //(x,y,0) 19 frame. Clear (); // 22 WaveField diffuser (0); // 23 diffuser. LoadLw (" diffuser1024x1024.lw"); // 24 Vector light ( -1.0, -3.0, -1.0); // 25 double env = 0.1; // 26 double gamma = 0.3; // 27 TfbFlatShading flatshader ( diffuser, gamma, light, env ); // // S u r f a c e B u i l d e r 30 SurfaceBuilder sb( frame ); 31 sb. SetDiffractionRatio (0.9); // 32 sb. SetCullingRate (0.6); // 33 sb. SetShader ( flatshader ); // // m o d e l 36 sb. AddObjectField ( frame, model ); // 39 frame. ExactAsmProp (50e -3); frame. SaveAsLw (" frame.lw"); 42 } 7 wfl::setnumthreads() IndexedFaceSet 11 IndexedFaceSet LoadWrl() VRLM2.0 IndexedFaceSet PointArray PointArray Localize() (Bounding Box) IndexedFaceSet SetWidth() 2mm SurfaceBuilder SetDiffractionRate() SetCullingRate() SurfaceBuilder AddObjectField() AddObjectField() SurfaceBuilder SetCallback()

157 SurfaceBuilder 1 sb.setcallback(null); 39 WaveField ExactAsmProp() ExactAsmProp() AsmProp() 5.2 3D [10] Example 1 # include " psl.h" 2 using namespace wfl ; 3 using namespace psl ; 4 5 int main ( void ) 6 { 7 Start (); wfl :: SetNumThreads (); // 8 9 // 10 Point poswallpaper (0, 0, -100e -3); //z = -100 m m 11 Point posobject (0, 0, -50e -3); //z= -50 m m // 14 double px = 4e -6, py = 4e -6; // 15 int nx = 1024, ny = 1024; // 16 WaveField frame (nx, ny, px, py ); //(x,y,0) 17 frame. Clear (); 18 frame. SetOrigin ( poswallpaper ); // // ( ) 21 double width = 4e -3, height = 4e -3; // 22 WaveField wallpaper ; 23 wallpaper. LoadBmp (" Checker (256 x256 ). bmp ", AMPLITUDE ); // 24 wallpaper. SetPx ( width / wallpaper. GetNx ()); // 25 wallpaper. SetPy ( height / wallpaper. GetNy ()); // 26 wallpaper. SetOrigin ( poswallpaper ); // // 29 WaveField wpframe = frame ; // 30 wpframe. Clear (); 31 wpframe. ResamplingAdd ( wallpaper, NEAREST_NEIGHBOR ); // 32 WaveField diffuser ; // 33 diffuser. LoadLw (" diffuser1024x1024.lw"); // 34 MultiplyDiffuser ( wpframe, diffuser ); // 35 frame += wpframe ; // ( ) 36 wpframe. Dispose (); // 37 frame. SaveAsLw (" frame0.lw"); // 38 frame. ExactAsmProp ( posobject. GetZ () - poswallpaper. GetZ ()); 39 //. z= -50 m m // 42 IndexedFaceSet model ; 43 model. LoadWrl (" cube. wrl "); // 44 model. Localize (); // 45 model. SetWidth (2e -3); // 2 m m

158 model += posobject ; // // 49 PaintObjectSilhouette ( frame, model ); //(0) 50 frame. SaveAsLw (" frame1.lw"); // // 53 Vector light ( -1.0, -2.0, -1.0); // 54 double env = 0.2; // 55 double gamma = 0.3; // 56 TfbFlatShading flatshader ( diffuser, gamma, light, env ); // // S u r f a c e B u i l d e r 59 SurfaceBuilder sb( frame ); 60 sb. SetDiffractionRatio (1.0); // 61 sb. SetCullingRate (0.6); // 62 sb. SetShader ( flatshader ); // // m o d e l 65 sb. AddObjectField ( frame, model ); 66 frame. SaveAsLw (" frame2.lw"); // // 69 frame. ExactAsmProp (0 - posobject. GetZ ()); frame. SaveAsLw (" frame.lw"); // 72 } 10 2 z = 100mm 3 z = 50mm 3D 3D 18 z = 100mm = > 5.1 (frame0.lw) wpframe 31

159 ResamplingCopy() MultiplyDiffuser() (z = 50mm) z = 50mm 49 PaintObjectSilhouette() 5.2 (a) = > 5.2 (frame1.lw) (frame2.lw) (b) psl z z 5.3 Example 1 # include " psl.h" 2 using namespace wfl ; 3 using namespace psl ; 4 5 int main ( void ) 6 { 7 Start (); wfl :: SetNumThreads (); // 8 9 //

160 double objectsize = 2.5e -3; // 2.5 m m 11 Point posobject (0.5e -3, -0.3e -3, 0); // // 14 IndexedFaceSet model ; 15 model. LoadDxf (" Sphere200. dxf "); // 16 model. Localize (); // 17 model. SetWidth ( objectsize ); // 18 model += posobject ; // 19 model. AutoNormalVector (); // // 22 double px = 4e -6, py = 4e -6; // 23 int nx = 1024, ny = 1024; // 24 WaveField frame (nx, ny, px, py ); //(x,y,0) 25 frame. Clear (); // 28 WaveField diffuser (0); // 29 diffuser. LoadLw (" diffuser1024x1024.lw"); // 30 Vector light ( -1.0, -1.0, -0.3); // 31 double env = 0.1; // 32 double gamma = 0.01; // 33 TfbGouraudShading gouraudshader ( diffuser, gamma, light, env ); 34 // // 37 WaveField teximage (0); // 38 teximage. LoadBmp (" MoonTexture. bmp ", AMPLITUDE ); // 39 teximage. SetPx ( objectsize / teximage. GetNx ()); // 40 teximage. SetPy ( objectsize / teximage. GetNy ()); // 41 teximage. SetOrigin ( posobject ); // 42 TfbOlthoProjectMapping moontexture ( teximage ); // // S u r f a c e B u i l d e r 45 SurfaceBuilder sb( frame ); 46 sb. SetDiffractionRatio (0.9); // 47 sb. SetCullingRate (0.6); // 48 sb. SetShader ( gouraudshader ); // 49 sb. SetTexture ( moontexture ); // // m o d e l 52 sb. AddObjectField ( frame, model ); // 53 frame. SaveAsLw (" object.lw"); // // 56 frame. ExactAsmProp (50e -3); frame. SaveAsLw (" frame.lw"); //

161 } TfbGouraudShading IndexedFaceSet AutoNormalVector() TfbGouraudShading WaveField AMPLITUDE z z TfbOlthoProjectMapping

Wave Field Library (WFL) Polygon Source Library (PSL)

Wave Field Library (WFL) Polygon Source Library (PSL) Wave Field Library (WFL) Polygon Source Library (PSL) 2019 6 5 2 WaveField Rel 3.5.1 PolygonSource Rel 1.9.0 Rel 2.13 WaveField ( WFL) PolygonSource ( PSL) / WFL/PSL WFL/PSL http://www.laser.ee.kansai-u.ac.jp/wavefieldtools

More information

CudaWaveField

CudaWaveField CudaWaveField 2012 3 22 2 CudaWaveField Rel 1.0.0 Rel 1.0 CudaWaveField ( cwfl) / cwfl cwfl http://www.laser.ee.kansai-u.ac.jp/wavefieldtools Note Acrobat Reader 3 I CudaWaveField 9 1 11 1.1 CudaWaveField......................

More information

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java 1 Java Java 1.1 Java 1) 2) 3) Java OS Java 1.3 4) Java Web Start Web / 5) Java C C++ Java JSP(Java Server Pages) 1) OS 2) 3) 4) Java Write Once, Run Anywhere 5) Java Web Java 2 1 Web Java Android Java

More information

cpp4.dvi

cpp4.dvi 2017 c 4 C++ (4) C++, 41, 42, 1, 43,, 44 45, 41 (inheritance),, C++,, 100, 50, PCMCIA,,,,,,,,, 42 1 421 ( ), car 1 [List 41] 1: class car { 2: private: 3: std::string m model; // 4: std::string m maker;

More information

FFTSS Library Version 3.0 User's Guide

FFTSS Library Version 3.0 User's Guide : 19 10 31 FFTSS 3.0 Copyright (C) 2002-2007 The Scalable Software Infrastructure Project, (CREST),,. http://www.ssisc.org/ Contents 1 4 2 (DFT) 4 3 4 3.1 UNIX............................................

More information

GLS user s reference 19 8 21 1 3 1.1....................................................... 3 1.2....................................................... 3 1.3.......................................................

More information

第7章 レンダリング

第7章 レンダリング 7 April 11, 2017 1 / 59 7.1 ( ) CG 3 ( ) 2 / 59 7.2 7.2.1 ( ) 3 (rendering) 1 / (hidden line/surface calculation) a (outer normal algorithm) b Z (Z-buffer algorithm) c (scan-line algorithm) 2 (shading)

More information

第7章 レンダリング

第7章 レンダリング 7 May 18, 2012 1 / 60 71 ( ) CG 3 ( ) 2 / 60 72 71 ( ) 3 (rendering) 1 / (hidden line/surface calculation) a (outer normal algorithm) b Z (Z-buffer algorithm) c (scan-line algorithm) 2 (shading) a (flat

More information

2008 DS T050049

2008 DS T050049 DS T050049. PSP DS DS DS RPG DS OS Windows XP DevkiPro OS DS CPU ARM devkitarm MSYS MinGW MSYS MinGW Unix OS C++ C++ make nds nds DS DS micro SD Card nds DS DS DS nds C Java C++ nds nds DS 2008 DS T050049

More information

DiMP Users Manual Yuichi Tazaki

DiMP Users Manual Yuichi Tazaki DiMP Users Manual Yuichi Tazaki 3 1 5 2 7 2.1............................. 7 2.2........................... 7 3 DiMP 9 3.1............................... 9 3.2........................... 10 3.3...................................

More information

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10;

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10; (STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector x; for(int i = 0; i < 10; ++i) x.push_back(i); vector STL x.push_back(i) STL

More information

cpp1.dvi

cpp1.dvi 2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout

More information

C# ++ MASA C# ( ) XNA 1.1 C# ( ) VisualStuio XNA 4.0 VisualStuio XNA 3.1 * * *3 2.1 VisualStuio Windows ( TextGam

C# ++ MASA C# ( ) XNA 1.1 C# ( ) VisualStuio XNA 4.0 VisualStuio XNA 3.1 * * *3 2.1 VisualStuio Windows ( TextGam C# ++ MASA 2011 8 1 C# ( ) XNA 1.1 C# ( ) VisualStuio 2010 + XNA 4.0 VisualStuio 2008 + XNA 3.1 *1 1.2 1 *2 1.3 2 *3 2.1 VisualStuio Windows ( TextGame2 ) OK *1 XNA 3.1 4.0 *2 *3 1 TextGame2 ( Ship ) 32*32

More information

USB 0.6 https://duet.doshisha.ac.jp/info/index.jsp 2 ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231

USB 0.6 https://duet.doshisha.ac.jp/info/index.jsp 2 ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231 0 0.1 ANSI-C 0.2 web http://www1.doshisha.ac.jp/ kibuki/programming/resume p.html 0.3 2012 1 9/28 0 [ 01] 2 10/5 1 C 2 3 10/12 10 1 2 [ 02] 4 10/19 3 5 10/26 3 [ 03] 6 11/2 3 [ 04] 7 11/9 8 11/16 4 9 11/30

More information

Java学習教材

Java学習教材 Java 2016/4/17 Java 1 Java1 : 280 : (2010/1/29) ISBN-10: 4798120987 ISBN-13: 978-4798120980 2010/1/29 1 Java 1 Java Java Java class FirstExample { public static void main(string[] args) { System.out.println("

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A B f : A B 4 (i) f (ii) f (iii) C 2 g, h: C A f g = f h g = h (iv) C 2 g, h: B C g f = h f g = h 4 (1) (i) (iii) (2) (iii) (i) (3) (ii) (iv) (4)

More information

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO Handy Graphic for Handy Graphic Version 0.5 2008-06-09 1 Handy Graphic Handy Graphic C Handy Graphic Handy Graphic Mac OS X Handy Graphic HgDisplayer Handy Graphic HgDisplayer 2 Handy Graphic 1 Handy Graphic

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

解きながら学ぶC++入門編

解きながら学ぶC++入門編 第 1 章 画面 出力 入力 2 問題 1-1 C++ List 1-1p.4 C++ // cout

More information

2008chom.pdf

2008chom.pdf CHomP Pawe l Pilarczyk 1 CHomP Computational Homology Project [3] OS Windows Mac Unix Linux [3] CHomP [3] 2 3 CHomP CHomP 4 5 C++ [1] 2 CHomP 1 2 K 1 = { A 1 A 2 A 3, A 1 A 2, A 2 A 3, A 1 A 3, A 3 A 4,

More information

programmingII2019-v01

programmingII2019-v01 II 2019 2Q A 6/11 6/18 6/25 7/2 7/9 7/16 7/23 B 6/12 6/19 6/24 7/3 7/10 7/17 7/24 x = 0 dv(t) dt = g Z t2 t 1 dv(t) dt dt = Z t2 t 1 gdt g v(t 2 ) = v(t 1 ) + g(t 2 t 1 ) v v(t) x g(t 2 t 1 ) t 1 t 2

More information

課題

課題 int starttime_msec; boolean counting = false; size(400,200); smooth(); //font は各自のものに変更してください font = loadfont("serif-48.vlw"); void mouseclicked(){ counting = true; starttime_msec = millis(); int t=0;

More information

1

1 PalmGauss SC PGSC-5G Instruction Manual PalmGauss SC PGSC-5G Version 1.01 PalmGauss SC PGSC5G 1.... 3 2.... 3 3.... 3 3.1... 3 3.2... 3 3.3 PalmGauss... 4 3.4... 4 3.4.1 (Fig. 4)... 4 3.4.2 (Fig. 5)...

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/5/16) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

More information

I J

I J I 065763J 8 7 7 31 jikken/ +----- accumulation_demupa.c +----- accumulation_rain.c +----- frequency_demupa.c +----- frequency_rain.c +----- go.sh +----- graph_maker.sh +----- mesure-ryudai/ 2007/4/1 2007/6/30

More information

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in Emacs, {l06050,sasano}@sic.shibaura-it.ac.jp Eclipse Visual Studio Standard ML Haskell Emacs 1 Eclipse Visual Studio variable not found LR(1) let Emacs Emacs Emacs Java Emacs JDEE [3] JDEE Emacs Java 2

More information

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

# let st1 = {name = Taro Yamada; id = };; val st1 : student = {name=taro Yamada; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n II 6 / : 2001 11 21 (OCaml ) 1 (field) name id type # type student = {name : string; id : int};; type student = { name : string; id : int; } student {} type = { 1 : 1 ;...; n : n } { 1 = 1 ;...; n = n

More information

OpenCV IS Report No Report Medical Information System Labratry

OpenCV IS Report No Report Medical Information System Labratry OpenCV 2014 8 25 IS Report No. 2014090201 Report Medical Information System Labratry Abstract OpenCV OpenCV 1............................ 2 1.1 OpenCV.......................... 2 1.2......................

More information

Microsoft Word - Sample_CQS-Report_English_backslant.doc

Microsoft Word - Sample_CQS-Report_English_backslant.doc ***** Corporation ANSI C compiler test system System test report 2005/11/16 Japan Novel Corporation *****V43/NQP-DS-501-1 Contents Contents......2 1. Evaluated compiler......3 1.1. smp-compiler compiler...3

More information

DVIOUT-MTT元原

DVIOUT-MTT元原 TI-92 -MTT-Mathematics Thinking with Technology MTT ACTIVITY Discussion 1 1 1.1 v t h h = vt 1 2 gt2 (1.1) xy (5, 0) 20m/s [1] Mode Graph Parametric [2] Y= [3] Window [4] Graph 1.1: Discussion 2 Window

More information

Kageyama (Kobe Univ.) 2015.06.23 2 / 41

Kageyama (Kobe Univ.) 2015.06.23 2 / 41 2015 2015.06.23 Kageyama (Kobe Univ.) 2015.06.23 1 / 41 Kageyama (Kobe Univ.) 2015.06.23 2 / 41 [ 1, +1] [ 1, +1] [ 1, +1] Kageyama (Kobe Univ.) 2015.06.23 3 / 41 Kageyama (Kobe Univ.) 2015.06.23 4 / 41

More information

r3.dvi

r3.dvi 00 3 2000.6.10 0 Java ( 7 1 7 1 GSSM 1? 1 1.1 4 4a 4b / / 0 255 HTML X 0 255 16 (0,32,255 #0020FF Java xclock -bg #0020FF xclock ^C (Control C xclock 4c 1 import java.applet.applet; import java.awt.*;

More information

mugensho.dvi

mugensho.dvi 1 1 f (t) lim t a f (t) = 0 f (t) t a 1.1 (1) lim(t 1) 2 = 0 t 1 (t 1) 2 t 1 (2) lim(t 1) 3 = 0 t 1 (t 1) 3 t 1 2 f (t), g(t) t a lim t a f (t) g(t) g(t) f (t) = o(g(t)) (t a) = 0 f (t) (t 1) 3 1.2 lim

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

Part y mx + n mt + n m 1 mt n + n t m 2 t + mn 0 t m 0 n 18 y n n a 7 3 ; x α α 1 7α +t t 3 4α + 3t t x α x α y mx + n

Part y mx + n mt + n m 1 mt n + n t m 2 t + mn 0 t m 0 n 18 y n n a 7 3 ; x α α 1 7α +t t 3 4α + 3t t x α x α y mx + n Part2 47 Example 161 93 1 T a a 2 M 1 a 1 T a 2 a Point 1 T L L L T T L L T L L L T T L L T detm a 1 aa 2 a 1 2 + 1 > 0 11 T T x x M λ 12 y y x y λ 2 a + 1λ + a 2 2a + 2 0 13 D D a + 1 2 4a 2 2a + 2 a

More information

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」 ALTIMA Company, MACNICA, Inc Nios II HAL API Modular Scatter-Gather DMA Core Ver.17.1 2018 8 Rev.1 Nios II HAL API Modular Scatter-Gather DMA Core...3...3...4... 4... 5 3-2-1. msgdma... 6 3-2-2. On-Chip

More information

ProVisionaire Control V3.0セットアップガイド

ProVisionaire Control V3.0セットアップガイド ProVisionaire Control V3 1 Manual Development Group 2018 Yamaha Corporation JA 2 3 4 5 NOTE 6 7 8 9 q w e r t r t y u y q w u e 10 3. NOTE 1. 2. 11 4. NOTE 5. Tips 12 2. 1. 13 3. 4. Tips 14 5. 1. 2. 3.

More information

Report Template

Report Template 1 1 1 2 3 3 1 2 4 2 1 2 3 4 5 6 7 2 1 2 3 4 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 7 8 3 9 10 3 11 12 13 14 4 15 16 17 18 19 2 1 1 1 4

More information

解きながら学ぶC++入門編

解きながら学ぶC++入門編 !... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...

More information

c-all.dvi

c-all.dvi III(994) (994) from PSL (9947) & (9922) c (99,992,994,996) () () 2 3 4 (2) 2 Euler 22 23 Euler 24 (3) 3 32 33 34 35 Poisson (4) 4 (5) 5 52 ( ) 2 Turbo 2 d 2 y=dx 2 = y y = a sin x + b cos x x = y = Fortran

More information

cpp2.dvi

cpp2.dvi 2018 c 2 C++ (2) STL, C++ 21 string 22 STL 23 21 string C, \0, (, ), (, ), /,,,, C++,,, string string,,,,,, include,,, int, > >>,,,, getline(, string ), [List 21] 2: #include 3: 4:

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

応力とひずみ.ppt

応力とひずみ.ppt in yukawa@numse.nagoya-u.ac.jp 2 3 4 5 x 2 6 Continuum) 7 8 9 F F 10 F L L F L 1 L F L F L F 11 F L F F L F L L L 1 L 2 12 F L F! A A! S! = F S 13 F L L F F n = F " cos# F t = F " sin# S $ = S cos# S S

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

解きながら学ぶJava入門編

解きながら学ぶJava入門編 44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean

More information

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do (Version: 2017/4/18) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

Informatics 2014

Informatics 2014 C 計算機の歴史 手回し計算機 新旧のソロバン バベッジの階差機関 スパコン ENIAC (1946) パソコン 大型汎用計算機 電卓 現在のコンピュータ Input Output Device Central Processing Unit I/O CPU Memory OS (Operating System) OS Windows 78, Vista, XP Windows Mac OS X

More information

Nikon スピードライト SB-900 使用説明書

Nikon スピードライト SB-900 使用説明書 Jp A A 2 k ka-6 k ka-4 k SB-900 kb-4 SB-900 k kf-22 k kf-2 SB-900 SB-900 CLS CPU t CPU CPU CPU A 3 CLS CLS ISO 35mm ISO v t CPU IX A A A 4 C-2 C-10 F-3 C-8 C-4 / F-21 C-27 C-20 D-60 D-26 C-9 C-24 C-25

More information

2009 2010 2 23 (MHD ) GFV (Galium Field Visualizer) GFV OpenGL GFV GFV GFV 1 1 2 2 2.1.................... 2 2.2................................. 2 2.3...................... 3 3 6 3.1 GFV....................

More information

新版 明解C++入門編

新版 明解C++入門編 第 1 章画面 出力 入力 C++ C++ C++ C++ C++ C++ C++ C++ #include using C++ C++ C++ main C++ C++ C++ int double char C++ C++ C++ string C++ C++ C++ 21 1-1 C++ 歴史 C++ C++ 歴史 CC with classes Fig.1-1 C C++ Simula 67

More information

x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i )

x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i ) 1 f(x) a b f(x)dx = n A(x i ) (1) ix [a, b] n i A(x i ) x i 1 f(x) [a, b] n h = (b a)/n y h = (b-a)/n y = f (x) h h a a+h a+2h a+(n-1)h b x 1: 1 x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x

More information

PX-047A Series

PX-047A Series B K L & L & A B C D E F A B A B C A B C A B A B A B C D E F G P BB H I y y & & K L L & & K L L L L & & & & L d L & & & & L L & & & L & & & & L & & & & & & & & L L L L L L & & & A B C D E F G

More information

2004 2005 2 2 1G01P038-0 1 2 1.1.............................. 2 1.2......................... 2 1.3......................... 3 2 4 2.1............................ 4 2.2....................... 4 2.3.......................

More information

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx.

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx. 1, 2 1 m110057@shibaura-it.ac.jp 2 sasano@sic.shibaura-it.ac.jp Eclipse Visual Studio ML Standard ML Emacs 1 ( IDE ) IDE C C++ Java IDE IDE IDE IDE Eclipse Java IDE Java Standard ML 1 print (Int. 1 Int

More information

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1: 005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;

More information

24.15章.微分方程式

24.15章.微分方程式 m d y dt = F m d y = mg dt V y = dy dt d y dt = d dy dt dt = dv y dt dv y dt = g dv y dt = g dt dt dv y = g dt V y ( t) = gt + C V y ( ) = V y ( ) = C = V y t ( ) = gt V y ( t) = dy dt = gt dy = g t dt

More information

10K

10K 1 2 3 4 Object Oriented Object Oriented Programming(OOP) 5 6 OOP#1 OOP#2 Java 7 Java 8 手続き型 v.s. OOP #1 OOPのメリット#3 追加 変更がラク 出典 立山秀利 Javaのオブジェクト指向がゼッタイにわかる本 秀和システム 出典 立山秀利 Javaのオブジェクト指向がゼッタイにわかる本 秀和システム

More information

2.2 Java C main Java main 2 C 6 C Java 3 C Java ( ) G101Hello.java G101Hello main G101Hello.java /* G101Hello */ class G101Hello { /* main */ public s

2.2 Java C main Java main 2 C 6 C Java 3 C Java ( ) G101Hello.java G101Hello main G101Hello.java /* G101Hello */ class G101Hello { /* main */ public s 2 2013 4 16 2.1............................... 2 1 2.2 Java......................... 2 2 2.3............. 2 2 2.4................................ 2 4 2.5............................ 2 5 2.6............................

More information

2014 3 10 5 1 5 1.1..................................... 5 2 6 2.1.................................... 6 2.2 Z........................................ 6 2.3.................................. 6 2.3.1..................

More information

JAXA key

JAXA key ! 芸術衛星INVADERのフライトモデル I A 2 8 7 IC J 6 R 22 I 7 6 C 9 I 9 9 J 7R 2 R 9 6 8 I 7 8 7 2 I22 7 8 2 J C I R 2 8 7 J 8 2 R C J C 9 6 I 2 6 7 2 8 8 6 I C 7 I C 9 C 9 J 7 C R 2 8 7 I I 9 6 8 2 R J 8 7 C

More information

II 2014 2 (1) log(1 + r/100) n = log 2 n log(1 + r/100) = log 2 n = log 2 log(1 + r/100) (2) y = f(x) = log(1 + x) x = 0 1 f (x) = 1/(1 + x) f (0) = 1

II 2014 2 (1) log(1 + r/100) n = log 2 n log(1 + r/100) = log 2 n = log 2 log(1 + r/100) (2) y = f(x) = log(1 + x) x = 0 1 f (x) = 1/(1 + x) f (0) = 1 II 2014 1 1 I 1.1 72 r 2 72 8 72/8 = 9 9 2 a 0 1 a 1 a 1 = a 0 (1+r/100) 2 a 2 a 2 = a 1 (1 + r/100) = a 0 (1 + r/100) 2 n a n = a 0 (1 + r/100) n a n a 0 2 n a 0 (1 + r/100) n = 2a 0 (1 + r/100) n = 2

More information

高等学校学習指導要領解説 数学編

高等学校学習指導要領解説 数学編 5 10 15 20 25 30 35 5 1 1 10 1 1 2 4 16 15 18 18 18 19 19 20 19 19 20 1 20 2 22 25 3 23 4 24 5 26 28 28 30 28 28 1 28 2 30 3 31 35 4 33 5 34 36 36 36 40 36 1 36 2 39 3 41 4 42 45 45 45 46 5 1 46 2 48 3

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

はじめにお読みください

はじめにお読みください START 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 @ 33 34 35 36 37 38 39 40 41 & @ 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 & 60 61 62 63 64 65 66 67 68

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61

More information

2 2.1 ( ) >> x=linspace(255,0,12) 2 x =

2 2.1 ( ) >> x=linspace(255,0,12) 2 x = 2 2.1 ( ) 2.1 1 >> x=linspace(255,0,12) 2 x = 3 1 5 4 255.0000 231.8182 208.6364 185.4545 162.2727 5 6 10 6 139.0909 115.9091 92.7273 69.5455 46.3636 7 11 12 8 23.1818 0 9 >> x=uint8(x) 10 x = 11 1 12

More information

C V C 6 1 6.1.............................. 1 6.......................... 3 6.3..................... 5 6.4 NULL............................. 8 6.5......................... 9 6.6..............................

More information

() / (front end) (back end) (phase) (pass) 1 2

() / (front end) (back end) (phase) (pass) 1 2 1 () () lex http://www.cs.info.mie-u.ac.jp/~toshi/lectures/compiler/ 2018 4 1 () / (front end) (back end) (phase) (pass) 1 2 () () var left, right; fun int main() { left = 0; right = 10; return ((left

More information

201908計算

201908計算 立命館大学大学院 2018 年度実施入学試験 博士課程前期課程 情報理工学研究科情報理工学専攻 入試方式コース実施月 ページ 専門科目 備考 一般入学試験 8 月 P.1~ 2 月 P.16~ 社会人入学試験 8 月 2 月 外国人留学生入学試験 ( 日本語基準 ) 計算機科学 7 月 (2018 年 9 月入学 ) 8 月 2 月 学内進学入学試験 7 月 (2018 年 9 月入学 ) 7 月

More information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1

( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1 () 2006 2 27 1 10 23 () 30 () 27 [1] p.97252 7 2 2.1 2.1.1 1 LIFO(last in first out, ) (push) (pup) 1 1: 2.1.2 1 List 4-1(p.100) stack[] stack top 1 2 (push) (pop) 1 2 void stack push(double val) val stack

More information

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2

Windows (L): D:\jyugyou\ D:\jyugyou\ D:\jyugyou\ (N): en2 OK 2 Windows C++ Microsoft Visual Studio 2010 C++ Microsoft C++ Microsoft Visual Studio 2010 Microsoft Visual Studio 2010 C++ C C++ Microsoft Visual Studio 2010 Professional Professional 1 Professional Professional

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

For_Beginners_CAPL.indd

For_Beginners_CAPL.indd CAPL Vector Japan Co., Ltd. 目次 1 CAPL 03 2 CAPL 03 3 CAPL 03 4 CAPL 04 4.1 CAPL 4.2 CAPL 4.3 07 5 CAPL 08 5.1 CANoe 5.2 CANalyzer 6 CAPL 10 7 CAPL 11 7.1 CAPL 7.2 CAPL 7.3 CAPL 7.4 CAPL 16 7.5 18 8 CAPL

More information

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 76 Python 2 1 $ python 1 >>> 1 + 2 2 3 2 / 76 print : 1 print : ( ) 3 / 76 print : 1 print 1 2 print hello 3 print 1+2 4 print 7/3 5 print abs(-5*4) 4 / 76 print : 1 print 1 2

More information

Abstract Kinect for Windows RGB Kinect for Windows v Kinect for Windows v2

Abstract Kinect for Windows RGB Kinect for Windows v Kinect for Windows v2 Kinect 2014 9 19 IS Report No. 2014092901 Report Medical Information System Laboratory Abstract Kinect for Windows 2012 2 RGB Kinect for Windows v2 2014 7 Kinect for Windows v2 1............................

More information

2004 TV Indexing Index Auto-Making Soccer Video Digests :2005 2 2 3603U043-0 Katsunori Kawaguchi 1 7 1.1.................................... 7 1.2.................................. 7 1.3..................................

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 5 3. 4. 5. A0 (1) A, B A B f K K A ϕ 1, ϕ 2 f ϕ 1 = f ϕ 2 ϕ 1 = ϕ 2 (2) N A 1, A 2, A 3,... N A n X N n X N, A n N n=1 1 A1 d (d 2) A (, k A k = O), A O. f

More information

untitled

untitled Fortran90 ( ) 17 12 29 1 Fortran90 Fortran90 FORTRAN77 Fortran90 1 Fortran90 module 1.1 Windows Windows UNIX Cygwin (http://www.cygwin.com) C\: Install Cygwin f77 emacs latex ps2eps dvips Fortran90 Intel

More information

BW BW

BW BW Induced Sorting BW 11T2042B 2015 3 23 1 1 1.1................................ 1 1.2................................... 1 2 BW 1 2.1..................................... 2 2.2 BW.................................

More information

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

More information

joho09.ppt

joho09.ppt s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)

More information

1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0

1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0 1 No.1 5 C 1 I III F 1 F 2 F 1 F 2 2 Φ 2 (t) = Φ 1 (t) Φ 1 (t t). = Φ 1(t) t = ( 1.5e 0.5t 2.4e 4t 2e 10t ) τ < 0 t > τ Φ 2 (t) < 0 lim t Φ 2 (t) = 0 0 < t < τ I II 0 No.2 2 C x y x y > 0 x 0 x > b a dx

More information

untitled

untitled Y = Y () x i c C = i + c = ( x ) x π (x) π ( x ) = Y ( ){1 + ( x )}( 1 x ) Y ( )(1 + C ) ( 1 x) x π ( x) = 0 = ( x ) R R R R Y = (Y ) CS () CS ( ) = Y ( ) 0 ( Y ) dy Y ( ) A() * S( π ), S( CS) S( π ) =

More information

C のコード例 (Z80 と同機能 ) int main(void) { int i,sum=0; for (i=1; i<=10; i++) sum=sum + i; printf ("sum=%d n",sum); 2

C のコード例 (Z80 と同機能 ) int main(void) { int i,sum=0; for (i=1; i<=10; i++) sum=sum + i; printf (sum=%d n,sum); 2 アセンブラ (Z80) の例 ORG 100H LD B,10 SUB A LOOP: ADD A,B DEC B JR NZ,LOOP LD (SUM),A HALT ORG 200H SUM: DEFS 1 END 1 C のコード例 (Z80 と同機能 ) int main(void) { int i,sum=0; for (i=1; i

More information

III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F

III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F III 1 (X, d) d U d X (X, d). 1. (X, d).. (i) d(x, y) d(z, y) d(x, z) (ii) d(x, y) d(z, w) d(x, z) + d(y, w) 2. (X, d). F X.. (1), X F, (2) F 1, F 2 F F 1 F 2 F, (3) F λ F λ F λ F. 3., A λ λ A λ. B λ λ

More information