proomt

Search

Search posts, papers, and topics

All posts

Hacker News front page5 min readintermediate

Divide by depth for instant 3D

Summary

A concise walkthrough of the depth‑division trick for 3D projection, how it maps to the full perspective projection matrix, and GLSL snippets showing both the minimal trick and a proper matrix‑based camera.

  • Dividing x and y by z (the “depth division” trick) is just a special case of a perspective projection matrix with focal length = 1 and aspect = 1.
  • A full perspective matrix adds focal scale (derived from vertical FOV) and aspect ratio, plus depth mapping using near/far planes.
  • World → view → clip → NDC → screen is the standard pipeline; the matrix handles the world‑to‑view transform and the perspective divide.
  • GLSL code shows how to build the matrix manually and how to apply it, useful when you need a custom or lightweight camera implementation.

Most game and graphics frameworks hide the math behind a Camera object. Knowing the underlying matrix lets you implement lightweight shaders, debug projection issues, or build non‑standard view setups without pulling in a full engine.

6/10

Related reading

  1. Article: Architecting Secure and Scalable Facial Verification Systems

    A real‑world post‑mortem of a high‑volume face verification service that moved from a naïve synchronous API to an async, layered pipeline (edge validation, preprocessing, decoupled detection/verification, decision engine) to achieve 8.5k rpm, p99 < 1.8 s, 30 % cost savings, and strict privacy controls.

    InfoQinfoq.com15 min
  2. SNAP3D: Physically Grounded 3D Parts for Assembly from a Single Image

    The paper presents SNAP3D, a physics‑guided pipeline that converts a single image into a set of 3D parts that can be assembled without interpenetration. By using simulation‑driven connector placement and a new physics‑based evaluation, the method yields assemblies that are both geometrically accurate and stable enough for 3D printing.

    Hugging Face Daily Papersarxiv.org1 minpaper
  3. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min