Cameras and Lenses (2020)

(ciechanow.ski)

394 points | by sebg 14 hours ago ago

48 comments

  • nntwozz 11 hours ago

    Bartosz Ciechanowski's blog brings back the joy of surfing the web during the heyday of Adobe Flash (minus the 100% CPU).

    It's so much fun manipulating things, exploring and getting surprising feedback.

    I know it's not really fair to compare this highly scientific masterpiece to the artistic flash websites of the past, but for me at least it immediately evokes the same feelings.

    • zbendefy 10 hours ago

      Tangential, but Flash had a nice side effect that the "app" could be exported in a self contained way via SWF.

      Exporting this site for example in a future proof way is not that obvious. (Exporting as pdf wont work with the webgl applets, exporting the html page might work but is error prone depending in the website structure)

      50 years from now, flash emulators will still work on swf files, but these sites might be lost. Or is there a way to archive sites like this?

      • KPGv2 6 hours ago

        > 50 years from now, flash emulators will still work on swf files

        I'm not sure 50 years from now there will be flash emulators. Who is going to write on for the XP3.12345235 Fruity Ununpentium Silicon x256^2 neuralink devices.

        Didn't Flash die because iPhones weren't going to support it? So one of the major OSes people spend most of their lives on can't even run SFW files. Can Android? I've honestly never tried.

        But web standards persist.

        • roywiggins 21 minutes ago

          Ruffle, the Flash runtime emulator, does run in the browser.

        • sneak 3 hours ago

          50 years from now there will be emulators that can run the OSes of today that can run flash emulators.

      • KPGv2 7 hours ago

        > Or is there a way to archive sites like this?

        A couple days ago, someone published their archive of HN that works in any browser.

        Archiving sites is easy anyway. I wrote a Scrapy app that archives everything within the a specific fandom on Ao3. TH hardest part is remembering how beautiful soup queries work.

        • roywiggins 7 hours ago

          Static sites are straightforward, yeah. Highly dynamic websites like this one commonly explode when you archive them naively.

          • mrkstu 7 hours ago

            Server side rendered sites that are dynamic in nature- you'll only get a literal snapshot of state you happen to be in...

            • roywiggins 6 hours ago

              I mean highly dynamic, entirely frontend sites like these are hard to archive, since you have to really preserve every bit of JavaScript dependency, including any dynamically loaded dependencies, and rewire everything to work again.

              And then hope that whatever browser features you rely on aren't removed in 20 years. Flash applets from 20 years ago are usually more self-contained and Just Work if you have a functioning runtime (either the official one or Ruffle)

          • sneak 3 hours ago

            There is nothing dynamic about this site in the sense of “static site”. This may well be a static site.

            • roywiggins 27 minutes ago

              Wikipedia, at least, uses the same terminology as me:

              https://en.wikipedia.org/wiki/Dynamic_web_page?wprov=sfla1

              > A client-side dynamic web page processes the web page using JavaScript running in the browser as it loads.

              The linked page is one of those. They're often harder to scrape than server-side rendered webforums and the like.

  • scosman 11 hours ago

    If anyone hasn't already seen Bartosz's mechanical watch animations, they are also amazing: https://ciechanow.ski/mechanical-watch/

  • dang 13 hours ago

    One past thread (only?) - others?

    Cameras and Lenses - https://news.ycombinator.com/item?id=25357315 - Dec 2020 (213 comments)

  • plasticeagle 7 hours ago

    Incredible. Not a whiff of AI (I mean, obviously I see now because it's from 2020). Just fantastic to see clear and elegant writing again.

    • o10449366 6 hours ago

      Comments on AI, on an article which has nothing to do with it, are just as uninspired as AI writing.

  • Y_Y 13 hours ago

    Amazing as usual.

    I am always on the lookout for the classic sin of making it look like electromagnetic waves wiggle in space like a snake. I know it's convenient to glue the tangent space to the underlying physical space, but I think it confuses students.

    To be clear: the amplitude of the electric and magnetic fields (and hence their components in each direction) oscillate in space/time. Any particular wave though should travel in a straight line (usual caveats apply). Of course you may incidentally also get e.g. sinusoidal variations in intesity perpendicular to the wavevector, but that will be because of the overall beam characteristics.

    I don't mean to say I know a better way to show this, and I am aware of many complicating factors. I just think lots of people (my former students and self included) can come away with a wrong idea about how these waves work.

    • mal10c 8 hours ago

      I agree with your thought process. Factoring in antenna type and reflections also causes difficulties when explaining concepts like super position. The sinusoid is a good illustration of what a given receiver might detect at some location (X,Y,Z). A more accurate way to show that may be a light source fading on and off to match some frequency (below THz). Then factoring in the speed of light, at time zero, the light will be off, at some arbitrary time 1, the light will be illuminated at 0.25 (scale goes up to 1 here). The light energy peak at time 1 is at the light. Then at time 2, the light goes up to 0.5. That means that the 0.25 light is now 1 unit away from the light while the 0.5 is at the light. Step to time 3 and the light goes up to 0.75, meaning 1 unit from the light, the light is at 0.5 and 2 units from the light, the light is dimmer at 0.25. This repeats with the light hitting 1.0 then falling back to 0.75, then 0.5, etc. The movement of light is key and I think that's what is often either misunderstood or just not considered enough.

  • stared 11 hours ago

    I am amazed by people like Bartosz Ciechanowski and Andrey Karpathy. What would be a lifetime side project for other smart and curious people, they seem to release every quarter. How do they do it?

    Most people who are smart and creative are nowhere near as productive. And most people who are extremely productive don't get sidetracked by side projects.

  • Fiveplus 13 hours ago

    Every time I come across one of Bartosz posts, I drop everything to read it. And I learn so much.

    The way he builds up the mental model from a simple photon bucket to a pinhole and finally to a lens system is just incredible. I particularly loved the section on the circle of confusion. I've read dozens of explanations on depth of field, but being able to interactively drag the aperture slider and see exactly how the cone of light narrows and the blur reduces makes it click in a way that static text never could. This really should be the standard for digital textbooks.

  • fsckboy 11 hours ago

    Cameras and Lenses and photography has been such a fascinating and open and do-it-yourself tinkering medium for well over a century: when are we going to get to be able to play around with what's inside iPhone, Samsung, and Pixel cameras?

    (maybe we already can, I'm simply asking)

  • ChrisMarshallNY 7 hours ago

    This guy's stuff is always so awesome.

    Thanks for sharing it!

  • plagiarist 10 hours ago

    What a fantastic article!

    Makes me wish for a similar resource that would teach 3+ element optics, moving elements, and sortof get closer to modern lens design.

  • behnamoh 13 hours ago

    Can we donate to creative individuals like the OP so they keep making amazing stuff? This is the kind of output LLMs will not be able to produce any time soon.

    • sho_hn 11 hours ago

      "Make a Bartosz-style website about $topic" seems like a fun benchmark idea. Maybe more so than pelicans on bicycles.

      To be honest, though, this seems like ideal content for an LLM to produce. It's basically fact regurgitation.

      • dpark 8 hours ago

        > It's basically fact regurgitation.

        This page wasn’t a regurgitation of facts. It was filled with custom interactive applets that let you explore the effects of physical changes. The core value proposition here is not the facts but the ability to explore and intuit the physics.

        • sho_hn 7 hours ago

          I do understand the contention is that an LLM would be less thoughtful in editorializing which bits to make interactive, reasoning about the progression in understanding and delight by the user.

          I'm not so sure it's that far out of reach, though. From what I've seen the reasoning models do, they're not too far away from being able to run a strategy of figuring out interesting increments of a problem, parameterizing them, making an interactive scene for those parameters, ... it feels within reach.

          • dpark 3 hours ago

            I said nothing about LLMs. I said this page was not simply regurgitation of facts.

            I personally doubt LLMs are close to producing anything like this, but that wasn’t the point. You indicated that this should be easy for an LLM because it’s just a fact dump. Regardless of whether some future LLM can generate something like this, it’s much more complicated and interesting than a simple fact dump.

    • macintux 13 hours ago
  • _jayhack_ 11 hours ago

    Great article. For another fantastic explainer on optics, see 3Blue1Brown's video on refraction: https://www.youtube.com/watch?v=KTzGBJPuJwM

  • pontussw 9 hours ago

    This is so incredibly well done

  • brcmthrowaway 10 hours ago

    Does anyone know of a lens that can make a laser look like a spotlight?

  • andyfilms1 13 hours ago

    Doesn't seem to work in Firefox. :(

    • uhoh-itsmaciek 13 hours ago

      FF on Android seems to work fine here. What problem are you seeing?

    • mcdonje 12 hours ago

      Works fine for me with Firefox on Debian. Are you sure you don't have an extension breaking it?

    • fsckboy 11 hours ago

      I use firefox with javascript mostly off (UMatrix) but when I turned it on for fonts.googleapis.com the site and sliders all seem to worke. then I turned it on for gstatic.com fonts.gstatic.com , and not sure if that changed anything else. I'm on linux desktop

    • cfraenkel 12 hours ago

      Also works in Firefox (144.0.2) / MacOS (10.15)

    • compiler-guy 12 hours ago

      Working fine on Firefox for IOS.

  • ChrisArchitect 12 hours ago
  • fsckboy 11 hours ago

    > ̶P̶i̶c̶t̶u̶r̶e̶s̶ ̶h̶a̶v̶e̶ Art has always been a meaningful part of the human experience. From the first cave drawings, to sketches and paintings, to modern photography, we’ve mastered the art of recording what we ̶s̶e̶e̶ think and feel.

    • Sharlin 10 hours ago

      Your "correction" does not make sense. "Pictures" and "art" are overlapping categories but neither is a subset of the other. Pictures in and of themselves are plenty fascinating to humans, without bringing art into the equation.

      • fsckboy 8 hours ago

        it is your critique that does not make sense. I was not applying any hierarchy or subsetting whatsoever. Inseparable unity would be closer to the point.

        I was making the point that the cave painters believed everything including rocks and trees were deeply invested with spiritual power, and they didn't draw a cave painting without investing it with spiritual ideas. Even if one of their goals was to capture an accurate image of some animals, and indicate when in the lunar or solar cycle they were expected to calve, when they went hunting for one a part of the goal would be cut out its heart and eat it raw because of the power contained within, and give thanks to the great mother. Inseparable.

        even though I am not spiritual at all, I find your worldview too barren to explain human endeavor.

        • Sharlin 7 hours ago

          I still don't know what your comment has to do with the article at hand. If you want to branch the conversation to animism and spirituality, I guess that's fine (although rather far-fetched and arguably off-topic) but you should probably do it in a way that actually offers some insight.

          • fsckboy 7 hours ago

            i was replying to someone else's comment, their comment was to the article. I was not replying to the article.

        • dpark 8 hours ago

          > I was making the point that the cave painters believed everything including rocks and trees were deeply invested with spiritual power, and they didn't draw a cave painting without investing it with spiritual ideas.

          Nonsense. We don’t know what prehistoric cave painters believed.

          > when they went hunting for one a part of the goal would be cut out its heart and eat it raw because of the power contained within

          Do you have a pointer to the cave paintings that show hunting animals at certain times in the lunar cycles and eating their hearts raw to harvest this power? Because this sounds made up.

          Also this says nothing about art.

          • fsckboy 7 hours ago

            >Nonsense. We don’t know what prehistoric cave painters believed.

            you need to study a bit more history, psychology, anthropology, etc., you have absolutely no reason to believe they thought anything different than we do today and what today's hunter gatherers believe. the evidence is on my side. If you have counter evidence, offer it.

            >Also this says nothing about art.

            I said something about art, whereas till I said it, art was void in the conversation which I think is a glaring mistake which is why I said it. If you have something to say about art, say it, otherwise you don't have a dog in this fight.

            • dpark 5 hours ago

              > you have absolutely no reason to believe they thought anything different than we do today

              People don’t believe this today. What are you talking about? Do you think most people today are hunting animals to eat their raw hearts to gain their power at certain times of the month?

              > If you have counter evidence, offer it.

              I’m not the one claiming deep insight into the beliefs of prehistoric peoples. Burden of proof is on you.

              > I said something about art

              You really didn’t. You said nothing meaningful about art except to substitute it for the word picture. And then the rest of your replies have also had nothing to do with art.