#geometry-and-trigonometry
1 messages · Page 178 of 1
It wouldn't be too hard to coordinate bash this. You can call the bottom corner of the triangle (0,0). Probably not the most effective way but it's simple to do mechanically
yes thats what i did
ie - (2 0) references how the centerpoint of the blue circle is halfway of the bottom side
so I just constructed those equations that restrict the 3 points to those circles
and the 4th equation is supposed to say they all have the same distance from an unknown centerpoint M
which is also the triangle centerpoint (5th equation)
but uh actually trying to solve them didnt work for me
maybe there's something missing or wrong
The big circle is tangent to each circle once each
@upper karma perhaps making a big triangle from the points where the colored circles are tangent to the black circle could be helpful?
if you can work out all three points of tangency with the big circle then the (extended) sine rule will give you the radius
Is the left function continuous and the right not?
@sweet heart on their domains of definition, both are continuous
Ah okay thanks, I get my mistake I think
A = {(x,y)| y = 0, 0 < x < 1} , is A open or closed?
I say its not open because there doesnt exist a inner point where B(x,r) is a subset of A, because y = 0, and u draw a circle any point in 0 < x < 1, u cant find r > 0 in y-direction
is this correct?
@tropic stirrup
ty 🤗 t!rep girl
🆙 | Poppa has given @tropic stirrup a reputation point!

entrance?
What kind of geometry do you want to study?
I need a good intro to topology text for undergrads
Munkres is supposed to be good, but kinda long-winded
Check these out too: http://pi.math.cornell.edu/~hatcher/Top/TopNotes.pdf
@wind warren

