---
title: "Scaling Points In a Specific Direction"
url: https://daily.dev/posts/scaling-points-in-a-specific-direction-b2laxahuh
source_url: https://blog.demofox.org/2024/10/15/scaling-points-in-a-specific-direction/
type: article
source: "Bottom of the sea"
published: 2024-10-16T04:38:16.495Z
updated: 2026-03-15T03:59:03.270Z
tags: ["algorithms", "c++", "game-development", "graphics-programming", "math"]
reading_time: 8
upvotes: 7
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaling Points In a Specific Direction

**[Bottom of the sea](https://daily.dev/sources/demofox)** · 8 min read · 7 upvotes · 0 comments

## Summary

The post discusses two methods to scale points along a specific direction in game development: using matrices and vector projections. It provides a detailed explanation of both methods with examples, including the necessary mathematical steps and considerations for each approach. The C++ code implementation and practical applications, like a Petzval lens effect in bokeh depth of field rendering, are also highlighted.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.demofox.org/2024/10/15/scaling-points-in-a-specific-direction/>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#algorithms](https://daily.dev/tags/algorithms), [#c++](https://daily.dev/tags/c++), [#game-development](https://daily.dev/tags/game-development), [#graphics-programming](https://daily.dev/tags/graphics-programming), [#math](https://daily.dev/tags/math)

[View this post on daily.dev](https://daily.dev/posts/scaling-points-in-a-specific-direction-b2laxahuh)
