Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
Package Renaming (#5)
Browse files Browse the repository at this point in the history
* rm docs/.gitignore (redundant)

* Optics -> Opticks

* deploydocs repo link typo

* Opticks -> OpticSim

* src/Opticks.jl -> src/OpticSim.jl

* add src/OpticSim.jl
  • Loading branch information
alfredclwong authored Mar 16, 2021
1 parent 9100e1e commit 8c75d85
Show file tree
Hide file tree
Showing 43 changed files with 476 additions and 478 deletions.
2 changes: 1 addition & 1 deletion Precompile.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Optics
using OpticSim
@info "Running representative workload"
# add stuff here #
Examples.autodrawrays()
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Optics"
name = "OpticSim"
uuid = "24114763-4efb-45e7-af0e-cde916beb153"
authors = ["Brian Guenter", "Charlie Hewitt", "Ran Gal", "Alfred Wong"]
repository = "https://github.com/microsoft/OpticsSimulation"
repository = "https://github.com/microsoft/OpticSim.jl"
version = "0.2.8"

[deps]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Opticks.jl
# OpticSim.jl

[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://vigilant-giggle-6a673aa5.pages.github.io/dev/)

OpticsSimulation.jl is a [Julia](https://julialang.org/) package for simulation and optimization of complex optical systems developed by the Microsoft Research Interactive Media Group and the Microsoft HART group.
OpticSim.jl is a [Julia](https://julialang.org/) package for simulation and optimization of complex optical systems developed by the Microsoft Research Interactive Media Group and the Microsoft HART group.

It is designed to allow optical engineers to create optical systems procedurally and then to simulate and optimize them. Unlike Zemax, Code V, or other interactive optical design systems Optics.jl has limited support for interactivity, primarily in the tools for visualizing optical systems.
It is designed to allow optical engineers to create optical systems procedurally and then to simulate and optimize them. Unlike Zemax, Code V, or other interactive optical design systems OpticSim.jl has limited support for interactivity, primarily in the tools for visualizing optical systems.

A large variety of surface types are supported, and these can be composed into complex 3D objects through the use of constructive solid geometry (CSG). A substantial catalog of optical materials is provided through the GlassCat submodule.

Expand Down
2 changes: 1 addition & 1 deletion deps/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function downloadcatalogs(glassdirectory::String)
end
end

#write the glass files with standard names so the examples in Optics.jl will work
#write the glass files with standard names so the examples in OpticSim.jl will work
writeglassfile(catalogs[1],"NIKON.agf")
writeglassfile(catalogs[2],"OHARA.agf")
writeglassfile(catalogs[3],"HOYA.agf")
Expand Down
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
Optics = "24114763-4efb-45e7-af0e-cde916beb153"
OpticSim = "24114763-4efb-45e7-af0e-cde916beb153"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
16 changes: 8 additions & 8 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Documenter
using Optics
using OpticSim

makedocs(
sitename = "Optics.jl",
sitename = "OpticSim.jl",
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
assets = [asset("assets/logo.svg", class = :ico, islocal = true)],
),
modules = [Optics],
modules = [OpticSim],
pages = [
"Home" => "index.md",
"Glass Functions" => "glasscat.md",
Expand All @@ -31,7 +31,7 @@ makedocs(
expandfirst = ["systems.md", "vis.md"])

deploydocs(
repo = "github.com/microsoft/OpticsSimulation.git",
repo = "github.com/microsoft/OpticSim.jl.git",
devbranch = "main",
)

Expand All @@ -43,7 +43,7 @@ deploydocs(
# try
# x = Core.eval(m, n)
# if x isa Module
# if(x != Optics.GlassCat)
# if(x != OpticSim.GlassCat)
# println("x $x")
# push!(ms, x)
# end
Expand All @@ -58,7 +58,7 @@ deploydocs(

# # write a code file for the catalog with docstrings
# io = open(joinpath(@__DIR__, "../src/AGFGlassCatDocs.jl"), "w")
# catalogs = children(Optics.GlassCat)
# catalogs = children(OpticSim.GlassCat)
# cat_pages = []
# for catname in catalogs
# println(catalogs)
Expand All @@ -82,7 +82,7 @@ deploydocs(
# println("type of glass $temp")

# let io = IOBuffer()
# Optics.GlassCat.docstring(io, glass)
# OpticSim.GlassCat.docstring(io, glass)
# infostr = String(take!(io))
# push!(eval_string, "\"\"\"\n$infostr\n\"\"\"")
# end
Expand All @@ -99,7 +99,7 @@ deploydocs(
# close(io)

# # include source with docstrings
# Optics.GlassCat.include(joinpath(@__DIR__, "../src/AGFGlassCatDocs.jl"))
# OpticSim.GlassCat.include(joinpath(@__DIR__, "../src/AGFGlassCatDocs.jl"))

# clean up
# rm(joinpath(@__DIR__, "../src/AGFGlassCatDocs.jl"))
Expand Down
44 changes: 22 additions & 22 deletions docs/src/csg.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This diagram shows the basic idea:
The code for this in our system would look this this:

```@example
using Optics # hide
using OpticSim # hide
cyl = Cylinder(0.7)
cyl_cross = csgunion(csgunion(leaf(cyl), leaf(cyl, rotationd(90, 0, 0))), leaf(cyl, rotationd(0, 90, 0)))
Expand Down Expand Up @@ -52,25 +52,25 @@ Transforms are used to position does within the CSG tree.

```@docs
RigidBodyTransform
Optics.rotation
Optics.rotationd
Optics.translation
Optics.rotmat
Optics.rotmatd
Optics.rotmatbetween
OpticSim.rotation
OpticSim.rotationd
OpticSim.translation
OpticSim.rotmat
OpticSim.rotmatd
OpticSim.rotmatbetween
```

## CSG Types

These are the types of the primary CSG elements, i.e. the nodes in the CSG tree.

```@docs
Optics.CSGTree
Optics.CSGGenerator
Optics.ComplementNode
Optics.UnionNode
Optics.IntersectionNode
Optics.LeafNode
OpticSim.CSGTree
OpticSim.CSGGenerator
OpticSim.ComplementNode
OpticSim.UnionNode
OpticSim.IntersectionNode
OpticSim.LeafNode
```

## Additional Functions and Types
Expand All @@ -91,21 +91,21 @@ onsurface(a::CSGTree{T}, x::T, y::T, z::T) where {T<:Real}
Interval
EmptyInterval
DisjointUnion
Optics.isemptyinterval
Optics.ispositivehalfspace
Optics.israyorigininterval
Optics.halfspaceintersection
Optics.closestintersection
Optics.IntervalPool
OpticSim.isemptyinterval
OpticSim.ispositivehalfspace
OpticSim.israyorigininterval
OpticSim.halfspaceintersection
OpticSim.closestintersection
OpticSim.IntervalPool
```

### Intersections

```@docs
Optics.IntervalPoint
OpticSim.IntervalPoint
RayOrigin
Infinity
Intersection
Optics.isinfinity
Optics.israyorigin
OpticSim.isinfinity
OpticSim.israyorigin
```
14 changes: 7 additions & 7 deletions docs/src/emitters.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Emitters create rays in a certain pattern, usually controlled by some parameters
The are constructed in a modular way, e.g.

```@example
using Optics, StaticArrays # hide
using OpticSim, StaticArrays # hide
Vis.draw(UniformOpticalSource(CollimatedSource(HexapolarOriginPoints(4, 1.0, 1.0, position = SVector(0.0, 0.0, 10.0), direction = SVector(0.0, sind(30), -cosd(30)))), 0.55))
Vis.save("assets/source1.png") # hide
nothing #hide
Expand All @@ -13,7 +13,7 @@ nothing #hide
![Emitter example 1 image](assets/source1.png)

```@example
using Optics, StaticArrays # hide
using OpticSim, StaticArrays # hide
Vis.draw(UniformOpticalSource(GridSource(OriginPoint{Float64}(1, position = SVector(0.0, 0.0, 10.0), direction = SVector(0.0, 0.0, -1.0)), 5, 5, π / 4, π / 4), 0.65))
Vis.save("assets/source2.png") # hide
nothing #hide
Expand All @@ -22,7 +22,7 @@ nothing #hide
![Emitter example 2 image](assets/source2.png)

```@example
using Optics, StaticArrays # hide
using OpticSim, StaticArrays # hide
Vis.draw(CosineOpticalSource(RandomSource(OriginPoint{Float64}(200, direction = SVector(0.0, 0.0, 1.0))), 1.0, 0.45))
Vis.save("assets/source3.png") # hide
nothing #hide
Expand All @@ -35,19 +35,19 @@ nothing #hide
```@docs
Ray
OpticalRay
Optics.generateray
OpticSim.generateray
```

## Origin Points

```@docs
Optics.RayOriginGenerator
OpticSim.RayOriginGenerator
RandomRectOriginPoints
GridRectOriginPoints
RandomEllipseOriginPoints
HexapolarOriginPoints
OriginPoint
Optics.genorigin
OpticSim.genorigin
```

## Directions
Expand All @@ -57,7 +57,7 @@ GeometricRayGenerator
CollimatedSource
GridSource
RandomSource
Optics.gendirection
OpticSim.gendirection
```

## Power
Expand Down
42 changes: 21 additions & 21 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## Cooke Triplet

```@example
using Optics
using OpticSim
using DataFrames
sys = AxisymmetricOpticalSystem(
DataFrame(Surface = [:Object, 1, 2, 3, :Stop, 5, 6, :Image],
Radius = [Inf, 26.777, 66.604, -35.571, 35.571, 35.571, -26.777, Inf],
Thickness = [Inf, 4.0, 2.0, 4.0, 2.0, 4.0, 44.748, missing],
Material = [Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_SK16, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_SF2, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_SK16, Optics.GlassCat.Air, missing],
Material = [OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_SK16, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_SF2, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_SK16, OpticSim.GlassCat.Air, missing],
SemiDiameter = [Inf, 8.580, 7.513, 7.054, 6.033, 7.003, 7.506, 15.0]))
@show sys
f1 = HexapolarField(sys, collimated = true, samples = 4, sourcenum = 1)
Expand All @@ -27,7 +27,7 @@ nothing # hide
## Zoom Lens

```@example
using Optics
using OpticSim
using DataFrames
function zoom_lens(pos = 1)
Expand All @@ -49,7 +49,7 @@ function zoom_lens(pos = 1)
Radius = [Inf64, Inf64, -1.6202203499676E+01, -4.8875855327468E+01, 1.5666614444619E+01, -4.2955326460481E+01, 1.0869565217391E+02, 2.3623907394283E+01, -1.6059097478722E+01, -4.2553191489362E+02, -3.5435861091425E+01, -1.4146272457208E+01, -2.5125628140704E+02, -2.2502250225023E+01, -1.0583130489999E+01, -4.4444444444444E+01, Inf64],
Aspherics = [missing, missing, missing, missing, missing, [(4, 1.03860000000E-04), (6, 1.42090000000E-07), (8, -8.84950000000E-09), (10, 1.24770000000E-10), (12, -1.03670000000E-12), (14, 3.65560000000E-15)], missing, missing, [(4, 4.27210000000E-05), (6, 1.24840000000E-07), (8, 9.70790000000E-09), (10, -1.84440000000E-10), (12, 1.86440000000E-12), (14, -7.79750000000E-15)], [(4, 1.13390000000E-04), (6, 4.81650000000E-07), (8, 1.87780000000E-08), (10, -5.75710000000E-10), (12, 8.99940000000E-12), (14, -4.67680000000E-14)], missing, missing, missing, missing, missing, missing, missing],
Thickness = [Inf64, 0.0, 5.18, 0.10, 4.40, 0.16, 1.0, 4.96, zoom, 4.04, 1.35, 1.0, 2.80, 3.0, 1.22, dist, missing],
Material = [Optics.GlassCat.Air, Optics.GlassCat.Air, Optics.GlassCat.OHARA.S_LAH66, Optics.GlassCat.Air, Optics.GlassCat.NIKON.LLF6, Optics.GlassCat.Air, Optics.GlassCat.OHARA.S_TIH6, Optics.GlassCat.OHARA.S_FSL5, Optics.GlassCat.Air, Optics.GlassCat.OHARA.S_FSL5, Optics.GlassCat.Air, Optics.GlassCat.OHARA.S_LAL8, Optics.GlassCat.OHARA.S_FSL5, Optics.GlassCat.Air, Optics.GlassCat.OHARA.S_LAH66, Optics.GlassCat.Air, missing],
Material = [OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, OpticSim.GlassCat.OHARA.S_LAH66, OpticSim.GlassCat.Air, OpticSim.GlassCat.NIKON.LLF6, OpticSim.GlassCat.Air, OpticSim.GlassCat.OHARA.S_TIH6, OpticSim.GlassCat.OHARA.S_FSL5, OpticSim.GlassCat.Air, OpticSim.GlassCat.OHARA.S_FSL5, OpticSim.GlassCat.Air, OpticSim.GlassCat.OHARA.S_LAL8, OpticSim.GlassCat.OHARA.S_FSL5, OpticSim.GlassCat.Air, OpticSim.GlassCat.OHARA.S_LAH66, OpticSim.GlassCat.Air, missing],
SemiDiameter = [Inf64, stop, 3.85433218451, 3.85433218451, 4.36304692871, 4.36304692871, 4.72505505439, 4.72505505439, 4.72505505439, 4.45240784026, 4.45240784026, 4.50974054117, 4.50974054117, 4.50974054117, 4.76271114409, 4.76271114409, 15.0]))
end
@show zoom_lens(0)
Expand All @@ -72,19 +72,19 @@ nothing # hide
## Schmidt Cassegrain Telescope

```@example
using Optics
using OpticSim
using StaticArrays
# glass entrance lens on telescope
topsurf = Plane(SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, 0.0), interface = FresnelInterface{Float64}(Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air), vishalfsizeu = 12.00075, vishalfsizev = 12.00075)
botsurf = AcceleratedParametricSurface(ZernikeSurface(12.00075, radius = -1.14659768e+4, aspherics = [(4, 3.68090959e-7), (6, 2.73643352e-11), (8, 3.20036892e-14)]), 17, interface = FresnelInterface{Float64}(Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air))
coverlens = csgintersection(leaf(Cylinder(12.00075, 1.4)), csgintersection(leaf(topsurf), leaf(botsurf, RigidBodyTransform(Optics.rotmatd(0, 180, 0), SVector(0.0, 0.0, -0.65)))))
topsurf = Plane(SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, 0.0), interface = FresnelInterface{Float64}(OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air), vishalfsizeu = 12.00075, vishalfsizev = 12.00075)
botsurf = AcceleratedParametricSurface(ZernikeSurface(12.00075, radius = -1.14659768e+4, aspherics = [(4, 3.68090959e-7), (6, 2.73643352e-11), (8, 3.20036892e-14)]), 17, interface = FresnelInterface{Float64}(OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air))
coverlens = csgintersection(leaf(Cylinder(12.00075, 1.4)), csgintersection(leaf(topsurf), leaf(botsurf, RigidBodyTransform(OpticSim.rotmatd(0, 180, 0), SVector(0.0, 0.0, -0.65)))))
# big mirror with a hole in it
bigmirror = ConicLens(Optics.GlassCat.SCHOTT.N_BK7, -72.65, -95.2773500000134, 0.077235, Inf, 0.0, 0.2, 12.18263, frontsurfacereflectance = 1.0)
bigmirror = ConicLens(OpticSim.GlassCat.SCHOTT.N_BK7, -72.65, -95.2773500000134, 0.077235, Inf, 0.0, 0.2, 12.18263, frontsurfacereflectance = 1.0)
bigmirror = csgdifference(bigmirror, leaf(Cylinder(4.0, 0.3, interface = opaqueinterface()), translation(0.0, 0.0, -72.75)))
# small mirror supported on a spider
smallmirror = SphericalLens(Optics.GlassCat.SCHOTT.N_BK7, -40.65, Inf, -49.6845, 1.13365, 4.3223859, backsurfacereflectance = 1.0)
smallmirror = SphericalLens(OpticSim.GlassCat.SCHOTT.N_BK7, -40.65, Inf, -49.6845, 1.13365, 4.3223859, backsurfacereflectance = 1.0)
obscuration1 = Circle(4.5, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, -40.649), interface = opaqueinterface())
obscurations2 = Spider(3, 0.5, 12.0, SVector(0.0, 0.0, -40.65))
# put it together with the detector
Expand All @@ -102,12 +102,12 @@ nothing # hide
## Lens Construction

```@example
using Optics
using OpticSim
using StaticArrays
topsurface = leaf(AcceleratedParametricSurface(QTypeSurface(9.0, radius = -25.0, conic = 0.3, αcoeffs = [(1, 0, 0.3), (1, 1, 1.0)], βcoeffs = [(1, 0, -0.1), (2, 0, 0.4), (3, 0, -0.6)], normradius = 9.5), interface = FresnelInterface{Float64}(Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air)), translation(0.0, 0.0, 5.0))
botsurface = leaf(Plane(0.0, 0.0, -1.0, 0.0, 0.0, -5.0, vishalfsizeu = 9.5, vishalfsizev = 9.5, interface = FresnelInterface{Float64}(Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air)))
barrel = leaf(Cylinder(9.0, 20.0, interface = FresnelInterface{Float64}(Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air, reflectance = zero(Float64), transmission = zero(Float64))))
topsurface = leaf(AcceleratedParametricSurface(QTypeSurface(9.0, radius = -25.0, conic = 0.3, αcoeffs = [(1, 0, 0.3), (1, 1, 1.0)], βcoeffs = [(1, 0, -0.1), (2, 0, 0.4), (3, 0, -0.6)], normradius = 9.5), interface = FresnelInterface{Float64}(OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air)), translation(0.0, 0.0, 5.0))
botsurface = leaf(Plane(0.0, 0.0, -1.0, 0.0, 0.0, -5.0, vishalfsizeu = 9.5, vishalfsizev = 9.5, interface = FresnelInterface{Float64}(OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air)))
barrel = leaf(Cylinder(9.0, 20.0, interface = FresnelInterface{Float64}(OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air, reflectance = zero(Float64), transmission = zero(Float64))))
lens = csgintersection(barrel, csgintersection(topsurface, botsurface))(RigidBodyTransform{Float64}(0.0, Float64(π), 0.0, 0.0, 0.0, -5.0))
sys = CSGOpticalSystem(LensAssembly(lens), Rectangle(15.0, 15.0, [0.0, 0.0, 1.0], [0.0, 0.0, -67.8], interface = opaqueinterface()))
Vis.drawtracerays(sys, test = true, trackallrays = true)
Expand All @@ -122,11 +122,11 @@ nothing # hide
### Focusing

```@example
using Optics
using OpticSim
using StaticArrays
rect = Rectangle(5.0, 5.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, 0.0))
int = HologramInterface(SVector(0.0, -3.0, -20.0), ConvergingBeam, SVector(0.0, 0.0, -1.0), CollimatedBeam, 0.55, 9.0, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air, Optics.GlassCat.Air, Optics.GlassCat.Air, 0.05, false)
int = HologramInterface(SVector(0.0, -3.0, -20.0), ConvergingBeam, SVector(0.0, 0.0, -1.0), CollimatedBeam, 0.55, 9.0, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, 0.05, false)
obj = HologramSurface(rect, int)
sys = CSGOpticalSystem(LensAssembly(obj), Rectangle(10.0, 10.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, -25.0), interface = opaqueinterface()))
Vis.drawtracerays(sys; raygenerator = UniformOpticalSource(CollimatedSource(GridRectOriginPoints(5, 5, 3.0, 3.0, position = SVector(0.0, 0.0, 10.0), direction = SVector(0.0, 0.0, -1.0))), 0.55), trackallrays = true, rayfilter = nothing, test = true)
Expand All @@ -139,11 +139,11 @@ nothing # hide
### Collimating

```@example
using Optics
using OpticSim
using StaticArrays
rect = Rectangle(5.0, 5.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, 0.0))
int = HologramInterface(SVector(0.1, -0.05, -1.0), CollimatedBeam, SVector(0.0, 0.0, 10), DivergingBeam, 0.55, 9.0, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air, Optics.GlassCat.Air, Optics.GlassCat.Air, 0.05, false)
int = HologramInterface(SVector(0.1, -0.05, -1.0), CollimatedBeam, SVector(0.0, 0.0, 10), DivergingBeam, 0.55, 9.0, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, 0.05, false)
obj = HologramSurface(rect, int)
sys = CSGOpticalSystem(LensAssembly(obj), Rectangle(10.0, 10.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, -25.0), interface = opaqueinterface()))
Vis.drawtracerays(sys; raygenerator = UniformOpticalSource(GridSource(OriginPoint{Float64}(1, position = SVector(0.0, 0.0, 10.0), direction = SVector(0.0, 0.0, -1.0)), 5, 5, π / 4, π / 4), 0.55), trackallrays = true, rayfilter = nothing, test = true)
Expand All @@ -156,12 +156,12 @@ nothing # hide
### Multi

```@example
using Optics
using OpticSim
using StaticArrays
rect = Rectangle(5.0, 5.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, 0.0))
int1 = HologramInterface(SVector(-5.0, 0.0, -20.0), ConvergingBeam, SVector(0.0, -1.0, -1.0), CollimatedBeam, 0.55, 100.0, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air, Optics.GlassCat.Air, Optics.GlassCat.Air, 0.05, false)
int2 = HologramInterface(SVector(5.0, 0.0, -20.0), ConvergingBeam, SVector(0.0, 1.0, -1.0), CollimatedBeam, 0.55, 100.0, Optics.GlassCat.Air, Optics.GlassCat.SCHOTT.N_BK7, Optics.GlassCat.Air, Optics.GlassCat.Air, Optics.GlassCat.Air, 0.05, false)
int1 = HologramInterface(SVector(-5.0, 0.0, -20.0), ConvergingBeam, SVector(0.0, -1.0, -1.0), CollimatedBeam, 0.55, 100.0, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, 0.05, false)
int2 = HologramInterface(SVector(5.0, 0.0, -20.0), ConvergingBeam, SVector(0.0, 1.0, -1.0), CollimatedBeam, 0.55, 100.0, OpticSim.GlassCat.Air, OpticSim.GlassCat.SCHOTT.N_BK7, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, OpticSim.GlassCat.Air, 0.05, false)
mint = MultiHologramInterface(int1, int2)
obj = MultiHologramSurface(rect, mint)
sys = CSGOpticalSystem(LensAssembly(obj), Rectangle(10.0, 10.0, SVector(0.0, 0.0, 1.0), SVector(0.0, 0.0, -20.0), interface = opaqueinterface()))
Expand Down
Loading

0 comments on commit 8c75d85

Please sign in to comment.