@forest dove thank
@wind warren age?
I was thinking about this proof of the uniqueness of limits: http://web.mat.bham.ac.uk/R.W.Kaye/seqser/uniqueness.html
The most important theorem on convergence, that every convergent sequence has a unique limit, is given.
it relies on the triangle inequality, when is it possible to prove this without the triangle inequality?
Okay so correct me if I'm wrong
But doesn't the lone definition of limits guarantee uniqueness?
(yes I just forgot the definition)
You can prove that limits are unique in any metric space, using the triangle inequality, which is an axiom of a metric space. That's probably why it's used
I doubt you need it in R
right, so specifically I should say I posted it here in topology channel because I am interested in cases where I don't have a metric
You can do it in other sets I just forgot the exact definition
since then I know I am not ensured the triangle inequality anymore
Okay I won't comment here and then it turns out I said something horribly wrong, I don't know
If you don't have a metric, how do you define a limit?
you need a metric space to have limits?
I don't think that's true
I'm not actually sure, lol. Let me read and find out
The horror on my face when i realise that my professor taught that to me a week ago and I f*cking forgot
With a topological space, you can define limits.
Yeah, I can imagine a topological space without a metric and having sets and imagining some kind of limit there
Oh DUH that's a cluster point
To define a cluster point you need a metric
(if I remember correctly)
To define limits you need the term of neighborhood
if you can't measure the distance from x_0, then you can't define a neighborhood
I can imagine having a kind of limit, although maybe it's a looser notion of limit in terms of nested subsets or something I'm not sure though
so you can't have a limit
A is a limit point of a set S, if every open set that contains A contains a seperate point of S
cluster point?
Any set may have more than one limit point, of course
That's not really a "limit" in the same sense you were talking about on metric space
I'm wanting to know the minimum topological structure needed to ensure that limit points are unique I guess
I'll ask my topology professor lol
since I want to throw out the triangle inequality necessary
hopefully what I'm asking makes sense in spirit
since kind of the idea is a metric space is extra structure on top of a topological space
I'll look into that more
You need the separation axioms.
yeah that's sort of what I was thinking but I didn't want to say it
I think Hausdorff space is technically the minimum structure needed to have unique limits
but I wanted to see what people said first since I never thought about it before but trying to really unravel what depends on what
to me, something seems suspicious about uniqueness of limits depending on the triangle inequality, but then again maybe this is just bad intuition so I can't really say haha
ive got a pretty dumb question that ive gotten pretty close to answering but i cant quite get it.
Let $$C[0,1]$$ be the set of continuous, real-valued functions on the interval $$[0,1]$$ and let $$d^:C[0,1]\times C[0,1] \rightarrow \mathbb{R}$$ be the distance function defined by $$d^(f,g) = \int_0^1 |f(x)-g(x)|dx$$, for $$f,g \in C[0,1]$$. Define $$I(f) = \int_0^1 f(x) dx$$. Prove that $$I: (C[0,1], d^*) \rightarrow (\mathbb{R},d)$$ is continuous.
ive gotten 2 pretty decent attempts but the first makes a logical mistake along the way and the second has the abs outside the integral instead of inside
here's my better attempt:
Let $$x\in \mathbb{R}$$ be arbitrary. Then for some $$\epsilon>0$$ we have that
\begin{equation*}
I^{-1}(B(x,\epsilon)) = \left{f\in C[0,1],\Big|,x - \epsilon < \int_0^1!f(t),dt < x + \epsilon\right}
\end{equation*}
Subtracting from the inequality, we have that
\begin{equation*}
-\epsilon < \int_0^1!f(t),dt - x < \epsilon \Longrightarrow \left|\int_0^1!f(t),dt -x\right| < \epsilon
\end{equation*}
$$|I(f)-I(g)| \leq \int\limits_0^1 |f-g|$$.
ah okay i see
thanks!
i had something similar to that my first attempt but i jumped the gun and moved my abs around
=tex SMN + LMS = LMN \ (2 + 9x) + 50 = (12x + 16)
@pseudo grove
Ty dad
Yw son
180
yes alright thank you
i knew it was an equation
so would i combine the two expressions and equal it to 180 or is it just the one in bold
Both
Since both make up 180
Then once you have the value of x from said equation you can use it to calculate the angle in bold
😩
Very nice
@earnest storm come here
Find a non housdorf space such that each point has an open nhbd homeomorphic to U^n = n dimensional disk for n = 1 or 2
<@&286206848099549185>
Line with 2 origins is non housdorff
I'm dumb when it comes to topology, but aren't hausdorff spaces preserved under homomorphism?
And Uⁿ is hausdorff, no?
OH but the neighborhoods have to be hausdorff
Derp
The topology itself doesn't have to be
Yeah
Well here I am not helping
I was thinking about half plane with a tail
But yeah line with two origins is non-hausdorff. Everywhere other than zero it looks like the interval
Yeah
But we wanna mix 1 and 2 dimensional topology to create a space that is nonhousdorff
I don't wanna cheat and look it up XD
I'll think about it too. I'm not sure atm
There's got to be some properties that make this easier
Is this disc open or closed?
@amber raven
Then it has to be homeomorphic to Rⁿ too. Not sure if that helps though
Help me please /\ /\ /\ 👆 👆 👆 👆
Someone pleaee help me
🙏🙏🙏
<@&286206848099549185>
Pleaaasseee
Breh
Halp
Me
Yes
basically, you know how DBC is 90 right (100-10)
ok lol or he can do it
XFE = EFY + XFY = 70 degrees 20 minutes, + 19 degrees, 40 minutes
It means 70 1/3 deg
20 min + 40 min = 60 min = 1 degree
which is 90 degrees
so the 2 equal each other
sorry
Everything tbh
ok so you know what you're trying to find right
or rather, what you're trying to prove right
Yea if dbc is congruent to xfe
mhm and so the way to prove congruence is to provoe that they're the same angle
Ye
and so you find the degree of each angle and if they're equal to each other, you know it's congruent
so how do you find DBC
ABC - ADB
90 deg
K
I need help on my math homework
and i cant figure this one out
Someone help me :CCC
,...
I’m lost
...
...
@exotic patrol Well I would help you if you were still online.
AB/BF = AC/CG
12/BF = 24/14
12/BF = 12/7
BF = 7
hahaha
FUUUUU
ono

dont really know who to get mad at tbh
you have been dabbed on
¯_(ツ)_/¯
Help Me!!!
oh it's 10
it's 40
HELP ME! HELPF ME!
oh that's 30
HELP!!!
false true false false true true
all the angles on a straight line add up to 180°
so you will make two equations using this fact
help.
same
@upper karma for triangles to be similar, the ratio of sides must be equal
In particular, If the triangles MPR and ADN are similar
So it's not similar
=tex \frac{MP}{PR}=\frac{AN}{AD}
I need to solve for POS but I don’t know how to solve these types of problems? Can someone help?
What other information is given to you
@runic elbow
So do I
but it's also simultaneous so there must be some relation between them
You have 3 equations and 2 variables, solve them
That’s the problem I don’t know how to solve for them from there
$$3x-4y=x-y$$
So using the second equation, we get $$x=2y-10$$
=pup Solve 3x-4y=x-y=y-10
Yup

