# Thread:

1. ## Similar Triangles question

Hello! I am writing a program that requires some geometry and nothing I have found online gives me a clear answer...

I have a point lets say at (3,2) I am animating moving that point to the origin at (0,0), and then back to (3,2). I understand that the side lengths will remain proportional to each other, but I can't figure out how I might be able create a sort of rate function I guess? To be able able to calculate the X and Y coordinates all along the path. I need to be able to manipulate each one of the somehow... the animation is continuously updating so I need to be able to decrement and increment the X and Y accordingly...

any ideas?

Thanks guys!

2. ## Re: Similar Triangles question

The distance from the origin to a point at (x,y) is $r= \sqrt {x^2 + y^2}$. Given that the point (3,2) is on the line that connects (3,2) to the origin, the equation of that line is y = (2/3)x. So the distance from the origin to any point on the line is $r = \sqrt{x^2 + \frac 4 9 x^2} = \sqrt{\frac {13} 9} x =\frac { \sqrt{13} x} 3$. The rate at which 'r' changes is therefore equal to $\frac {\sqrt {13}} 3$ times the rate at which x changes. Is that what you're looking for?
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 3, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9439066052436829, "perplexity_flag": "head"}