Undergrad Math for Blending Numbers: Find "X

  • Thread starter Thread starter fifthFunction
  • Start date Start date
  • Tags Tags
    Numbers
Click For Summary
To blend two numbers in a non-linear way, such as using an inverse square function, it's essential to understand that simply knowing two endpoints can lead to multiple valid equations. For example, both f(x)=(2x+1)^2 and g(x)=(x+3.5)^2-11.25 satisfy the conditions for specific values, illustrating the ambiguity with only two points. When modeling phenomena like light intensity, the emission characteristics and angles must also be considered, as they affect the results. A suggested method involves transforming the numbers using square roots before applying a linear blend, which can yield satisfactory results. Ultimately, the best approach depends on the specific context and requirements of the blending task.
fifthFunction
Messages
3
Reaction score
0
TL;DR
blend 2 numbers by inverse square
i have not clue if this is the right place to ask
if i had 2 numbers and i wanted to blend between them but instead of a linear way it was in an inverse square way.. how would that math go?
so if i had A=1 and B=9 and wanted the number at 0.5 it would be 4.. or if i wanted the number at 0.85 it would be "X"
 
Physics news on Phys.org
It depends on what exactly you need. For a parabola you need three points (or some other additional information), with just two points it is ambiguous.

As an example, f(x)=(2x+1)2 satisfies f(0)=1 and f(1)=9 and it matches f(0.5)=4, but g(x)=(x+3.5)2-11.25 fits your two borders as well, it would give g(0.5)=4.75.

Anyway: If you want a parabola, find the equation for the parabola you want, then plug in different numbers.
 
i think the most simple way to explain what i am trying to do is to map a section of a gradient of the falloff of light?
so say you have a strip of paper with a light at one end and you measure how bright one side is and how bright the other side is.. you input that into the function and it would tell you how bright the middle of the paper is
 
That depends on where your light source is and how its emission looks like. For a uniform emission you get an inverse square law for the intensity, modified with the incidence angle if not orthogonal. Just knowing the intensity at both sides is not sufficient.
 
ok so it seems if i do something like A=sqrt(1),B=sqrt(9),P=0.5 then just feed that into a linear blend pow(mix(A,B,P),2) it works.. don't know if its the best way tho
 
I am studying the mathematical formalism behind non-commutative geometry approach to quantum gravity. I was reading about Hopf algebras and their Drinfeld twist with a specific example of the Moyal-Weyl twist defined as F=exp(-iλ/2θ^(μν)∂_μ⊗∂_ν) where λ is a constant parametar and θ antisymmetric constant tensor. {∂_μ} is the basis of the tangent vector space over the underlying spacetime Now, from my understanding the enveloping algebra which appears in the definition of the Hopf algebra...

Similar threads

  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
789
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 26 ·
Replies
26
Views
862
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K