Customize your cookie preferences

We respect your right to privacy. You can choose not to allow some types of cookies. Your cookie preferences will apply across our website.

We use cookies on our site to enhance your user experience, provide personalized content, and analyze our traffic.

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

/agdg/ here. Basically im new to maths and am trying to figure out how to crop x


Thread replies: 14
Thread images: 3

File: thing.png (7KB, 383x382px) Image search: [Google] [Yandex] [Bing]
thing.png
7KB, 383x382px
/agdg/ here. Basically im new to maths and am trying to figure out how to crop x y coordinate input values inside a circle value. So basically what mathematical wizardry do I need to calculate the length of y and x?
>>
Trigonometry.
>>
>>7764473
this desu
>>
>>7764473

OK please can you answer the pic so I understand what to do? I've been stuck on this problem for a long time. I just want to crop controller xy inputs inside a circle.
>>
sin(30) = x/5
x = 5sin(30) = 5/2

(5/2)^2 + y^2 = 5^2
y = sqrt(25 - 25/4) = sqrt(75/4) = 5sqrt(3)/2
>>
Your drawing is incorrect. The angle must be 45° since the line goes to the corner of the square. Even if it doesn't go exactly to the corner, that's nowhere near 30°.
>>
>>7764483
1/?

A triangle and 3 angles (let's call them a, b and c)

The sum of all these angles is always 180 (degrees, but I can't find the circle thingy right now on my keyboard), so a+b+c=180

Given two angles a and b, you can always solve for the third by algebraic manipulations c= 180 - a - b. So given two angles, we can always uniqely determine the third.

A right triangle is a triangle where one angle is 90, so c=90. From the above it follows that we only need one more angle to uniqely determine the third one.

Triangles which have the same angles are called "same". These same triangles always look kinda the same (hence the name) only one is maybe sized up and one is sized down, i.e a smaller version of the original. However no matter what size same triangles have, the ratios of their sides (let's call the three sides x,y and z) are always the same. This is maybe not obvious intuitively, and I won't give a proof of it here, but maybe this explanation might help: Assume you have a triangle with angles a,b,c and sides x,y,z. Now you stretch one side (let's take x) by a factor of 5. We want the resulting triangle ot be same, i.e the angles shouldn't change, so we also have to stretch the sides y and z by the same factor. Now let's look at the ratios of the sides: Take for example the ratio x/z of the first triangle. After stretching the sides, the ratio turns into (5*x )/ (5*z), and from this fraction we can take out the 5's like this 5/5 * x/z = 1 * x/z = x/z. So we see that stretching does nothing to the ratios and we can conclude that

THE RATIOS OF THE SIDES IN A TRIANGLE ARE EQUAL FOR ALL SAME TRIANGLES.
>>
>>7764467
The hypothenuse of the triangle is the radius of the circle. Let that be [math] r [/math],

y is the adjacent line, relative to your angle [math] \Theta [/math]

By the trivial rules of trigonometry (SOHCAHTOA)
[math] y = \cos(\theta)r [/math]

and for x, which is the opposite line

[math] x =\sin(\theta)r [/math]

This is high school math man.
>>
File: sin.png (22KB, 1000x1551px) Image search: [Google] [Yandex] [Bing]
sin.png
22KB, 1000x1551px
>>7764534
2/?

Okay, now let's get back to right triangles. We already found out that the angles of a right triangle are uniqely defined by just giving a single angle. So for each angle we can define the ratios of the sides and those ratios will be equal for all same triangles (again, right triangles with the same angle a)

Now let's look at the picture:
We call the ratio of the side opposite to the angle a to the long side the sine of a : sin(a) = y/z
We call the ratio of the side adjacent to the angle a to the long side the cosine of a : cos(a) = x/z
We call the ratio of the opposite side to the angle to the adjacent angle the tangens of a: tan(a) = y/x

Okay, now we have done a lot of work to name a bunch of ratios, but what's the use of it.? Presume someone put in a lot of effort and calculated the numerical values of the sine and cosine and tanges for many different values of a (remember that we can do that since the ratios are the same for all same right triangles and the triangle is uniquely determine by a single angle). So we now for example sin(45) or cos(39) or even tan(188).

Also presume that the length of z is unknown to us and we want to find it. By the above equations we can do algebraic manipulation of the first one and find that z = y/(sin(a)). Or we could calculate z by the second equation and we'd find z = x/(cos(a)). So this is a very useful tool to calculate the lenghts of a right triangle if you just know the angle and one side. I'll leave it to you to find out how to calculate x and y if you know just the angle a and z (as in your problem).
>>
File: unit_circle.png (7KB, 335x296px) Image search: [Google] [Yandex] [Bing]
unit_circle.png
7KB, 335x296px
>>7764561
3/3

One last thing: A very useful guide to remember these trigonometric relations is the unit circle (see pic). Here a right triangle is inscribed in a circle of radius r=1. But because the long side z IS the radius of the circle, we know that z=1. But then the equations above reduce to

sin(a) = y
cos(a)=x
tan(a) = y/x

So the values of sine and cosine are just the lengths of the short sides.

This is very useful to think about these things and you should play around with it a bit to properly understand it.
>>
5
>>
>>7764467

r * cis(θ) = y + ix

solve from there
>>
>>7764467
>tfw this isn't bait
Thread replies: 14
Thread images: 3
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at imagescucc@gmail.com with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK