Scale position points in a circle.Look like normal scaling

702 Views Asked by At

I have an Art degree, no math involved, so sometimes when doing 3D graphics and envisioning problems, it's hard to search for solutions over the internet since I don't have good pointers for search terms. I'm sure this is a trivial problem with a proper name/solution. Basically I just want to grab P and scale its position vector so it matches P', a position on a version scaled by 0.5 on the y axis.

schematic

My idea is to apply the same rationale to all three axis, even though I only need to do it on 2, right now.

Thanks in advance.

NOTE: I'm a visual person, if you're going into explanations more than just sharing links, please don't bomb me with long or cryptic functions :D Thanks

1

There are 1 best solutions below

1
On BEST ANSWER

Your circle is described by the equation

$$x^2+y^2=1$$

and your ellipse accordingly by

$$x^2 + (2y)^2=1$$

so you want to take your point $P=(P_x,P_y)$ and scale it in such a way that it satisfies the latter equation:

$$1 = (\lambda P_x)^2 + (2\lambda P_y)^2= \lambda^2(P_x^2+4P_y^2)$$

You want the positive solution, since otherwise you end up on the wrong side of the ellipse. So choose

$$\lambda=\sqrt{1/(P_x^2+4P_y^2)}$$

and you get $P'_x=\lambda P_x$ and $P'_y=\lambda P_y$.