I did matrix transformation, and the result vector is supposed to be 20, 10, 10, 1
However, my result is
-1642983424
0
0
0
written in C
I am modeling it off of http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/
Free tutorials for modern Opengl (3.3 and later) in C/C++
What am I doing wrong?
struct vec4 transform(struct mat4 a, struct vec4 b) seems incorrect. If c1 is a column vector and b is a column vector., then the multiplication is incorrect.
@upper karma .
Segments or lines ?
First solve it for lines intersection then check if the point is in both segments.
first for lines?
for lines is just the cross product right?
i mean, if they dont intersect the cross product will be 0
But you want the coordinates of the point.
The determinant should solve that question.
but i think i need the point
Use the lines method.
what method?
Compute the lines equation.
imposible.
just think of it
how many points does a line/segment have?
and how many points does a computer have?
Let A, B, C, D be points. Find intersection of [AC] and [BD]. If ABCD is a convex quadrilateral then there is an unique solution.
b
I have a 15x20 rectangle and I'm trying to find the area of the shape such that any two points inside of it are at most 30 units away from X.
rectangle*
fixed
wait lemme label the vertices
I started by drawing the outline of the shape (in red).
Starting from X, we can travel in XY until we get to Y. Now we are 15 units away from Y.
Then, we can continue traveling in YZ until we are 30 units away from Z. Then, we will have travelled some distance x in YZ, which I calculated to be sqrt(15) using the Pythagorean Theorem.
We can also do the same process with W and Z instead of Y and Z, which gives us x = sqrt(10).
The rest of the outline would then be part of a circle's outline - more specifically, the one with its radius equal to the sides of the square in blue.
For the horizontal side, we get a length of 20-sqrt(15), and for the vertical side, we get a length of 15-sqrt(10).
Obviously these must be equivalent, so we have 15-sqrt(10)=20-sqrt(15).
Substract 15 from both sides, and we get sqrt(10)=5-sqrt(15).
However, sqrt(10) ~ 3.16, while 5-sqrt(15) ~ 1.13.
What did I do wrong?
so your goal is to get the area in orange right?
$$\pi30^2\cdot\frac{\frac{\pi}{2}-2\arccos\left(\frac{15}{30}\right)}{2\pi}$$.
Rendering failed. Check your code. You can edit your existing message if needed.
$$\pi30^2\cdot\frac{\frac{\pi}{2}-2\arccos\left(\frac{15}{30}\right)}{2\pi}$$.
(the angles are not the same since it's a 15x20 square) @white harness
$$\pi30^2\cdot\frac{\frac{\pi}{2}-\arccos\left(\frac{15}{30}\right)-\arccos\left(\frac{20}{30}\right)}{2\pi}$$.
No, I'm trying to get this area:
but i ended up getting sqrt(10)=5-sqrt(15), which is wrong
can someone help me with topology

alright so
if i were to have an set U that is a subset of X in a topology T of X generated by some basis
i could show that U is open
by showing that for any element in U
there is some basis element containing x
which is contained in U
right
?
I think so
Yes
Prove that U is the union of all basis element that contain a point of U and are contained in U
I love topology, lessgetit
Topology ❤️
Makes me gay
@hallow hornet
ok thank ❤
im going to kill myself whenever i get to geometry arent i
If we have angle X, and the length of A, how would we determine the length of ?
the tangent of x is the ratio of the side opposite of x to the one adjacent to it
what is that in this case?
Tan(x)= ?/A
@unique tulip you have that backwards, tan(x)=?/A
I vaguely remember that.
Thanks guys, I took geometry like 2 years ago, it didn't stick well.
someone HELP me pls🙏🙏🙏🙏
Can someone help me with number 5
It doesn’t need to be exactly right
I just need an idea of what to put down
I’m fucking lost lol
Any three angles of a triangle measure up to 180 degrees.
animorphs were the shit
I wanna ask Is a cylinder a prism?
@narrow sleet no?
Why?
@clear haven hell yeah Tobias was such a g
Most of uz?
Circle-based prism, why not 🤷
who doesn't?
@steady sleet doesn't
I don't know if this belongs here but how to draw orthogonal trapezoid plane in room. (Hope I explained clearly)
this is rectangle for example
you didn't
didnt explain clearly? @tribal wind
right
okay, like imagine that you are looking at the object (trapezoid) from other point of view. not from up but like diagonally
difference in what?
circumference
oh it's calculus right?
Can anyone help me with a problem? >~>
NO
Oh...
@real light Just post it.
Ah! I got help already
My disappointment is immeasurable and my day is ruined.
Non- measurable sets
Axiom of choice.
You have to choose your dissappointment from uncountably many boxes
are the boxes distinguishable?
Can someone help me with this. I’m really not sure how to prove JL Congruent MO and if it’s side angle side
Uhhhh
I mean it's basically given you everything.
Ok so after proving congruence
Yeah but what’s the proof called
just say JL=MO(congruent sides on congruent triangles)
@lavish thistle He's not asking for the proof, he wants deduction
Dw.
What’s the proof for JL=MO
JL=MO(matching sides of congruent triangles)
CPCTC?
Wtf is CPCTC.
Congruent Parts of Corresponding Triangles are Congruent?
Ok
Is it a universally accepted term?
We were going to learn what that is tomorrow but he put it on the homework
Then why would you keep it in a universal math's chat.
@runic elbow You're one step ahead.
You're probably going to learn more than just how to deduce.
Where.
in school and practice presumably
What?
No.
Look at a trapezium for example
The line segments are parallel
But they are not congruent.
If you mean
lines, 'no fixed end points'
Then technically yes.
What’s the name of the proof that shows line pq is equal to line st (<p and <t are equal)
Can I assume jk and kn are equal?
isnt it abbreviated like congruent parts of congruent triangles are congruent
or something
Well if JMK = KLM
And you know for sure JKM=NKL
Then the last angles must also be equal because the angles must add up to 180 degrees
But i think you would need those lines saying that the sides are equal
and the second set of triangles i dont think you can assume as congruent at most similar
Thanks
in german you'd call those Z-angles (Z-Winkel)
my preferred proof would be via parallels and opposite angles. but you have to extend the lines in the picture for that
#❓how-to-get-help
a) min 15 min rule: wait 15 minutes before pinging helpers
b) please don't delete the ping
ok
Sneaky ping.
So what field of math deals with higher-dimensional geometries (like analogs of circle, sphere in 4d and higher dimensions, analogs of planes and all that)? Is it 'topology'? For instance, what does 3x^2/sin(zs) = 32^(xys)/ln(k/w) even mean geometrically (or spatiallly) in this 6-d space? wtf is it? like a bended sphere or some shit?
@cold plaza you're looking for differential geometry, but things like topology/algebra can deal with higher dimensions too
@tribal wind thanks
hey guys. I need to find the angel alpha dependent on the radee r and R as well as finding the distance a dependent on the radee r and R . I cant really find a triangle .
<@&286206848099549185>
the tangents form similar right triangles
small r being rotated is a ruse
you can now use your trusty Vierstreckensatz 😉
@uncut shoal ty buddy! Vierstreckensatz was the thing I needed!
yeah i tried
remember it's squared too
same difference as the first one
well no that is a shit method
c^2
as far as ive gone
You forgot to square c
it should be (3x)^2 and (5x)^2
and you didn't square the 3x and 5x
lol ye
okay so 64+9x=25x
yes
no
is it just an equation?
9x^2 : 25x^2
Yes.
yeah
but i still dont have any of the sides
$$64+9x^2=25x^2$$ yay
solve for x and then plug x back into the triangle sides
Solve for x and then plug in
then you'll have all of the sides you need
np
wait so i know 64 has the value of 16x's and to get the value of x i can just divide 64 with 16 right
it's x²
yeah get the value of x²
what
okay i solved it thanks for the help!
?
yes
anyone can help me with thius
how do i calculate this i know its something with like parrerals or something
I don't read german, can you translate it to me?
u=(2, 2), v=(4, -1).
ohhhhhh
u = -2v i think
let me calculate this real quick
hm
okay am im disabled
o yeah, the two w's in problem 1 and 2 are different from each other. makes sense
i cant make this work
i feel asleep in the lecture when my teacher was going through this
sqrt((2)^2 + (2)^2) * sqrt((4)^2 + (-1)^2) i think
there's some courses on khan academy and also 3b1b on youtube has some stuff on it
well im looking at another example in my book
w=2u+v, w=(6, 3), length \sqrt{6^2+3^2}.
w=u-v, w=(-2, 3), length \sqrt{(-2)^2+3^2}.
2u + 3v = (7,8)
i found that example
if thats correct wouldent this be 2u + v = (2,2) x (4,1) = (8,2) ?
is that right?
2(2, 2)+(4, -1)=(6, 3).
where do u get the -1 from?
It's 'going down'.
still confused why is it going down?
You need a basis to write those coordinates.
yo this came up on a problem set and i just want to make sure i have the definition right: a metrizable space would be some underlying set endowed with the topology generated by an arbitrary metric, right? so i'd have to do this with the axioms of a metric instead of just saying "let X have the discrete metric" and proving it that way
ya actually that's a dumb question i got it lol
What do you know about angle 1 + angle 2?
sorry i had to go i know that there supp
@upper karma cesyou know what supplementary means right?
assume angle1 = x
angle1 = angle4 right?
so angle1 = angle4 = x
now express angle 2 in terms of angle1 (or x) and express angle3 in terms of angle4 (or x)
use the definition of supplementary angles
1+2=3+4 <=> 2=3 you're welcome
@upper karma if supplementary angles congruent, then the angles are congruent
tfw shadow ping

