├── src
├── Astree.rc
├── Astree.ico
├── Astree_fr.qm
├── lupdate.bat
├── Astree.qrc
├── Util
│ ├── FileUtil.h
│ ├── Properties.h
│ └── FileUtil.cpp
├── Vector3D.h
├── DeviceIoZmx.h
├── DeviceScaling.h
├── GlassCatalogIo.h
├── Referential.h
├── DeviceIo.h
├── MaterialAir.h
├── ImageQuality.h
├── MaterialWater.h
├── MaterialUnknow.h
├── MaterialVacuum.h
├── Photon.h
├── DeviceOptimizerRandom.h
├── LightAutofocus.h
├── DeviceOptimizerAmoeba.h
├── DockCommentary.h
├── DialogMediumManager.h
├── DockImageQuality.h
├── AstreeDefines.h
├── GlassSellmeier.h
├── DialogScaleDevice.h
├── tests
│ ├── test_newton.pro
│ ├── test_perfect_surface.pro
│ ├── test_scaling.pro
│ ├── test_newton.cpp
│ ├── test_perfect_surface.cpp
│ └── test_scaling.cpp
├── ImageQuality.cpp
├── GlassExtended2.h
├── GlassManager.h
├── FrameSideView.h
├── main.cpp
├── DockOptimizer.h
├── DockLightProperties.h
├── MaterialUnknow.cpp
├── Astree.sln
├── MaterialWater.cpp
├── MaterialVacuum.cpp
├── FrameSideView.ui
├── DockScatterPlot.h
├── Glass.h
├── MaterialAir.cpp
├── DockCommentary.cpp
├── Photon.cpp
├── MyViewFrame.h
├── DockSurfacesData.h
├── GlassSellmeier.cpp
├── DockCommentary.ui
├── Light.h
├── Referential.cpp
├── DialogMediumManager.ui
├── GlassExtended2.cpp
├── MainWindow.h
├── Astree.pro
├── DeviceOptimizer.h
├── DialogScaleDevice.cpp
├── DeviceScaling.cpp
├── Astree_vs2017.iss
├── DeviceOptimizerRandom.cpp
├── Surface.h
├── DialogMediumManager.cpp
├── GlassManager.cpp
├── Glass.cpp
├── GlassCatalogIo.cpp
├── DockLightProperties.cpp
├── DockSurfacesData.ui
├── DockLightProperties.ui
├── DockImageQuality.cpp
├── DockImageQuality.ui
├── OpticalDevice.h
├── LightAutoFocus.cpp
└── DockOptimizer.ui
├── README.md
├── .gitattributes
├── glass
└── common_glass.agf
├── samples
├── others
│ ├── simple_lens.astree
│ ├── Newton_BK7_diagonals.astree
│ ├── Mangin.astree
│ └── two_mirror_optimizer.astree
├── telescopes
│ ├── Newton_400.astree
│ ├── Schwarzschild.astree
│ ├── Newton_spherical_115.astree
│ ├── PressmanCamichel_400.astree
│ ├── Schmidt.astree
│ ├── DallKirkam_400.astree
│ ├── Cassegrain_400.astree
│ ├── Maksutov.astree
│ ├── RitcheyChretien_400.astree
│ ├── Schwarzschild_aplanat.astree
│ ├── Schmidt_field_flattener.astree
│ ├── Gregory_400.astree
│ ├── TMT.astree
│ ├── Cassegrain__field_corrector.astree
│ ├── PaulBacker_flat.astree
│ ├── Gregory_3Reflexions_2mirrors.astree
│ ├── PaulBacker.astree
│ ├── EisenburgPearson.astree
│ ├── Hougton_asymetric.astree
│ ├── Houghton_flat.astree
│ ├── Schmidt_meniscus_cassegrain.astree
│ ├── Meniscus_Sphere_Corrector.astree
│ ├── E-ELT.astree
│ ├── LSST.astree
│ ├── EdF_T2000_F3.4.astree
│ ├── Edf_T400_F8.astree
│ ├── Ross_hyperbolic_corrector.astree
│ ├── WideField.astree
│ ├── Honder_Riccardi.astree
│ ├── EdF_T300_F5.astree
│ └── EdF_T200_F2.5.astree
├── refractors
│ ├── Fraunhofer_100_F10.astree
│ └── Fraunhofer_155_F15.astree
├── eyepieces
│ ├── Huygens.astree
│ ├── Monocentric.astree
│ ├── Ramsden.astree
│ └── 2_lens_optim.astree
└── afocal
│ └── galillee.astree
└── .gitignore
/src/Astree.rc:
--------------------------------------------------------------------------------
1 | ASTREE ICON "Astree.ico"
2 |
3 |
--------------------------------------------------------------------------------
/src/Astree.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/Astree/master/src/Astree.ico
--------------------------------------------------------------------------------
/src/Astree_fr.qm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/Astree/master/src/Astree_fr.qm
--------------------------------------------------------------------------------
/src/lupdate.bat:
--------------------------------------------------------------------------------
1 | C:\Qt\Qt5.8.0\5.8\mingw53_32\bin\lupdate.exe Astree.pro
2 | pause
3 | C:\Qt\Qt5.8.0\5.8\mingw53_32\bin\linguist.exe Astree_fr.ts
4 |
--------------------------------------------------------------------------------
/src/Astree.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Astree.ico
4 | Astree_fr.qm
5 |
6 |
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Astree
2 | Astree is a free open source, optical ray tracing and design software
3 |
4 | This software computes and shows the ray-tracing analysis of optical devices, having conical or polynomial surfaces,having reflections, transmissions, stops, analysis of the image quality.
5 |
6 | The code sources is GPL, using Qt, feel free to contribute!
7 |
8 | Windows binaries can be downloaded at: http://edeforas.free.fr
9 |
10 |
--------------------------------------------------------------------------------
/src/Util/FileUtil.h:
--------------------------------------------------------------------------------
1 | #ifndef _FileUtil_
2 | #define _FileUtil_
3 |
4 | #include
5 | #include
6 | using namespace std;
7 |
8 | class FileUtil
9 | {
10 | public:
11 | static int file_size(char* sFileName);
12 | static bool file_delete(char* sFileName);
13 | static vector list(string sPath);
14 | static string get_executable_path();
15 | static string get_path(string sFile);
16 | };
17 |
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/Vector3D.h:
--------------------------------------------------------------------------------
1 | #ifndef Vector3D_
2 | #define Vector3D_
3 |
4 | #include
5 |
6 | namespace Vector3D
7 | {
8 | inline void normalize(double& x,double& y,double& z)
9 | {
10 | double dNorm2=x*x+y*y+z*z;
11 |
12 | if(dNorm2!=0.)
13 | {
14 | dNorm2=1./std::sqrt(dNorm2);
15 | x*=dNorm2;
16 | y*=dNorm2;
17 | z*=dNorm2;
18 | }
19 | }
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/glass/common_glass.agf:
--------------------------------------------------------------------------------
1 | CC common glasses
2 |
3 | NM F2 2
4 | CD 1.34533359 9.97743871e-3 2.09073118e-1 4.70450767e-2 9.37357162e-1 1.11886764e2
5 |
6 | NM BK7 2
7 | CD 1.039612120E+00 6.000698670E-03 2.317923440E-01 2.001791440E-02 1.010469450E+00 1.035606530E+02
8 |
9 | NM SF10 2
10 | CD 1.62153902E+00 1.22241457E-02 2.56287842E-01 5.95736775E-02 1.64447552E+00 1.47468793E+02
11 |
12 | NM Silica 2
13 | CD 0.6961663 0.00467914825849 0.4079426 0.01351206307396 0.8974794 97.934002537921
14 |
15 | NM void 2
--------------------------------------------------------------------------------
/src/DeviceIoZmx.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DeviceIoZmx_
6 | #define DeviceIoZmx_
7 |
8 | #include
9 | using namespace std;
10 |
11 | class OpticalDevice;
12 |
13 | class DeviceIoZmx
14 | {
15 | public:
16 | static OpticalDevice* import(string sFile);
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/DeviceScaling.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DeviceScaling_
6 | #define DeviceScaling_
7 |
8 | class OpticalDevice;
9 |
10 | class DeviceScaling
11 | {
12 | public:
13 | bool scale(OpticalDevice* pDevice, double dRatio, bool bScaleDiameter=true, bool bScaleFocal=true);
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/src/GlassCatalogIo.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef GlassCatalogIO_
6 | #define GlassCatalogIO_
7 |
8 | #include
9 | using namespace std;
10 |
11 | class GlassManager;
12 |
13 | class GlassCatalogIO
14 | {
15 | public:
16 | static bool load(string sFile, GlassManager &pManager);
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/Referential.h:
--------------------------------------------------------------------------------
1 | #ifndef Referential_
2 | #define Referential_
3 |
4 | class Referential
5 | {
6 | public:
7 | Referential();
8 | virtual ~Referential();
9 |
10 | void setYawPitchRoll(double Yaw,double Pitch,double Roll);
11 | void setTranslation(double x,double y, double z);
12 |
13 | void transform(double& x,double& y,double& z) const;
14 | void unTransform(double& x,double& y,double& z) const;
15 |
16 | private:
17 | double _rotMat[9]; //rotation
18 | double _x,_y,_z; //translation
19 | };
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/DeviceIo.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DeviceIo_
6 | #define DeviceIo_
7 |
8 | #include
9 | using namespace std;
10 |
11 | class OpticalDevice;
12 | class Properties;
13 |
14 | class DeviceIo
15 | {
16 | public:
17 | static bool save(string sFile, OpticalDevice* pD);
18 | static OpticalDevice* load(string sFile);
19 | };
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/MaterialAir.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef MaterialAir_
6 | #define MaterialAir_
7 |
8 | #include "Glass.h"
9 |
10 | class MaterialAir : public Glass
11 | {
12 | public:
13 | MaterialAir();
14 | MaterialAir(const MaterialAir& m);
15 |
16 | virtual Glass* clone() const;
17 |
18 | protected:
19 | virtual double calc_index(double dLambda);
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/ImageQuality.h:
--------------------------------------------------------------------------------
1 | #ifndef ImageQuality_
2 | #define ImageQuality_
3 |
4 | #include
5 | using namespace std;
6 |
7 | class ImageQuality
8 | {
9 | public:
10 | ImageQuality();
11 |
12 | void init(int iNbangles);
13 | int nb_angles() const;
14 |
15 | vector vdAngles;
16 | vector vdDist;
17 | vector vdVignetting;
18 | vector vdSpotSize;
19 | vector vdSpotvsAiry;
20 |
21 | double dFNumber;
22 | double dAirySize;
23 | bool isImageInfinite;
24 |
25 | private:
26 | int _iNbAngles;
27 | };
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/src/MaterialWater.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef MaterialWater_
6 | #define MaterialWater_
7 |
8 | #include "Glass.h"
9 |
10 | class MaterialWater : public Glass
11 | {
12 | public:
13 | MaterialWater();
14 | MaterialWater(const MaterialWater& m);
15 |
16 | virtual Glass* clone() const;
17 |
18 | protected:
19 | virtual double calc_index(double dLambda);
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/MaterialUnknow.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef MaterialUnknow_
6 | #define MaterialUnknow_
7 |
8 | #include "Glass.h"
9 |
10 | class MaterialUnknow : public Glass
11 | {
12 | public:
13 | MaterialUnknow();
14 | MaterialUnknow(const MaterialUnknow& m);
15 |
16 | virtual Glass* clone() const;
17 |
18 | protected:
19 | virtual double calc_index(double dLambda);
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/MaterialVacuum.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef MaterialVacuum_
6 | #define MaterialVacuum_
7 |
8 | #include "Glass.h"
9 |
10 | class MaterialVacuum : public Glass
11 | {
12 | public:
13 | MaterialVacuum();
14 | MaterialVacuum(const MaterialVacuum& m);
15 |
16 | virtual Glass* clone() const;
17 |
18 | protected:
19 | virtual double calc_index(double dLambda);
20 | };
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/Photon.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef Photon_
6 | #define Photon_
7 |
8 | class Photon
9 | {
10 | public:
11 | Photon();
12 | bool is_valid() const;
13 | void set_lambda(double dLambda);
14 | double lambda() const;
15 | double x,y,z;
16 | double dx,dy,dz;
17 | double anglex,angley;
18 |
19 | bool valid;
20 |
21 | private:
22 | double _lambda;
23 | };
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/src/DeviceOptimizerRandom.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DeviceOptimizerRandom_
6 | #define DeviceOptimizerRandom_
7 |
8 | #include "DeviceOptimizer.h"
9 |
10 | #define RANDOM_ITER_BY_AXIS 10
11 |
12 | class DeviceOptimizerRandom : public DeviceOptimizer
13 | {
14 | public:
15 | DeviceOptimizerRandom();
16 | virtual ~DeviceOptimizerRandom();
17 |
18 | OptimizerResult optimize();
19 | };
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/src/LightAutofocus.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef LightAutofocus_
6 | #define LightAutofocus_
7 |
8 | class Light;
9 |
10 | class LightAutofocus
11 | {
12 | public:
13 | LightAutofocus();
14 | double autofocus(const Light& l);
15 |
16 | void get_center(double& xCenter,double& yCenter) const;
17 |
18 | private:
19 | double compute_spot_size(const Light& l,double z);
20 |
21 | double _xCenter,_yCenter;
22 | };
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/DeviceOptimizerAmoeba.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DeviceOptimizerAmoeba_
6 | #define DeviceOptimizerAmoeba_
7 |
8 | #include "DeviceOptimizer.h"
9 |
10 | #include
11 | #include
12 | using namespace std;
13 |
14 | #define AMOEBA_MAX_ITER 500
15 |
16 | class DeviceOptimizerAmoeba : public DeviceOptimizer
17 | {
18 | public:
19 | DeviceOptimizerAmoeba();
20 | virtual ~DeviceOptimizerAmoeba();
21 |
22 | virtual OptimizerResult optimize();
23 | };
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/samples/others/simple_lens.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=90
2 | 0.radius_curvature=100
3 | 0.type=BK7
4 | 0.z=-200
5 | 1.diameter=90
6 | 1.radius_curvature=-300
7 | 1.type=Air
8 | 1.z=-180
9 | 2.diameter=62.28436473
10 | 2.diameter.auto=1
11 | 2.radius_curvature=inf
12 | 2.type=image
13 | 2.z=-55.16888393
14 | 2.z.autofocus=1
15 | device.note=Simple unoptimized lens, show chromatism, spherical abberations and field curvature
16 | device.relative_convention=0
17 | image.autocurvature=0
18 | image.autofocus=1
19 | light.colors=Red.Yellow.Green.Blue.
20 | light.half_field_of_view=10
21 | light.nbsteps=3
22 | note=Simple unoptimized lens, show chromatism, spherical abberations and field curvature
23 | parameter.showLightOffAxis=100
24 |
--------------------------------------------------------------------------------
/samples/telescopes/Newton_400.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1
2 | 0.diameter=400
3 | 0.radius_curvature=-4800
4 | 0.thick=-2400
5 | 0.type=reflect
6 | 1.diameter=32.00014299
7 | 1.diameter.auto=1
8 | 1.radius_curvature=1200.008131
9 | 1.thick=0
10 | 1.type=image
11 | 1.z.autofocus=1
12 | device.note=Simple parabolic newton
13 | device.note=
14 | device.note=Image field is curved
15 | device.note=
16 | device.note=All image parameteres are automatic
17 | device.relative_convention=1
18 | image.autocurvature=1
19 | image.autofocus=1
20 | light.colors=YellowBlack.
21 | light.half_field_of_view=0.38
22 | light.nbsteps=3
23 | note=Simple parabolic newton
24 | note=
25 | note=Image field is curved
26 | note=
27 | note=All image parameteres are automatic
28 |
--------------------------------------------------------------------------------
/src/DockCommentary.h:
--------------------------------------------------------------------------------
1 | #ifndef DOCKCOMMENTARY_H
2 | #define DOCKCOMMENTARY_H
3 |
4 | #include
5 |
6 | class OpticalDevice;
7 | namespace Ui {
8 | class DockComment;
9 | }
10 |
11 | class DockCommentary : public QDockWidget {
12 | Q_OBJECT
13 | public:
14 | DockCommentary(QWidget *parent = 0);
15 | ~DockCommentary();
16 |
17 | void device_changed(OpticalDevice* pDevice,int iReason);
18 |
19 | signals:
20 | void device_changed(void* pSender);
21 |
22 | protected:
23 | void changeEvent(QEvent *e);
24 |
25 | private:
26 | Ui::DockComment *ui;
27 | OpticalDevice* _pDevice;
28 | bool _bBlockSignals;
29 | private slots:
30 | void on_textEdit_textChanged();
31 | };
32 |
33 | #endif // DOCKCOMMENTARY_H
34 |
--------------------------------------------------------------------------------
/src/DialogMediumManager.h:
--------------------------------------------------------------------------------
1 | #ifndef DIALOGMEDIUMMANAGER_H
2 | #define DIALOGMEDIUMMANAGER_H
3 |
4 | #include
5 | using namespace std;
6 |
7 | #include
8 |
9 | namespace Ui {
10 | class DialogMediumManager;
11 | }
12 |
13 | class DialogMediumManager : public QDialog
14 | {
15 | Q_OBJECT
16 |
17 | public:
18 | explicit DialogMediumManager(QWidget *parent = 0,string sGlass="");
19 | ~DialogMediumManager();
20 |
21 | string selected_glass() const;
22 |
23 | private slots:
24 | void on_btnSelect_clicked();
25 |
26 | void on_btnCancel_clicked();
27 |
28 | void on_btnOk_clicked();
29 |
30 | private:
31 | Ui::DialogMediumManager *ui;
32 | string _sSelectedGlass;
33 | };
34 |
35 | #endif // DIALOGMEDIUMMANAGER_H
36 |
--------------------------------------------------------------------------------
/samples/telescopes/Schwarzschild.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=200
2 | 0.radius_curvature=765.5
3 | 0.type=reflect
4 | 0.z=-0
5 | 1.diameter=969.2640052
6 | 1.diameter.auto=1
7 | 1.inner_diameter=400
8 | 1.radius_curvature=2001.6
9 | 1.type=reflect
10 | 1.z=-1235.9
11 | 2.diameter=64.90102112
12 | 2.diameter.auto=1
13 | 2.radius_curvature=-626
14 | 2.type=image
15 | 2.z=1386.00333
16 | 2.z.autofocus=1
17 | device.convention=absolute
18 | half_field_of_view=3
19 | light.colors=YellowBlack.
20 | light.nbsteps=3
21 | note=From the book Handbook of Optics
22 | note=Optical Society of America
23 | note=
24 | note=Diameter is scaled to 200mm
25 | note=
26 | note=All surfaces are spherical
27 | note=
28 | note=Secondary is much larger than primary!
29 | note=
30 | note=Image field is curved
31 |
--------------------------------------------------------------------------------
/src/DockImageQuality.h:
--------------------------------------------------------------------------------
1 | #ifndef DOCKIMAGEQUALITY_H
2 | #define DOCKIMAGEQUALITY_H
3 |
4 | #include
5 |
6 | class OpticalDevice;
7 |
8 | namespace Ui {
9 | class DockImageQuality;
10 | }
11 |
12 | class DockImageQuality : public QDockWidget
13 | {
14 | Q_OBJECT
15 |
16 | public:
17 | explicit DockImageQuality(QWidget *parent = 0);
18 | ~DockImageQuality();
19 |
20 | void device_changed(OpticalDevice *pDevice, int iReason);
21 |
22 | private slots:
23 | void on_tableWidget_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
24 |
25 | private:
26 | Ui::DockImageQuality *ui;
27 | OpticalDevice* _pDevice;
28 |
29 | bool _bBlockSignals;
30 | };
31 |
32 | #endif // DOCKIMAGEQUALITY_H
33 |
--------------------------------------------------------------------------------
/src/AstreeDefines.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef AstreeDefines_
6 | #define AstreeDefines_
7 |
8 | #define ASTREE_VERSION "1.23"
9 |
10 | #define SIDEVIEW_NB_POINTS_SURFACE 41
11 | #define SIDEVIEW_NB_POINTS_LIGHT 17
12 | #define NB_POINTS_SCATTER_PLOT 71
13 |
14 | //device changed reasons
15 | #define NEW_OPTICAL_DEVICE 1
16 | #define OPTICAL_DEVICE_SAVED 2
17 | #define OPTICAL_DEVICE_CHANGED 3
18 | #define COMMENT_CHANGED 4
19 | #define USER_INTERFACE_CHANGED 5
20 | #define LIGHT_OFF_AXIS_CHANGED 6
21 | #define OPTIMIZER_CHANGED 6
22 | #define CHANGE_GLASS 7 //launch glass manager
23 | #endif
24 |
--------------------------------------------------------------------------------
/samples/telescopes/Newton_spherical_115.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=115
2 | 0.radius_curvature=-1800
3 | 0.type=reflect
4 | 0.z=-0
5 | 1.diameter=31.49731033
6 | 1.diameter.auto=1
7 | 1.radius_curvature=361.1619611
8 | 1.type=image
9 | 1.z=-899.6548796
10 | 1.z.autofocus=1
11 | device.note=This sample show how spherical mirrors can be used in small commercial Newton telescopes, with a diameter under 115 mm.
12 | device.note=
13 | device.note=Image field is curved
14 | device.relative_convention=0
15 | image.autocurvature=1
16 | image.autofocus=1
17 | light.colors=YellowBlack.
18 | light.half_field_of_view=1
19 | light.nbsteps=3
20 | note=This sample show how spherical mirrors can be used in small commercial Newton telescopes, with a diameter under 115 mm.
21 | note=
22 | note=Image field is curved
23 | parameter.showLightOffAxis=0
24 |
--------------------------------------------------------------------------------
/src/GlassSellmeier.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef GlassSellmeier_
6 | #define GlassSellmeier_
7 |
8 | #include "Glass.h"
9 |
10 | class GlassSellmeier : public Glass
11 | {
12 | public:
13 | GlassSellmeier();
14 | GlassSellmeier(const GlassSellmeier& m);
15 | virtual Glass* clone() const;
16 |
17 | void set_coefs(double dB1,double dB2,double dB3,double dC1,double dC2,double dC3);
18 |
19 | protected:
20 | virtual double calc_index(double dLambdaMicrons);
21 |
22 | private:
23 | double _dB1;
24 | double _dB2;
25 | double _dB3;
26 | double _dC1;
27 | double _dC2;
28 | double _dC3;
29 | };
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/DialogScaleDevice.h:
--------------------------------------------------------------------------------
1 | #ifndef DIALOGSCALEDEVICE_H
2 | #define DIALOGSCALEDEVICE_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class DialogScaleDevice;
8 | }
9 |
10 | class DialogScaleDevice : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit DialogScaleDevice(QWidget *parent = 0);
16 | ~DialogScaleDevice();
17 |
18 | double get_scale();
19 | bool get_scale_diameter();
20 | bool get_scale_focal();
21 |
22 | private slots:
23 | void on_pushButton_clicked();
24 |
25 | void on_pushButton_2_clicked();
26 |
27 | void on_rbFactor_clicked();
28 |
29 | void on_rbPercentage_clicked();
30 |
31 | void on_rbSizeChange_clicked();
32 |
33 | private:
34 | Ui::DialogScaleDevice *ui;
35 |
36 | double _dScale;
37 | bool _bScaleDiameter;
38 | bool _bScaleFocal;
39 | };
40 |
41 | #endif // DIALOGSCALEDEVICE_H
42 |
--------------------------------------------------------------------------------
/samples/others/Newton_BK7_diagonals.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1
2 | 0.diameter=200
3 | 0.radius_curvature=-2400
4 | 0.thick=-700
5 | 0.type=reflect
6 | 1.diameter=100
7 | 1.radius_curvature=inf
8 | 1.thick=-40
9 | 1.type=BK7
10 | 2.diameter=100
11 | 2.radius_curvature=inf
12 | 2.thick=-473.6989228
13 | 2.type=Air
14 | 3.diameter=32
15 | 3.radius_curvature=inf
16 | 3.thick=0
17 | 3.type=image
18 | 3.z.autofocus=1
19 | device.convention=relative
20 | device.note=This sample show how a perfect telescope can be altered using prismatic secondaries, or right angles prismatic devices
21 | device.relative_convention=1
22 | half_field_of_view=0.5
23 | image.autocurvature=0
24 | image.autofocus=1
25 | light.colors=Red.Yellow.Green.Blue.
26 | light.half_field_of_view=0.5
27 | light.nbsteps=3
28 | note=This sample show how a perfect telescope can be altered using prismatic secondaries, or right angles prismatic devices
29 |
--------------------------------------------------------------------------------
/samples/telescopes/PressmanCamichel_400.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=400
2 | 0.inner_diameter=60
3 | 0.radius_curvature=-2385.093168
4 | 0.thick=-802.2857143
5 | 0.type=reflect
6 | 1.conic=7.720264319
7 | 1.diameter=138.2131172
8 | 1.diameter.auto=1
9 | 1.radius_curvature=-1248.89441
10 | 1.thick=1040.638224
11 | 1.type=reflect
12 | 2.diameter=31.8711391
13 | 2.diameter.auto=1
14 | 2.radius_curvature=inf
15 | 2.thick=0
16 | 2.type=image
17 | 2.z.autofocus=1
18 | device.note=primary is spherical
19 | device.note=
20 | device.note=Off axis images are bad
21 | device.note=
22 | device.note=secondary is strongly aspheric
23 | device.relative_convention=1
24 | image.autocurvature=0
25 | image.autofocus=1
26 | light.colors=YellowBlack.
27 | light.half_field_of_view=0.28
28 | light.nbsteps=3
29 | note=primary is spherical
30 | note=
31 | note=Off axis images are bad
32 | note=
33 | note=secondary is strongly aspheric
34 |
--------------------------------------------------------------------------------
/src/tests/test_newton.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = app
2 | CONFIG += console c++11
3 | CONFIG -= app_bundle
4 | CONFIG -= qt
5 |
6 | SOURCES += \
7 | test_newton.cpp \
8 | ..\OpticalDevice.cpp \
9 | ..\ImageQuality.cpp \
10 | ..\Surface.cpp \
11 | ..\Photon.cpp \
12 | ..\Light.cpp \
13 | ..\LightAutofocus.cpp \
14 | ..\Glass.cpp \
15 | ..\GlassManager.cpp \
16 | ..\MaterialAir.cpp \
17 | ..\MaterialUnknow.cpp \
18 | ..\MaterialVacuum.cpp \
19 | ..\MaterialWater.cpp
20 |
21 | HEADERS += \
22 | ..\OpticalDevice.h \
23 | ..\ImageQuality.h \
24 | ..\Surface.h \
25 | ..\Photon.h \
26 | ..\Light.h \
27 | ..\LightAutofocus.h \
28 | ..\Vector3D.h \
29 | ..\Glass.h \
30 | ..\GlassManager.h \
31 | ..\MaterialAir.h \
32 | ..\MaterialUnknow.h \
33 | ..\MaterialVacuum.h \
34 | ..\MaterialWater.h
35 |
36 | INCLUDEPATH += ..
37 |
--------------------------------------------------------------------------------
/src/ImageQuality.cpp:
--------------------------------------------------------------------------------
1 | #include "ImageQuality.h"
2 |
3 | ////////////////////////////////////////////////////////////////////////////////
4 | ImageQuality::ImageQuality()
5 | {
6 | init(0);
7 | }
8 | ////////////////////////////////////////////////////////////////////////////////
9 | void ImageQuality::init(int iNbangles)
10 | {
11 | _iNbAngles=iNbangles;
12 | vdAngles.assign(iNbangles,-1.);
13 | vdDist.assign(iNbangles,-1.);
14 | vdVignetting.assign(iNbangles,-1.);
15 | vdSpotSize.assign(iNbangles,-1.);
16 | vdSpotvsAiry.assign(iNbangles,-1.);
17 |
18 | dFNumber=-1.;
19 | dAirySize=-1.;
20 | isImageInfinite=false;
21 | }
22 | ////////////////////////////////////////////////////////////////////////////////
23 | int ImageQuality::nb_angles() const
24 | {
25 | return _iNbAngles;
26 | }
27 | ////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/samples/telescopes/Schmidt.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=200
2 | 0.radius_curvature=inf
3 | 0.thick=4
4 | 0.type=BK7
5 | 1.diameter=200.168303
6 | 1.diameter.auto=1
7 | 1.r4=5.39e-010
8 | 1.r6=8.9e-016
9 | 1.radius_curvature=inf
10 | 1.thick=960
11 | 1.type=Air
12 | 2.diameter=262.1404955
13 | 2.diameter.auto=1
14 | 2.radius_curvature=-960
15 | 2.thick=-479.9678645
16 | 2.type=reflect
17 | 3.diameter=30.16605784
18 | 3.diameter.auto=1
19 | 3.radius_curvature=-473.4756013
20 | 3.thick=0
21 | 3.type=image
22 | 3.z.autofocus=1
23 | device.note=From http://www.telescope-optics.net/appendix3.htm
24 | device.note=
25 | device.note=Model 2: SchmidtCamera
26 | device.relative_convention=1
27 | image.autocurvature=1
28 | image.autofocus=1
29 | light.colors=Red.Yellow.Green.Blue.
30 | light.half_field_of_view=1.8
31 | light.nbsteps=3
32 | note=From http://www.telescope-optics.net/appendix3.htm
33 | note=
34 | note=Model 2: SchmidtCamera
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 | *.exe
49 | *.user
50 | *.autosave
51 | *.pdb
52 |
--------------------------------------------------------------------------------
/src/tests/test_perfect_surface.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = app
2 | CONFIG += console c++11
3 | CONFIG -= app_bundle
4 | CONFIG -= qt
5 |
6 | SOURCES += \
7 | test_perfect_surface.cpp \
8 | ..\OpticalDevice.cpp \
9 | ..\ImageQuality.cpp \
10 | ..\Surface.cpp \
11 | ..\Photon.cpp \
12 | ..\Light.cpp \
13 | ..\LightAutofocus.cpp \
14 | ..\Glass.cpp \
15 | ..\GlassManager.cpp \
16 | ..\MaterialAir.cpp \
17 | ..\MaterialUnknow.cpp \
18 | ..\MaterialVacuum.cpp \
19 | ..\MaterialWater.cpp
20 |
21 | HEADERS += \
22 | ..\OpticalDevice.h \
23 | ..\ImageQuality.h \
24 | ..\Surface.h \
25 | ..\Photon.h \
26 | ..\Light.h \
27 | ..\LightAutofocus.h \
28 | ..\Vector3D.h \
29 | ..\Glass.h \
30 | ..\GlassManager.h \
31 | ..\MaterialAir.h \
32 | ..\MaterialUnknow.h \
33 | ..\MaterialVacuum.h \
34 | ..\MaterialWater.h
35 |
36 | INCLUDEPATH += ..
37 |
--------------------------------------------------------------------------------
/samples/refractors/Fraunhofer_100_F10.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=100
2 | 0.radius_curvature=600
3 | 0.thick=11
4 | 0.type=BK7
5 | 1.diameter=100
6 | 1.radius_curvature=-360
7 | 1.thick=1
8 | 1.type=Air
9 | 2.diameter=100
10 | 2.radius_curvature=-363
11 | 2.thick=7
12 | 2.type=F2
13 | 3.diameter=100
14 | 3.radius_curvature=-1510
15 | 3.thick=989.4873591
16 | 3.type=Air
17 | 4.diameter=31.46708489
18 | 4.diameter.auto=1
19 | 4.radius_curvature=-370
20 | 4.thick=0
21 | 4.type=image
22 | 4.z.autofocus=1
23 | device.note=Fraunhofer doublet (100mm F/10)
24 | device.note=from
25 | device.note=http://www.telescope-optics.net/achromats.htm
26 | device.relative_convention=1
27 | image.autocurvature=0
28 | image.autofocus=1
29 | light.colors=Red.Yellow.Green.Blue.
30 | light.half_field_of_view=0.9
31 | light.nbsteps=3
32 | note=Fraunhofer doublet (100mm F/10)
33 | note=from
34 | note=http://www.telescope-optics.net/achromats.htm
35 | parameter.showLightOffAxis=100
36 |
--------------------------------------------------------------------------------
/samples/telescopes/DallKirkam_400.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-0.6142354219
2 | 0.diameter=400
3 | 0.inner_diameter=60
4 | 0.radius_curvature=-2397.003745
5 | 0.thick=-806.2921348
6 | 0.type=reflect
7 | 1.diameter=138.8396482
8 | 1.diameter.auto=1
9 | 1.radius_curvature=-1255.131086
10 | 1.thick=1045.816257
11 | 1.type=reflect
12 | 2.diameter=31.61865402
13 | 2.diameter.auto=1
14 | 2.radius_curvature=inf
15 | 2.thick=0
16 | 2.type=image
17 | 2.z.autofocus=1
18 | device.convention=relative
19 | device.note=from
20 | device.note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
21 | device.note=
22 | device.note=model aplanatic cassegrain
23 | device.relative_convention=1
24 | half_field_of_view=0.28
25 | image.autocurvature=0
26 | image.autofocus=1
27 | light.colors=YellowBlack.
28 | light.half_field_of_view=0.28
29 | light.nbsteps=3
30 | note=from
31 | note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
32 | note=
33 | note=model aplanatic cassegrain
34 |
--------------------------------------------------------------------------------
/src/tests/test_scaling.pro:
--------------------------------------------------------------------------------
1 | TEMPLATE = app
2 | CONFIG += console c++11
3 | CONFIG -= app_bundle
4 | CONFIG -= qt
5 |
6 | SOURCES += \
7 | test_scaling.cpp \
8 | ..\OpticalDevice.cpp \
9 | ..\ImageQuality.cpp \
10 | ..\Surface.cpp \
11 | ..\Photon.cpp \
12 | ..\Light.cpp \
13 | ..\LightAutofocus.cpp \
14 | ..\Glass.cpp \
15 | ..\GlassManager.cpp \
16 | ..\MaterialAir.cpp \
17 | ..\MaterialUnknow.cpp \
18 | ..\MaterialVacuum.cpp \
19 | ..\MaterialWater.cpp \
20 | ../DeviceScaling.cpp
21 |
22 | HEADERS += \
23 | ..\OpticalDevice.h \
24 | ..\ImageQuality.h \
25 | ..\Surface.h \
26 | ..\Photon.h \
27 | ..\Light.h \
28 | ..\LightAutofocus.h \
29 | ..\Vector3D.h \
30 | ..\Glass.h \
31 | ..\GlassManager.h \
32 | ..\MaterialAir.h \
33 | ..\MaterialUnknow.h \
34 | ..\MaterialVacuum.h \
35 | ..\MaterialWater.h \
36 | ../DeviceScaling.h
37 |
38 | INCLUDEPATH += ..
39 |
--------------------------------------------------------------------------------
/samples/telescopes/Cassegrain_400.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1
2 | 0.diameter=400
3 | 0.inner_diameter=60
4 | 0.radius_curvature=-2403.003755
5 | 0.thick=-808.310388
6 | 0.type=reflect
7 | 1.conic=-4.840672339
8 | 1.diameter=139.2208613
9 | 1.diameter.auto=1
10 | 1.radius_curvature=-1258.272841
11 | 1.thick=1048.427212
12 | 1.type=reflect
13 | 2.diameter=31.45011443
14 | 2.diameter.auto=1
15 | 2.radius_curvature=inf
16 | 2.thick=0
17 | 2.type=image
18 | 2.z.autofocus=1
19 | device.convention=relative
20 | device.note=from
21 | device.note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
22 | device.note=
23 | device.note=model aplanatic cassegrain
24 | device.relative_convention=1
25 | half_field_of_view=0.28
26 | image.autocurvature=0
27 | image.autofocus=1
28 | light.colors=YellowBlack.
29 | light.half_field_of_view=0.28
30 | light.nbsteps=3
31 | note=from
32 | note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
33 | note=
34 | note=model aplanatic cassegrain
35 |
--------------------------------------------------------------------------------
/samples/telescopes/Maksutov.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=200
2 | 0.radius_curvature=-225.36
3 | 0.thick=21
4 | 0.type=BK7
5 | 1.diameter=207.6152509
6 | 1.diameter.auto=1
7 | 1.radius_curvature=-237.8
8 | 1.thick=670
9 | 1.type=Air
10 | 2.diameter=257.180131
11 | 2.diameter.auto=1
12 | 2.radius_curvature=-1063
13 | 2.thick=-545.3254278
14 | 2.type=reflect
15 | 3.diameter=32.00297665
16 | 3.diameter.auto=1
17 | 3.radius_curvature=-458.0088815
18 | 3.thick=0
19 | 3.type=image
20 | 3.z.autofocus=1
21 | device.note=from http://www.telescope-optics.net/
22 | device.note=
23 | device.note=chapter 10.2.3
24 | device.note=
25 | device.note=All surfaces are spherical.
26 | device.relative_convention=1
27 | image.autocurvature=1
28 | image.autofocus=1
29 | light.colors=Red.Yellow.Green.Blue.
30 | light.half_field_of_view=1.79
31 | light.nbsteps=3
32 | note=from http://www.telescope-optics.net/
33 | note=
34 | note=chapter 10.2.3
35 | note=
36 | note=All surfaces are spherical.
37 | parameter.showLightOffAxis=0
38 |
--------------------------------------------------------------------------------
/src/GlassExtended2.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef GlassExtended2_
6 | #define GlassExtended2_
7 |
8 | #include "Glass.h"
9 |
10 | // glass definition as in the https://github.com/nzhagen/zemaxglass
11 |
12 | class GlassExtended2 : public Glass
13 | {
14 | public:
15 | GlassExtended2();
16 | GlassExtended2(const GlassExtended2& m);
17 | virtual Glass* clone() const;
18 |
19 | void set_coefs(double dC0,double dC1,double dC2,double dC3,double dC4,double dC5,double dC6,double dC7);
20 |
21 | protected:
22 | virtual double calc_index(double dLambdaMicrons);
23 |
24 | private:
25 | double _dC0;
26 | double _dC1;
27 | double _dC2;
28 | double _dC3;
29 | double _dC4;
30 | double _dC5;
31 | double _dC6;
32 | double _dC7;
33 | };
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/src/GlassManager.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef GlassManager_
6 | #define GlassManager_
7 |
8 | #include
9 | #include
10 | using namespace std;
11 |
12 | class Glass;
13 |
14 | class GlassManager
15 | {
16 | public:
17 | static GlassManager& singleton();
18 | Glass* create(string sMaterial) const;
19 | void destroy(Glass* pMaterial);
20 |
21 | void list_available(vector& vsAvailable);
22 |
23 | bool exist(string sGlass) const;
24 |
25 | unsigned int solid_color(string sMaterial);
26 |
27 | void inject(Glass* pGlass); //take ownership of pGlass
28 |
29 | private:
30 | GlassManager();
31 | ~GlassManager();
32 |
33 | static GlassManager* _pGlassManager;
34 | vector _vGlass; // TODO use map
35 | };
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/samples/telescopes/RitcheyChretien_400.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1.136753441
2 | 0.diameter=400
3 | 0.inner_diameter=60
4 | 0.radius_curvature=-2406.015038
5 | 0.thick=-809.3233083
6 | 0.type=reflect
7 | 1.conic=-6.499526963
8 | 1.diameter=139.357288
9 | 1.diameter.auto=1
10 | 1.radius_curvature=-1259.849624
11 | 1.thick=1049.837418
12 | 1.type=reflect
13 | 2.diameter=31.36525282
14 | 2.diameter.auto=1
15 | 2.radius_curvature=-449.9236727
16 | 2.thick=0
17 | 2.type=image
18 | 2.z.autofocus=1
19 | device.convention=relative
20 | device.note=from
21 | device.note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
22 | device.note=
23 | device.note=model aplanatic cassegrain
24 | device.relative_convention=1
25 | half_field_of_view=0.28
26 | image.autocurvature=1
27 | image.autofocus=1
28 | light.colors=YellowBlack.
29 | light.half_field_of_view=0.28
30 | light.nbsteps=3
31 | note=from
32 | note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
33 | note=
34 | note=model aplanatic cassegrain
35 | parameter.showLightOffAxis=0
36 |
--------------------------------------------------------------------------------
/samples/telescopes/Schwarzschild_aplanat.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-8.63
2 | 0.diameter=200
3 | 0.radius_curvature=-2666
4 | 0.thick=-756
5 | 0.type=reflect
6 | 1.conic=2.5
7 | 1.diameter=99.1121398
8 | 1.diameter.auto=1
9 | 1.radius_curvature=951
10 | 1.thick=260.686552
11 | 1.type=reflect
12 | 2.diameter=9.255856163
13 | 2.diameter.auto=1
14 | 2.radius_curvature=inf
15 | 2.thick=0
16 | 2.type=image
17 | 2.z.autofocus=1
18 | device.convention=relative
19 | device.note=From
20 | device.note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
21 | device.note=
22 | device.note=model Schwarzschild aplanat
23 | device.note=
24 | device.note=Optimized for a CCD sensor
25 | device.relative_convention=1
26 | half_field_of_view=0.44
27 | image.autocurvature=0
28 | image.autofocus=1
29 | light.colors=YellowBlack.
30 | light.half_field_of_view=0.44
31 | light.nbsteps=3
32 | note=From
33 | note=http://www.telescope-optics.net/appendix.htm#TWO-MIRROR
34 | note=
35 | note=model Schwarzschild aplanat
36 | note=
37 | note=Optimized for a CCD sensor
38 |
--------------------------------------------------------------------------------
/src/FrameSideView.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef FRAMESIDEVIEW_H
6 | #define FRAMESIDEVIEW_H
7 |
8 | #include
9 |
10 | #include
11 | #include
12 | using namespace std;
13 |
14 | namespace Ui
15 | {
16 | class FrameSideView;
17 | }
18 |
19 | class OpticalDevice;
20 | class FrameSideView : public QFrame
21 | {
22 | Q_OBJECT
23 | Q_DISABLE_COPY(FrameSideView)
24 | public:
25 | FrameSideView(QWidget *parent = 0);
26 | virtual ~FrameSideView();
27 | void device_changed(OpticalDevice *pDevice, int iReason);
28 |
29 | void fit_in_view();
30 | void zoom_in();
31 | void zoom_out();
32 |
33 | protected:
34 | virtual void changeEvent(QEvent *e);
35 |
36 | private:
37 | Ui::FrameSideView *m_ui;
38 | OpticalDevice* _pDevice;
39 |
40 | void enlarge(QRectF& r,double dRatio);
41 | };
42 |
43 | #endif // FRAMESIDEVIEW_H
44 |
--------------------------------------------------------------------------------
/samples/telescopes/Schmidt_field_flattener.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=200
2 | 0.radius_curvature=inf
3 | 0.thick=4
4 | 0.type=BK7
5 | 1.diameter=200
6 | 1.r4=5.39e-010
7 | 1.r6=8.9e-016
8 | 1.radius_curvature=inf
9 | 1.thick=960
10 | 1.type=Air
11 | 2.diameter=220
12 | 2.radius_curvature=-960
13 | 2.thick=-478
14 | 2.type=reflect
15 | 3.diameter=30.73798118
16 | 3.diameter.auto=1
17 | 3.radius_curvature=-161.88
18 | 3.thick=-1.5
19 | 3.type=BK7
20 | 4.diameter=30.49207191
21 | 4.diameter.auto=1
22 | 4.radius_curvature=inf
23 | 4.thick=-0.978593649
24 | 4.type=Air
25 | 5.diameter=30.0117994
26 | 5.diameter.auto=1
27 | 5.radius_curvature=inf
28 | 5.thick=0
29 | 5.type=image
30 | 5.z.autofocus=1
31 | device.note=From http://www.telescope-optics.net/appendix3.htm
32 | device.note=
33 | device.note=
34 | device.note=Model 2: Schmidt Camera
35 | device.relative_convention=1
36 | image.autocurvature=0
37 | image.autofocus=1
38 | light.colors=Red.Yellow.Green.Blue.
39 | light.half_field_of_view=1.8
40 | light.nbsteps=3
41 | note=From http://www.telescope-optics.net/appendix3.htm
42 | note=
43 | note=
44 | note=Model 2: Schmidt Camera
45 |
--------------------------------------------------------------------------------
/src/main.cpp:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #include "MainWindow.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | QApplication app(argc, argv);
16 |
17 | QString sPath=QCoreApplication::applicationDirPath();
18 |
19 | QTranslator qtTranslator;
20 | qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
21 | app.installTranslator(&qtTranslator);
22 |
23 | QTranslator myappTranslator;
24 | myappTranslator.load("Astree_" + QLocale::system().name(),sPath);
25 | app.installTranslator(&myappTranslator);
26 |
27 | MainWindow w;
28 | w.showMaximized();
29 |
30 | if (argc==2)
31 | {
32 | w.load_file(string(argv[1]));
33 | }
34 |
35 | return app.exec();
36 | }
37 |
--------------------------------------------------------------------------------
/samples/eyepieces/Huygens.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=100
2 | 0.radius_curvature=1000
3 | 0.thick=500
4 | 0.type=perfect_lens
5 | 1.diameter=0
6 | 1.diameter.auto=1
7 | 1.radius_curvature=inf
8 | 1.thick=-5.8
9 | 1.type=void
10 | 2.diameter=15
11 | 2.radius_curvature=18
12 | 2.thick=3
13 | 2.type=BK7
14 | 3.diameter=15
15 | 3.radius_curvature=inf
16 | 3.thick=20
17 | 3.type=Air
18 | 4.diameter=10
19 | 4.radius_curvature=9
20 | 4.thick=2
21 | 4.type=BK7
22 | 5.diameter=10
23 | 5.radius_curvature=inf
24 | 5.thick=3.1
25 | 5.type=Air
26 | 6.diameter=6.267250588
27 | 6.diameter.auto=1
28 | 6.radius_curvature=inf
29 | 6.thick=0
30 | 6.type=image_infinite
31 | device.note=Huygens eyepiece
32 | device.note=
33 | device.note=frome the website:
34 | device.note=
35 | device.note=http://www.telescope-optics.net/appendix4.htm
36 | device.relative_convention=1
37 | image.autocurvature=0
38 | image.autofocus=0
39 | light.colors=Red.YellowBlack.Yellow.Green.Blue.
40 | light.half_field_of_view=0.8
41 | light.nbsteps=3
42 | note=Huygens eyepiece
43 | note=
44 | note=frome the website:
45 | note=
46 | note=http://www.telescope-optics.net/appendix4.htm
47 |
--------------------------------------------------------------------------------
/src/DockOptimizer.h:
--------------------------------------------------------------------------------
1 | #ifndef DOCKOPTIMIZER_H
2 | #define DOCKOPTIMIZER_H
3 |
4 | #include
5 |
6 | #include "DeviceOptimizer.h"
7 |
8 | namespace Ui {
9 | class DockOptimizer;
10 | }
11 |
12 | class QTableWidgetItem;
13 |
14 | class OpticalDevice;
15 |
16 | class DockOptimizer : public QDockWidget
17 | {
18 | Q_OBJECT
19 |
20 | public:
21 | explicit DockOptimizer(QWidget *parent = 0);
22 | ~DockOptimizer();
23 |
24 | void device_changed(OpticalDevice *pDevice, int iReason);
25 |
26 | private slots:
27 | void on_pushButton_clicked();
28 | void on_twParams_cellChanged(int row, int column);
29 | void on_cbCriteria_currentTextChanged(const QString &arg1);
30 | void tableChanged();
31 |
32 | void on_cbMethod_currentIndexChanged(int index);
33 |
34 | void on_pushButton_2_clicked();
35 |
36 | void on_leMinVignetting_editingFinished();
37 |
38 | private:
39 | void optimize(bool bModeRefine);
40 |
41 | Ui::DockOptimizer *ui;
42 | OpticalDevice* _pDevice;
43 | int _iNbSurfaces;
44 | bool _bBlockSignals;
45 | };
46 |
47 | #endif // DOCKOPTIMIZER_H
48 |
--------------------------------------------------------------------------------
/src/DockLightProperties.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DOCKLIGHTPROPERTIES_H
6 | #define DOCKLIGHTPROPERTIES_H
7 |
8 | #include
9 |
10 | class OpticalDevice;
11 |
12 | namespace Ui
13 | {
14 | class DockLightProperties;
15 | }
16 |
17 | class DockLightProperties : public QDockWidget
18 | {
19 | Q_OBJECT
20 | Q_DISABLE_COPY(DockLightProperties)
21 | public:
22 | explicit DockLightProperties(QWidget *parent = 0);
23 | virtual ~DockLightProperties();
24 |
25 | void device_changed(OpticalDevice* pDevice, int iReason);
26 |
27 | public slots:
28 | void OnLightChange();
29 |
30 | protected:
31 | virtual void changeEvent(QEvent *e);
32 |
33 | private slots:
34 | void on_spNbAngles_valueChanged(int arg1);
35 |
36 | private:
37 | Ui::DockLightProperties *m_ui;
38 | OpticalDevice* _pDevice;
39 | bool _bBlockSignals;
40 | };
41 |
42 | #endif // DOCKLIGHTPROPERTIES_H
43 |
--------------------------------------------------------------------------------
/src/MaterialUnknow.cpp:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #include "MaterialUnknow.h"
6 |
7 | //////////////////////////////////////////////////////////////////////////////
8 | MaterialUnknow::MaterialUnknow()
9 | {
10 | _sName="Unknow";
11 | _sFormula="Unknow";
12 | _iSolidColor=0xf0f0f0;
13 | }
14 | //////////////////////////////////////////////////////////////////////////////
15 | MaterialUnknow::MaterialUnknow(const MaterialUnknow& m): Glass(m)
16 | { }
17 | //////////////////////////////////////////////////////////////////////////////
18 | Glass* MaterialUnknow::clone() const
19 | {
20 | return new MaterialUnknow(*this);
21 | }
22 | //////////////////////////////////////////////////////////////////////////////
23 | double MaterialUnknow::calc_index(double dLambdaMicrons)
24 | {
25 | (void)dLambdaMicrons;
26 | return 1.;
27 | }
28 | //////////////////////////////////////////////////////////////////////////////
29 |
--------------------------------------------------------------------------------
/src/Astree.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.757
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Astree", "Astree.vcxproj", "{8CEE3939-7E98-3B3E-9BA8-DB91B29818E3}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Release|x64 = Release|x64
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {8CEE3939-7E98-3B3E-9BA8-DB91B29818E3}.Debug|x64.ActiveCfg = Debug|x64
15 | {8CEE3939-7E98-3B3E-9BA8-DB91B29818E3}.Debug|x64.Build.0 = Debug|x64
16 | {8CEE3939-7E98-3B3E-9BA8-DB91B29818E3}.Release|x64.ActiveCfg = Release|x64
17 | {8CEE3939-7E98-3B3E-9BA8-DB91B29818E3}.Release|x64.Build.0 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {8F18B84B-CF2A-4C43-96ED-31098B1073B1}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/src/MaterialWater.cpp:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #include "MaterialWater.h"
6 |
7 | //////////////////////////////////////////////////////////////////////////////
8 | MaterialWater::MaterialWater()
9 | {
10 | _sName="Water";
11 | _sFormula="Constant";
12 | set_maker("internal");
13 | _iSolidColor=0xf0f0f0;
14 | }
15 | //////////////////////////////////////////////////////////////////////////////
16 | MaterialWater::MaterialWater(const MaterialWater& m): Glass(m)
17 | { }
18 | //////////////////////////////////////////////////////////////////////////////
19 | Glass* MaterialWater::clone() const
20 | {
21 | return new MaterialWater(*this);
22 | }
23 | //////////////////////////////////////////////////////////////////////////////
24 | double MaterialWater::calc_index(double dLambdaMicrons)
25 | {
26 | (void)dLambdaMicrons;
27 | return 1.333;
28 | }
29 | //////////////////////////////////////////////////////////////////////////////
30 |
--------------------------------------------------------------------------------
/src/MaterialVacuum.cpp:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #include "MaterialVacuum.h"
6 |
7 | //////////////////////////////////////////////////////////////////////////////
8 | MaterialVacuum::MaterialVacuum()
9 | {
10 | _sName="Vacuum";
11 | _sFormula="Constant";
12 | set_maker("internal");
13 | _iSolidColor=0xf0f0f0;
14 | }
15 | //////////////////////////////////////////////////////////////////////////////
16 | MaterialVacuum::MaterialVacuum(const MaterialVacuum& m): Glass(m)
17 | { }
18 | //////////////////////////////////////////////////////////////////////////////
19 | Glass* MaterialVacuum::clone() const
20 | {
21 | return new MaterialVacuum(*this);
22 | }
23 | //////////////////////////////////////////////////////////////////////////////
24 | double MaterialVacuum::calc_index(double dLambdaMicrons)
25 | {
26 | (void)dLambdaMicrons;
27 | return 1.;
28 | }
29 | //////////////////////////////////////////////////////////////////////////////
30 |
--------------------------------------------------------------------------------
/samples/refractors/Fraunhofer_155_F15.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=150
2 | 0.radius_curvature=1370
3 | 0.thick=14
4 | 0.type=BK7
5 | 1.diameter=150
6 | 1.radius_curvature=-800.6
7 | 1.thick=0.053
8 | 1.type=Air
9 | 2.diameter=150
10 | 2.radius_curvature=-810.6
11 | 2.thick=10.3
12 | 2.type=F2
13 | 3.diameter=150
14 | 3.radius_curvature=-3320
15 | 3.thick=2242.763281
16 | 3.type=Air
17 | 4.diameter=32.32265894
18 | 4.diameter.auto=1
19 | 4.radius_curvature=inf
20 | 4.thick=0
21 | 4.type=image
22 | 4.z.autofocus=1
23 | device.note=Fraunhofer refractor from:
24 | device.note=
25 | device.note=http://bobmay.astronomy.net/refractor/Refrdesign.htm
26 | device.note=
27 | device.note=Diameter is 150 mm, F-ratio is 15
28 | device.note=
29 | device.note=The website explain how to build it
30 | device.relative_convention=1
31 | image.autocurvature=0
32 | image.autofocus=1
33 | light.colors=Red.YellowBlack.Yellow.Green.Blue.
34 | light.half_field_of_view=0.41
35 | light.nbsteps=3
36 | note=Fraunhofer refractor from:
37 | note=
38 | note=http://bobmay.astronomy.net/refractor/Refrdesign.htm
39 | note=
40 | note=Diameter is 150 mm, F-ratio is 15
41 | note=
42 | note=The website explain how to build it
43 |
--------------------------------------------------------------------------------
/src/FrameSideView.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | FrameSideView
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 300
11 |
12 |
13 |
14 |
15 | 400
16 | 300
17 |
18 |
19 |
20 | Frame
21 |
22 |
23 | QFrame::StyledPanel
24 |
25 |
26 | QFrame::Raised
27 |
28 |
29 | -
30 |
31 |
32 |
33 |
34 |
35 |
36 | MyViewFrame
37 | QGraphicsView
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/DockScatterPlot.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef DOCKSCATTERPLOT_H
6 | #define DOCKSCATTERPLOT_H
7 |
8 | #include
9 |
10 | namespace Ui
11 | {
12 | class DockScatterPlot;
13 | }
14 |
15 | class OpticalDevice;
16 |
17 | class DockScatterPlot : public QDockWidget
18 | {
19 | Q_OBJECT
20 | Q_DISABLE_COPY(DockScatterPlot)
21 | public:
22 | explicit DockScatterPlot(QWidget *parent = 0);
23 | virtual ~DockScatterPlot();
24 |
25 | void device_changed(OpticalDevice *pDevice, int iReason);
26 |
27 | protected:
28 | virtual void changeEvent(QEvent *e);
29 |
30 | private slots:
31 | void on_pushButton_clicked();
32 |
33 | void on_pushButton_2_clicked();
34 |
35 | void on_pushButton_3_clicked();
36 |
37 | void on_hsImageFieldPos_valueChanged(int value);
38 |
39 | private:
40 | Ui::DockScatterPlot *m_ui;
41 | OpticalDevice* _pDevice;
42 | bool _bBlockSignals;
43 |
44 | static void enlarge(QRectF& r,double dRatio);
45 | };
46 |
47 | #endif // DOCKSCATTERPLOT_H
48 |
--------------------------------------------------------------------------------
/src/Glass.h:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #ifndef Glass_
6 | #define Glass_
7 |
8 | #include
9 | using namespace std;
10 |
11 | class Glass
12 | {
13 | public:
14 | Glass();
15 | Glass(const Glass& m);
16 |
17 | virtual Glass* clone() const =0;
18 | virtual ~Glass();
19 |
20 | double index(double dLambdaMicrons);
21 | int solid_color() const;
22 | void set_solid_color(int iSolidColor);
23 |
24 | string maker() const;
25 | void set_maker(string sMaker);
26 |
27 | string name() const;
28 | void set_name(string sName);
29 |
30 | string formula() const;
31 | void set_formula(string sFormula);
32 |
33 | void compute_NdVd(double &Nd,double& Vd);
34 | void compute_NeVe(double &Ne,double& Ve);
35 |
36 | protected:
37 | virtual double calc_index(double dLambdaMicrons)=0;
38 |
39 | string _sMaker;
40 | string _sName;
41 | string _sFormula;
42 | int _iSolidColor;
43 |
44 | private:
45 | double _dLastLambda;
46 | double _dLastIndex;
47 | };
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/samples/eyepieces/Monocentric.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=100
2 | 0.radius_curvature=1000
3 | 0.thick=500
4 | 0.type=perfect_lens
5 | 1.diameter=0
6 | 1.diameter.auto=1
7 | 1.radius_curvature=inf
8 | 1.thick=8.3
9 | 1.type=void
10 | 2.diameter=12
11 | 2.radius_curvature=11.6
12 | 2.thick=6.3
13 | 2.type=F2
14 | 3.diameter=9.5
15 | 3.radius_curvature=5.3
16 | 3.thick=10.6
17 | 3.type=BK7
18 | 4.diameter=9.5
19 | 4.radius_curvature=-5.3
20 | 4.radius_curvature.clone=3
21 | 4.radius_curvature.clone.gain=-1
22 | 4.thick=6.3
23 | 4.type=F2
24 | 5.diameter=9.5
25 | 5.radius_curvature=-11.6
26 | 5.radius_curvature.clone=2
27 | 5.radius_curvature.clone.gain=-1
28 | 5.thick=9
29 | 5.type=Air
30 | 6.diameter=4.61319115
31 | 6.diameter.auto=1
32 | 6.radius_curvature=inf
33 | 6.thick=0
34 | 6.type=image_infinite
35 | device.note=Huygens eyepiece
36 | device.note=
37 | device.note=frome the website:
38 | device.note=
39 | device.note=http://www.telescope-optics.net/appendix4.htm
40 | device.relative_convention=1
41 | image.autocurvature=0
42 | image.autofocus=0
43 | light.colors=Red.YellowBlack.Yellow.Green.Blue.
44 | light.half_field_of_view=0.5
45 | light.nbsteps=3
46 | note=Huygens eyepiece
47 | note=
48 | note=frome the website:
49 | note=
50 | note=http://www.telescope-optics.net/appendix4.htm
51 |
--------------------------------------------------------------------------------
/samples/eyepieces/Ramsden.astree:
--------------------------------------------------------------------------------
1 | 0.diameter=100
2 | 0.radius_curvature=1000
3 | 0.thick=500
4 | 0.type=perfect_lens
5 | 1.diameter=0
6 | 1.diameter.auto=1
7 | 1.radius_curvature=inf
8 | 1.thick=4
9 | 1.type=void
10 | 2.diameter=16
11 | 2.radius_curvature=inf
12 | 2.thick=4
13 | 2.type=BK7
14 | 3.diameter=16
15 | 3.radius_curvature=-14
16 | 3.thick=18
17 | 3.type=Air
18 | 4.diameter=10
19 | 4.radius_curvature=14
20 | 4.radius_curvature.clone=3
21 | 4.radius_curvature.clone.gain=-1
22 | 4.thick=2.5
23 | 4.type=BK7
24 | 5.diameter=10
25 | 5.radius_curvature=inf
26 | 5.thick=8
27 | 5.type=Air
28 | 6.diameter=10.60445316
29 | 6.diameter.auto=1
30 | 6.radius_curvature=inf
31 | 6.thick=0
32 | 6.type=image_infinite
33 | device.note=Ramsden eyepiece
34 | device.note=
35 | device.note=frome the website:
36 | device.note=
37 | device.note=http://www.telescope-optics.net/appendix4.htm
38 | device.note=
39 | device.note=unoptimized design
40 | device.relative_convention=1
41 | image.autocurvature=0
42 | image.autofocus=0
43 | light.colors=Red.YellowBlack.Yellow.Green.Blue.
44 | light.half_field_of_view=0.8
45 | light.nbsteps=3
46 | note=Ramsden eyepiece
47 | note=
48 | note=frome the website:
49 | note=
50 | note=http://www.telescope-optics.net/appendix4.htm
51 | note=
52 | note=unoptimized design
53 |
--------------------------------------------------------------------------------
/samples/telescopes/Gregory_400.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1
2 | 0.diameter=400
3 | 0.inner_diameter=100
4 | 0.radius_curvature=-2109.89011
5 | 0.type=reflect
6 | 0.z=-0
7 | 1.conic=-0.5136111111
8 | 1.diameter=106.7922197
9 | 1.diameter.auto=1
10 | 1.radius_curvature=452.7472527
11 | 1.type=reflect
12 | 1.z=-1318.681319
13 | 2.diameter=33.5103607
14 | 2.diameter.auto=1
15 | 2.radius_curvature=276.4944774
16 | 2.type=image
17 | 2.z=279.2501506
18 | 2.z.autofocus=1
19 | device.note=sample Gregory
20 | device.note=
21 | device.note=Primary is parabolical
22 | device.note=Image field is curved
23 | device.note=
24 | device.note=F# is big
25 | device.relative_convention=0
26 | image.autocurvature=1
27 | image.autofocus=1
28 | light.colors=YellowBlack.
29 | light.half_field_of_view=0.15
30 | light.nbsteps=3
31 | note=sample Gregory
32 | note=
33 | note=Primary is parabolical
34 | note=Image field is curved
35 | note=
36 | note=F# is big
37 | parameter.optimizer.0.checked=0
38 | parameter.optimizer.1.checked=0
39 | parameter.optimizer.2.checked=0
40 | parameter.optimizer.3.checked=0
41 | parameter.optimizer.4.checked=0
42 | parameter.optimizer.5.checked=0
43 | parameter.optimizer.6.checked=0
44 | parameter.optimizer.7.checked=0
45 | parameter.optimizer.8.checked=0
46 | parameter.optimizer.9.checked=0
47 | parameter.showLightOffAxis=100
48 |
--------------------------------------------------------------------------------
/samples/telescopes/TMT.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1.0009535
2 | 0.diameter=30000
3 | 0.radius_curvature=-60000
4 | 0.thick=-27093.75
5 | 0.type=reflect
6 | 1.conic=-1.31822813
7 | 1.diameter=3024.5
8 | 1.radius_curvature=-6227.6786
9 | 1.thick=43593.75483
10 | 1.type=reflect
11 | 2.diameter=2576.772891
12 | 2.diameter.auto=1
13 | 2.radius_curvature=-3009.2
14 | 2.thick=0
15 | 2.type=image
16 | 2.z.autofocus=1
17 | device.convention=relative
18 | device.note=TMT telescope:
19 | device.note=
20 | device.note=Diameter=30m
21 | device.note=Focal=450m
22 | device.note=
23 | device.note=from the document
24 | device.note=TMT-Construction-Proposal-Public.pdf
25 | device.note=(chapter 7.2)
26 | device.note=
27 | device.note=Ritchey-Chretien design
28 | device.note=
29 | device.note=Tertiary flat removed
30 | device.note=
31 | device.relative_convention=1
32 | half_field_of_view=0.165
33 | image.autocurvature=0
34 | image.autofocus=1
35 | light.colors=YellowBlack.
36 | light.half_field_of_view=0.165
37 | light.nbsteps=3
38 | note=TMT telescope:
39 | note=
40 | note=Diameter=30m
41 | note=Focal=450m
42 | note=
43 | note=from the document
44 | note=TMT-Construction-Proposal-Public.pdf
45 | note=(chapter 7.2)
46 | note=
47 | note=Ritchey-Chretien design
48 | note=
49 | note=Tertiary flat removed
50 | note=
51 | parameter.showLightOffAxis=0
52 |
--------------------------------------------------------------------------------
/samples/telescopes/Cassegrain__field_corrector.astree:
--------------------------------------------------------------------------------
1 | 0.conic=-1
2 | 0.diameter=200
3 | 0.radius_curvature=-942.21
4 | 0.type=reflect
5 | 0.z=0
6 | 1.diameter=90
7 | 1.radius_curvature=-942.9
8 | 1.type=reflect
9 | 1.z=-279.37
10 | 2.diameter=53
11 | 2.radius_curvature=175.9
12 | 2.type=Silica
13 | 2.z=-102.17
14 | 3.diameter=53
15 | 3.radius_curvature=87.6
16 | 3.type=Air
17 | 3.z=-98.67
18 | 4.diameter=53
19 | 4.radius_curvature=-641.5
20 | 4.type=Silica
21 | 4.z=-93.76
22 | 5.diameter=53
23 | 5.radius_curvature=-134.1
24 | 5.type=Air
25 | 5.z=-87.76
26 | 6.diameter=30
27 | 6.radius_curvature=inf
28 | 6.type=image
29 | 6.z=49.09390358
30 | 6.z.autofocus=1
31 | device.note=from the book:
32 | device.note=
33 | device.note=handbook of optics Volume 2
34 | device.note=
35 | device.note=Chapter18 : reflective and catadioptric objectives
36 | device.note=section 7
37 | device.note=
38 | device.note=All surfaces except primary are spherical
39 | device.relative_convention=0
40 | image.autocurvature=0
41 | image.autofocus=1
42 | light.colors=Red.Yellow.Green.Blue.
43 | light.half_field_of_view=1
44 | light.nbsteps=3
45 | note=from the book:
46 | note=
47 | note=handbook of optics Volume 2
48 | note=
49 | note=Chapter18 : reflective and catadioptric objectives
50 | note=section 7
51 | note=
52 | note=All surfaces except primary are spherical
53 | parameter.showLightOffAxis=100
54 |
--------------------------------------------------------------------------------
/src/MaterialAir.cpp:
--------------------------------------------------------------------------------
1 | // this file is covered by the General Public License version 2 or later
2 | // please see GPL.html for more details and licensing issues
3 | // copyright Etienne de Foras ( the author ) mailto: etienne.deforas@gmail.com
4 |
5 | #include "MaterialAir.h"
6 |
7 | //////////////////////////////////////////////////////////////////////////////
8 | MaterialAir::MaterialAir()
9 | {
10 | _sName="Air";
11 | _sFormula="Custom";
12 | set_maker("internal");
13 | _iSolidColor=0xffffff;
14 | }
15 | //////////////////////////////////////////////////////////////////////////////
16 | MaterialAir::MaterialAir(const MaterialAir& m): Glass(m)
17 | { }
18 | //////////////////////////////////////////////////////////////////////////////
19 | Glass* MaterialAir::clone() const
20 | {
21 | return new MaterialAir(*this);
22 | }
23 | //////////////////////////////////////////////////////////////////////////////
24 | double MaterialAir::calc_index(double dLambdaMicrons)
25 | {
26 | double sigma2=1./(dLambdaMicrons*dLambdaMicrons); //dLambda in microns
27 | return 1. + 6.4328e-5 + 2.94981e-2/(146.-sigma2) + 2.554e-4/(41.- sigma2);
28 |
29 | //source : http://olivier.fournet.free.fr/science_et_physique/refraction_air.htm
30 | // with 0.03% de CO2 , 101325 Pa , T= 288.15 K
31 | }
32 | //////////////////////////////////////////////////////////////////////////////
33 |
--------------------------------------------------------------------------------
/src/Util/Properties.h:
--------------------------------------------------------------------------------
1 | #ifndef _Properties_
2 | #define _Properties_
3 |
4 | #include