nowfound

AI · March 21, 2025

Torch Lens Maker – Differentiable Geometric Optics in PyTorch

Hello HN! For the past 6 months I've been working on an open source python library that implements differentiable geometric optics in PyTorch. It's very experimental still, but eventually the goal is to use it to design optical systems with a state of the art optimization framework and a beautiful code based API. Think OpenSCAD, but for optical systems. Not only is PyTorch's autograd an amazing general purpose optimizer, but torch.nn (the neural network building blocks) can be used pretty much out of the box to model an optical system. This is because there is a strong analogy to be made…

Torch Lens Maker – Differentiable Geometric Optics in PyTorch launched on March 21, 2025 with 179 votes, #222 of 7,215 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 1 year on.

In plain words

Torch Lens Maker is an open-source Python library for designing optical systems using differentiable geometric optics in PyTorch. It allows users to model and optimize lenses and optical elements using PyTorch's automatic differentiation and neural network building blocks. The library treats optical systems similarly to neural network architectures, enabling developers to stack optical components and leverage state-of-the-art optimization techniques. Currently experimental, it aims to provide an intuitive API for optical system design analogous to OpenSCAD but for optics.

written from the facts on this page · September 2026

From the sources

Differentiable geometric optics in PyTorch

Welcome to Torch Lens Maker , an open-source Python library for differentiable geometric optics based on PyTorch . Currently a very experimental project, the goal is to be able to design complex real-world optical systems (lenses, mirrors, etc.) using modern computer code and state-of-the art numerical optimization. import torchlensmaker as tlm optics = tlm.Sequential( tlm.ObjectAtInfinity( beam_diameter = 10 , angular_size = 20 ), tlm.Gap( 15 ), tlm.RefractiveSurface( tlm.SphereByCurvature( diameter = 25 , C = 1 / - 45.0 ), materials = ( "air" , "BK7" ) ), tlm.Gap( 3 ), tlm.RefractiveSurface( tlm.SphereByCurvature( diameter = 25 , C = tlm.parameter( 1 / - 20 )), materials = ( "BK7" , "air"…from victorpoughon.github.io

In the maker’s words, at launch

Hello HN! For the past 6 months I've been working on an open source python library that implements differentiable geometric optics in PyTorch. It's very experimental still, but eventually the goal is to use it to design optical systems with a state of the art optimization framework and a beautiful code based API.…

Does a similar job

all alternatives →
  • TorchGAN – Research Framework for Modelling GANs Based on Pytorch2018 · github.com · ▲56

    Research Framework for easy and efficient training of GANs based on Pytorch - torchgan/torchgan

  • I stripped DALL·E Mini to its bare essentials and converted it to Torch2022 · github.com · ▲663

    min(DALL·E) is a fast, minimal port of DALL·E Mini to PyTorch - kuprel/min-dalle

  • PyTorch Lightning2020 · pytorchlightning.ai · ▲79

    The light PyTorch wrapper for high-performance AI research

  • Forge AgentJan 2026 · rightnowai.co · ▲113

    Swarm Agents That Turn Slow PyTorch Into Fast GPU Kernels

  • TorchTPUApr 2026 · cloud.google.com · ▲106

    Running PyTorch Natively on TPUs at Google Scale

  • Run TRELLIS.2 Image-to-3D generation natively on Apple SiliconApr 2026 · github.com · ▲202

    I ported Microsoft's TRELLIS.2 (4B parameter image-to-3D model) to run on Apple Silicon via PyTorch MPS. The original requires CUDA with flash_attn, nvdiffrast, and custom sparse convolution kernels: none of which work on Mac. I replaced the CUDA-specific ops with pure-PyTorch alternatives: a gather-scatter sparse 3D convolution, SDPA attention for sparse transformers, and a Python-based mesh extraction replacing CUDA hashmap operations. Total changes are a few hundred lines across 9 files. Generates ~400K vertex meshes from single photos in about 3.5 minutes on M4 Pro (24GB). Not as fast as…

Questions this answers

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 17d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 16d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 18d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 20d ago · stillwet.art

  • Onepin▲384

    AI voiceover with every name, price and date said right

    AI · 30d ago · onepin.ai

  • A real-time world model you can explore and change

    AI · 28d ago · world.pixverse.video

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, March 2025

the whole month →
  • Mimic Human Research & Save Findings in AI Knowledge Base

    AI · 2025 · sider.ai

  • Turn your ideas into products that sell

    AI · 2025 · atoms.dev

  • Aha▲1,152

    The world's first AI influencer marketing team

    AI · 2025 · ahacreator.com

  • Fluently▲976

    Start speaking English as well as your native language

    AI · 2025 · getfluently.app

  • Conversational AI surveys, interviews, user tests, polls

    AI · 2025 · theysaid.io

  • Record your screen, share instantly, look like a PRO

    Growth · 2025 · supercut.ai