my 1D mind
You cannot truly experience anything really
ay who you callin stoopid
Eyes are 2D
Negative dimensions when
@upper karma Such is life
hey could someone help me with a geometry question

Hello
May someone help me study geometry
I just need the definitions to all the postulates
guys
imagine i have a set of points
all with x >= 0 and y >= 0
i can sort them from the origin going to polar form and see the angles
but how can i sort them if instead of being the origin is a generic point a,b?
so you know the (x,y) coords of the points in the set right?
imagine they are sorted like this
this is the easy way
but i wanna sort them like this
yeah 1sec on my whiteboard
so a point (x,y) in the red basis has coordinates (x-a,y-b) in the blue basis
@upper karma
okey
so this
could work?
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
float angle = atan(y/x);
if(x < 0 && y >= 0) angle = PI/2 - angle;
else if(x < 0 && y < 0) angle += PI/2;
else if(x >= 0 && y < 0) angle *= -1;
return new Point2D(mod, angle);
}
ok if u dont know programing
my point center (x,y)
is somewhere
so this refers to the point you're ordering right?
seems right for the logic yeah
well idk for the syntax :/
no, the syntax is not the problem
are the operations
aaah
i see my errors :P
i think
if(x < 0 && y >= 0) angle = PI/2 - angle;
else if(x < 0 && y < 0) angle += PI/2;
else if(x >= 0 && y < 0) angle *= -1;
there are my errors
since i am not working on (0,0)
i need to update the edges
ah yeah duh me
yeah replace all the xs by center.x (same for ys)
idk
i know that if they are on 1st quadrant
angle is angle
if it is in second quadrant?
i just supposed the atan function was broken on that language
yes ik
if(x < 0 && y >= 0) angle = PI/2 - angle; isn't it pi-angle here?
(with the center changed ofc)
PI is pi
i guess you just have to add PI whenever at least one of the coordinates is negative
i guess you just have to add PI whenever at least one of the coordinates is negative try this
what's your language? (i want to see how the arctan function behaves on there)
java
oh
maybe thats the problem
i am adding pi
and maybe i dont need to
aaaaaaaah
it returns values between -Pi/2, Pi/2
actually, what is that?
a full loop from 180º to 180º but passing first over 0º?
you mean the graph of arctan?
for you just have to add PI whenever at least one of the coordinates is negative
x >= 0 and y >= 0
x < 0 and y >= 0
x < 0 and y < 0
x >= 0 and y < 0```
ah i'm dumb
instead of 0 will be center.x and center.y
x >= 0 and y >= 0, x >= 0 and y < 0 : for those two cases atan returns the good value
for the two others, just add PI
tan(x+pi)=tan(x) this
yea
i am adding pi indeed
in both cases
yas always add
why? on the black one u need to minus
the angle which will have the same tan as black on Q2 is my blue on Q4
honestly just try
aaaaah
true
:P
so
x < center.x && y >= center.y
x < center.x && y < center.y
for those i add pi?
...
it isnt working
again...
mmm
i dont know why
but it fails in some cases :P
ie when the point is right on the y-axis
cause you'll get some infinity shit going on
but does it work for some at least?
it does i think when they all are on the left side
or on the right side
if they are in between...
yea das ist the problem
well just do a case for numbers that are right on the y-axis (i mean at x==center.x ofc)
like this basically
and maybe handle the case when the point is exactly at the center
this is how it is sorting them
:)
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
float angle = atan(y/x);
if(x < center.x) angle += PI/2;
return new Point2D(mod, angle);
}
so how should i change this? u.u
yes you should add pi
what does it do? (the graph output i mean)
and you should add 2PI whenever it is in Q4 now that i think about it
how worse? (yes i love that graph dope)
😮 shits i gotta sleep now
One last thing : the error may be elsewhere
@hard gale
i dont think so
look
i dont know where is the error
the mess up when they are on diff quadrants
What is the issue ?
i am trying to sort some points by their angle
from another point which is the reference
and this last one case
isnt working
and i am sorting them on clockwise
and this is the code i am using to get the angle
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
float angle = atan(y/x);
if(x < center.x && y >= center.y) angle += HALF_PI;
else if(x < center.x && y < center.y) angle += TWO_PI;
return new Point2D(mod, angle);
}
this is the point i wanna sort, and center is the red point on the giffs
X<center x and Y<center y is not quadrant 4 
this is the atan i am using
no, it is 3rd
but my results from atan is -pi/2, pi/2
So did you actually try the combo "add pi if point in Q2 or Q3 + add 2pi if point in Q4"? If you did I'm really gonna sleep
#include <cmath>
#include <iostream>
int main()
{
float x, y;
std::cin >> x >> y;
std::cout << std::atan(y / x) << std::endl;
return 0;
}
``` Toy program.
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
if(x < 0 && y > 0) angle += PI;
else if(x < 0 && y < 0) angle += PI;
else if(x > 0 && y < 0) angle += TWO_PI;
return new Point2D(mod, angle);
}
``` This should work.
and what if the point is on the edges?
Edge of ?
You can fix that.
[0;2\pi[.
no
i mean
the variable
u dont initialize it
u just say angle + two_pi
but u dont do anything
It is angle += TWO_PI;;
angle = atan(y / x);
Why ?
Plot it.
look
well
ofc it will never work
lol
i need to change the output of atan
cuz i want
my angle from 0 to 2Pi
otherwise
if there are points on different semiplanes
it will never work
or will it?
wait...
do i need to return the abs value?????????
Of ?
The variable angle is between 0 and 2pi.
@hard gale -pi/2, pi/2 isnt what u draw T.T
@white harness i know, but it returns something else
on the Q2, it returns -angle
If x < 0 and y > 0 then atan(y/x) < 0, if x < 0 and y < 0 then atan(y/x) > 0, if x > 0 and y < 0 then atan(y/x) < 0. By adding the right value, angle has to be positive.
for fuck sake
ok look
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
float angle = atan(y/x);
return new Point2D(mod, angle);
}
just with that code, to return atan only
there is the point
- the angle on degrees
It returns new Point2D(mod, angle).
the thing is
for this enviroment
the origin is top left
not bot left
so possitives y goes down
and possitive x goes right
idk if this affects
but i think so
cuz the only possitive angles
are
You should have printed x, y, not this.x nor this.y.
Exactly, print x, y the difference.
Yes.
that is a minus
right?
between point and center
now they are sorted properly
but this is luck
dont think it works
look
It isn't right.
the first point color green
seems to be ok
is a bit on the left from the center
-15 pixels
and far away down
200 pixels
and angle in degrees is
idk
actually
that angle is this
What I did it is for angle in radians.
yes i know it is for radians, i am just printing this
sortByAngle[index].polar(sortCenter).y*360/TWO_PI
the value itself is in radians
but i am printing the degrees value
but any way, look that picture
i am doing this wrong hahaha
Not right. 86 + 180 is different from -86 modulus 360.
i said
y >= center.y
was positve
but here
the positive y value
is down
not up
the points above my center
has negative y
i think this has been my issue
fck
i wanna sort them this way
but
as how is the coordinates system implemented
it sorts them this way
but i will try to sort them on the second way first
and if i got it working, i move to the other one
Maybe (x, -y).
okey i manually wrote some points
so now i wish u can help me better
acutally they are sorted XD
-90 to 90
from the lower to the higher
so the sorting algorithm works xD
now i need to guess the angles
The base isn't direct.
It depends on how you are dealing with x = 0 or y = 0.
no
the problem is
asjbfhakhbv
idk
i know why
rofl
i have been always doing
x < center.x
but x is the distance between the point and x
not the actual x of the point
that should be x + center.x < center.x
so i move the point from the center
ah nop
not that i think
no, i fixed that
now i have a diff problem
why the left point
has 90 degrees?
it should be 180
0 again.
Point2D polar(Point2D center){
float mod = center.dist1(this);
float x = this.x - center.x;
float y = this.y - center.y;
float angle = atan(y/x);
if(x < 0 && y >= 0)
angle += Math.PI;
else if(x <= 0 && y < 0)
angle += Math.PI;
else
angle += 2. * Math.PI;
return new Point2D(mod, angle);
}
```.