Torch Lens Maker
Languages and libraries
optics simulation library
SHOW HN2025
How HN took it
3 positive, 15 neutral or asking, 0 mixed, 1 critical, out of 19 comments about the project. Thread score +0.12.
Idea: 3 for, 0 againstExecution: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Innovative use of PyTorch autodiff for optics
From 2 comments
It's really awesome that you've taken a widely available tool like PyTorch and used it out of domain to provide a library like this, especially one focused on exact solutions and…
mhalle on HNVery innovative application of NN architecture in a different (physics/optics) domain ! > The key idea is that there is a strong analogy to be made between layers of a neural…
mentalgear on HN
Exact derivatives rather than approximations
From 1 comment
It's really awesome that you've taken a widely available tool like PyTorch and used it out of domain to provide a library like this, especially one focused on exact solutions and…
mhalle on HN
Objections
Paraxial approximations are limited for lens designers
From 1 comment
Great work! Here's some prior art in the (torch) space: https://github.com/vccimaging/DiffOptics A few notes, though paraxial approximations are "dumb", they are very useful…
etik on HN
Stair-step 3D printed lenses would hurt optical quality
From 1 comment
Unless you can get your layer height height down to small fractions of a wavelength of light (so like 50nm or less), I suspect the stairstep shape of your 3d prints will throw…
meatmanek on HN
Requests
Diffractive optics support
From 3 comments
It's really awesome that you've taken a widely available tool like PyTorch and used it out of domain to provide a library like this, especially one focused on exact solutions and…
mhalle on HNVery cool. Do you thinking supporting diffractive optics is possible, or too much of a deviation?
Evidlo on HNWill there be some diffraction optic in the future, can we just add some phase somewhere or will it need a complete rewrite ? I'd like to experiment with photon sieves and…
GistNoesis on HN
Stock lens catalogue matching
From 1 comment
This looks really great. Do you have any plans to add stock lens catalogue matching? To make it easier for hobbyists to manufacture lens assemblies.
RobotToaster on HN
Interactive focus and zoom simulation
From 1 comment
Is there any way to simulate (maybe even interactively) things like focus and zoom? It would be cool to have some way to shift lenses (or lens groups) along the optical axis and…
isgb on HN
Questions
How far from replacing Zemax
From 1 comment
How far are we from completely replacing Zemax?
gtsnexp on HN
Main technical challenges
From 1 comment
Looks very interesting. What would you say are the main technical challenges in the way of your development? By the way, the roadmap link on the Github repo page is broken…
MITSardine on HN
Alternatives named
DiffOptics
From 1 comment
Great work! Here's some prior art in the (torch) space: https://github.com/vccimaging/DiffOptics A few notes, though paraxial approximations are "dumb", they are very useful…
etik on HN
Mitsuba renderer
From 2 comments
Surprised no one has mentioned Mitsuba renderer, in particular the caustic design demo: https://www.youtube.com/watch?v=eTHL3W2NUn0&list=PLI9y-85z_Po6da-pyTNGTns2n4fhpbLe5&index=4
pixelpoet on HNPotential similarities with Mitsuba's inverse rendering functionality?https://mitsuba.readthedocs.io/en/stable/src/inverse_rendering/caustics_optimization.html
num3ric on HN
Zemax
From 1 comment
How far are we from completely replacing Zemax?
gtsnexp on HN
rayopt
From 1 comment
The best option I'm aware of is used by a similar (but less advanced) python library called rayopt, it imports from the free version of zemax. https://github.com/quartiq/rayopt
RobotToaster on HN