Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Xiaomi MiMo v2.6(xiaomi.com)
    206comments
  2. Data Protection Commission fines Google €403M over processing of location data(dataprotection.ie)
    5comments
  3. Suspension of the de minimis administrative exemption for imports $800 or less(personalimportation.org)
    57comments
  4. NASA’s Mars Sample Return mission is dead(science.org)
    194comments
  5. Transformers Explained Visually(poloclub.github.io)
    24comments
  6. What Sun got wrong(dtrace.org)
    263comments
  7. Attention is all you have(alicegg.tech)
    153comments
  8. I don't want to read what you didn't write(colinbreck.com)
    30comments
  9. AI coding has made CI a bottleneck, so we reworked ours to keep up(linear.app)
    94comments
  10. The Advisory Group on Mathematics and Artificial Intelligence(terrytao.wordpress.com)
    35comments
  11. Divide by depth for instant 3D(gabrieloc.com)
    5comments
  12. Spymarks, Not Watermarks(brand.io)
    5comments
  13. Why does mathmain need an encrypted loader?(safedep.io)
    26comments
  14. Apple Copland D11E4 Booting in the Browser(pagetable.com)
    23comments
  15. Frontier AI on Your Own Hardware(timdettmers.com)
    42comments
  16. Grok 4.7(x.ai)
    382comments
  17. Roboharm: Do frontier robot policies refuse unsafe instructions?(robocurve.org)
    13comments
  18. First Shader from Zero in Godot 4(gdquest.com)
    discuss
  19. US halts flights at busy East Coast airports, says fiber line cut(reuters.com)
    102comments
  20. Python Workers are now generally available(cloudflare.com)
    28comments
  21. Kev: Tiny Jev-like family of decision models built on top of Qwen3.5(github.com/jaredpalmer)
    174comments
  22. In Search of a Compositional Theory of Self-Stabilization(muratbuffalo.blogspot.com)
    3comments
  23. The Journey of a Migratory Shorebird(newyorker.com)
    discuss
  24. HERMES radio enables voice and data communication over vast distances(ieee.org)
    36comments
  25. Turn off and restrict access to Apple Intelligence features on Mac(support.apple.com)
    147comments
  26. TXR: An Original, New Programming Language for Convenient Data Munging(nongnu.org)
    discuss
  27. How do Traffic Signals Work (2019)(practical.engineering)
    36comments
  28. Do not fear AI. Fear AI companies(cloudfront.net)
    1comments
  29. Show HN: Foremerge – Catch intent conflicts between parallel coding agents(github.com/naw103)
    discuss
  30. Avoiding the babbling-idiot failure in a time-triggered communication system(ieee.org)
    6comments

Divide by depth for instant 3D

61 pointsby 2d agogabrieloc.com
5 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!

2h 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.

2h 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.

1h 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.

1h agoHN ↗

The sliders are great UX on mobile, love the detail to attention.