Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Xiaomi MiMo v2.6(xiaomi.com)
    113comments
  2. The NASA/ESA Mars Sample Return mission has been canceled(science.org)
    141comments
  3. Transformers Explained Visually(poloclub.github.io)
    12comments
  4. What Sun got wrong(dtrace.org)
    243comments
  5. CBP suspends all personal prescription importation Oct 22(personalimportation.org)
    4comments
  6. Attention is all you have(alicegg.tech)
    145comments
  7. Why does mathmain need an encrypted loader?(safedep.io)
    23comments
  8. Divide by Depth for Instant 3D(gabrieloc.com)
    4comments
  9. The Advisory Group on Mathematics and Artificial Intelligence(terrytao.wordpress.com)
    24comments
  10. Apple Copland D11E4 Booting in the Browser(pagetable.com)
    13comments
  11. In Search of a Compositional Theory of Self-Stabilization(muratbuffalo.blogspot.com)
    3comments
  12. Grok 4.7(x.ai)
    354comments
  13. Frontier AI on Your Own Hardware(timdettmers.com)
    19comments
  14. Roboharm: Do frontier robot policies refuse unsafe instructions?(robocurve.org)
    7comments
  15. Turn off and restrict access to Apple Intelligence features on Mac(support.apple.com)
    123comments
  16. US halts flights at busy East Coast airports, says fiber line cut(reuters.com)
    92comments
  17. AI coding has made CI a bottleneck, so we reworked ours to keep up(linear.app)
    61comments
  18. Kev: Tiny Jev-like family of decision models built on top of Qwen3.5(github.com/jaredpalmer)
    165comments
  19. Python Workers are now generally available(cloudflare.com)
    25comments
  20. TXR: An Original, New Programming Language for Convenient Data Munging(nongnu.org)
    discuss
  21. This Digital Radio Gets Messages to the World’s Remotest Locations(ieee.org)
    33comments
  22. Avoiding the babbling-idiot failure in a time-triggered communication system(ieee.org)
    6comments
  23. Show HN: Foremerge – Catch intent conflicts between parallel coding agents(github.com/naw103)
    discuss
  24. Fable 5 – Median thinking declined in August(twitter.com/lon)
    202comments
  25. How do Traffic Signals Work (2019)(practical.engineering)
    32comments
  26. Noodle Gallery- Open-source, self-hosted alternative to Google Photos and Immich(digitalescapetools.com)
    34comments
  27. A restored PDP-11/83 serving this page on 211BSD Unix(pdp1173.com)
    30comments
  28. M5 Ultra Mac Studio Review(macstories.net)
    205comments
  29. Show HN: A website that tracks US food prices every day(kadoa.com)
    6comments
  30. Heretic removes restrictions from language models(heretic-project.org)
    91comments

Divide by Depth for Instant 3D

35 pointsby 2d agogabrieloc.com
4 comments
2d agoHN ↗

Hi! I wrote a few notes on how 3D cameras work with interactive examples to hopefully demystify a pretty complex topic that I once struggled with. Maybe this is useful for someone here, and if not, there are fun sliders to play with!

1h agoHN ↗

The visuals and sliders are great!

Maybe consider clipping the ball properly on the edges of the sides of the view frustum ?

Similarly the near and far could also be clipped; i know this is not true of the math necessarily but is the expected result in 3d graphics applications.

1h agoHN ↗

FWIW, if you start with "The view frustum is a 90 degree pyramid with the tip cut off at z = 1 and the 'end' at infinity", you can then work out how to map that to a NDC using a matrix and perspective divide.

I've used that when teaching short "Graphics 101" (not in the first session though) and the math comes out more intuitive than the usual "here's how to calculate a perspective matrix, don't ask where these numbers come from" version.

10m agoHN ↗

For me learning on my own, it was even illustrative to not use a near plane and see how things behind the camera would still appear in front of it.

A lot of 3D graphics can be derived pretty easily just from knowing a few basics like divide by depth. I think knowing how to construct a transformation matrix from a coordinate system basis is another one -- that would remove the need to look up how to construct a perspective matrix, for example.

A few things like that will get you pretty far and you can kind of take the same journey of discovery as early 3D pioneers. That's one of the best ways to learn because you're much more likely to remember something you figured out compared to something you just read about.

It gets tricky with perspective-correct textures, but running into issues like that on your own (even if not solved on your own) is part of the fun of learning, I think.