[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hey /sci/ I'm a programmer who sucks at math. In order to

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 13
Thread images: 2

File: halp.png (31KB, 1536x864px) Image search: [Google]
halp.png
31KB, 1536x864px
Hey /sci/ I'm a programmer who sucks at math. In order to solve this, do I have enough information or am I missing something fundamental? And what kind of math should I be using, I'm think it has something to do with linear algebra but not sure.

Thanks in advance, any help would be much appreciated.
>>
Oh yeah, I remember derivating every space-euclidean formula back then, I literally started researching integrals as a kid, and ended up solving them almost immediately 4 years ago. You fucking brainlets didn't notice my acompplishments and now I'm rotting in this hole of lazyness and self-destruction.

Fucking teachers.
>>
>>8480482

I was homeschooled so I was fucked from the start senpai
>>
File: maxresdefault[1].jpg (103KB, 1920x1080px) Image search: [Google]
maxresdefault[1].jpg
103KB, 1920x1080px
>>8480471
This is how you do it.

https://www.youtube.com/watch?v=xATZ9pOGKAE

Once you find the yellow line set it equal to the red line and solve

this will give you the x,y where they cross
>>
u must be kidding, right?

Unless you are still in elementary you should notice that the shortest path between green point and the red line must be perpendicular to that line. Consider it in trig functions for example.

Here's solution:
we have linear function RED:y=ax*b
1. find the coefficient of YELLOW linear function:
a1=-1/a,
2. now that you have YELLOW:y = -1/a * x + b1 solve it for GREEN point to get b1,
3. BLUE point is the crossing point of RED and YELLOW functions,

You should be able to solve that. I wouldn't like my apps to be written by such a mathlet like you. Do something with that.
>>
>>8480471
>you have the equation for the red line
so you have the slope m of the red line so you know the slope of the orange line is -1/m so you know the equation of the orange line by knowing the green point so you have a system of linear equations who's solution is the blue point so ... i got nothing. This will require some sort of advanced 8th grade algebra tomfoolery to solve.
>>
Is the red line always linear?
>>
Thanks guys, I'm going to be working with shapes in the future, so I wasn't sure if the perpindicular line would hold every time, but it makes sense now. Sorry for sounding dumb as fuck.

>>8480512

I understand, luckily for you this isn't my day job. I went to school for it and just didn't pay attention in actual mat h classes, just memorized enough to make Bs. I'm good at discrete math tho.
>>
>>8480517
I thought this was kind of interesting so I worked on it for arbitrary lines and this is what I came up with. Feel free to correct me if I'm wrong since I'm only in Calc II.

So basically I figured it could be solved like an optimization problem from Calc I with just minimizing the distance function of a point and a function.

[math]
D(x_1, y_1, x_2, y_2) = \sqrt{(x_2 - x_1)^{2} + (y_2 - y_1)^{2}}
[/math]

Minimizing this function for a point [math](P_x, P_y)[/math] and a function [math]F(x) = x[/math]

[math]
D(P_x, P_y, x, F(x)) = \sqrt{(x - P_x)^{2} + (F(x) - P_y)^{2}}
\\
\frac{\mathrm{d}}{\mathrm{d}x}D(P_x, P_y, x, F(x)) = \frac{x - P_x + F'(x)(F(x) - P_y)}{\sqrt{(x - P_x)^{2} + (F(x) - P_y)^{2}}}
\\
0 = \frac{\mathrm{d}}{\mathrm{d}x}D(P_x, P_y, x, F(x)) = \frac{x - P_x + F'(x)(F(x) - P_y)}{\sqrt{(x - P_x)^{2} + (F(x) - P_y)^{2}}}
\\
0 = x - P_x + F'(x)(F(x) - P_y)
[/math]

Then solve for [math]x[/math] and you then have the point [math](x, F(x))[/math] and [math](P_x, P_y)[/math]
Finding the shortest line connecting them is trivial.
>>
if the red function always goes through the origin, just find the vector projection

vector pointing to blue dot = [g1 g2]*[fx fy]/norm[fx fy]

where g1,g2 are the x y coordinates of the green dot, and fx,fy are the coordinates of any point on the red line


https://en.wikipedia.org/wiki/Vector_projection
>>
>>8480611

This was the kind of answer I was looking for, cheers mate!
>>
>>8480611

can (fx, fy) be (0, 0)?
>>
>>8480512

This is the retarded way to do it. Just project the point onto the line. Fucking brainlets, when will they learn
Thread posts: 13
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.