TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Real-time nonlinear optics simulation (JS/GLSL)

46 点作者 westoncb4 个月前

6 条评论

haxiomic4 个月前
This is extremely cool! Curious on the story behind this &#x2F;u&#x2F;westoncb!<p>It reminds me of Huygens Optics&#x27; recent videos about modelling particles as confined light using a particular non-linear medium [0], is it possible to create similar &#x27;light&#x27; particles with tweaks to your setup?<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=tMP5Pbx8I4s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=tMP5Pbx8I4s</a>
评论 #42744201 未加载
westoncb4 个月前
Author here. This is a bit of an unusual project, but I can break down the gist of it in two main pieces.<p>The first is a new web-based, real-time nonlinear optics simulator for the situation of light propagating within a reflective cavity with an adaptive lens structure at the center. My understanding of the landscape of NLO simulators is there&#x27;s not much real-time or for the web, so extracting that bit of code (within simulation.js) may be a decent starting point for other projects. That said, depending on what your goals for simulation the level of accuracy provided by a real-time simulation may not be sufficient. My understanding is that if you are doing detailed simulation to refine e.g. lens structures intended for production in the real world you likely need more detailed modeling than the slow varying envelope approximation (SVEA) that I use here.<p>The other aspect of the project is a little difficult to describe but I was basically trying to create a minimal idealized model of a setup with nonlinear dynamics controlled by an optimization process as a kind of &quot;pendulum&quot; setup for whatever&#x27;s the minimal essential magic behind the efficacy of e.g. transformer models. The exploration is not complete, but the idea was basically like: is there some switch where an alteration in technique in the optimization structure ends up being a step-function more effective in controlling the light fields than without. That&#x27;s the general idea. More specifically what started the project though was being curious whether you could in some way use waves reflected from a boundary as an error signal for a backpropagation-like process. I found out in the course of my work here that this has been done in practice using phase-conjugate waves to encode the corrections. In order to create these phase-conjugate waves you&#x27;d need a &quot;four-wave mixing&quot; setup, which the simulation in its present state does not support but could be extended to.<p>A note on process: this project was basically kicked off because I tried one-shotting a basic version of it with openai&#x27;s o1 model and it worked a lot better than I was expecting, so much of the motivation here was also to see how much I could use sota LLMs to assist on a project like this.
评论 #42744801 未加载
swayvil4 个月前
LIVE DEMO <a href="https:&#x2F;&#x2F;westoncb.github.io&#x2F;nonlinear-optics-sandbox&#x2F;" rel="nofollow">https:&#x2F;&#x2F;westoncb.github.io&#x2F;nonlinear-optics-sandbox&#x2F;</a>
dvh4 个月前
Does nonlinear optics also create harmonics as with nonlinear electronics?
评论 #42740935 未加载
qoez4 个月前
No idea in what field&#x2F;application this is useful but it&#x27;s really cool and impressive nonetheless
ivanjermakov4 个月前
Anyone knowledgeable in this field who could share how this can be applied?
评论 #42744887 未加载