Jaimy de Vries
I am trying to compile quite a list of things into 1 runnable solution for the web but so far im failing it pretty big time
Jaimy de Vries
#Wanttopay for solution
Anonymous
good night friends
Anonymous
anybody want some pepsi
professor
hey guys
Jaimy de Vries
anybody want some pepsi
No I want a good compile solution for my c++ to web task
Sandeep
Hello
Rushikesh
/java
Rushikesh
How do java program questions like area of the circle and find in without perimeter how to do???
Rushikesh
Sorry for English
Jaimy de Vries
well if u looking to convert c or c++ to java it would be xD
Talula
If you're converting from Java to C++ then it might be.
Jaimy de Vries
Im looking for a way to convert c++ to javascript actually or anything to make our game client for multiplayers able to load in web browsers or mobile devices
Jaimy de Vries
without going through to much recoding if possible
Talula
Im looking for a way to convert c++ to javascript actually or anything to make our game client for multiplayers able to load in web browsers or mobile devices
All you'll have to change is your front end of the game, most of your graphics file will remain and most of your logic will remain same.
Jaimy de Vries
@danya thats what im trying to find out my client exists out of folders, images, exe, json and some other files I just wonder how to side it with Web Assembly I cant find a live example of do this and this is my problem at the moment
Jaimy de Vries
so its a bit as being stuck in the hay looking for a nail
Talula
So frontend would need to be rebuild entirely you mean?
Yes you have to because graphics are handled totally differently in JavaScript compared to C++, though it's simpler in JavaScript.
Ilya
Generate all combination of two point s multimap( distance => pair of points), rbegin()
Anonymous
N*N
No, later I decided it can be done in less than that, NlogN
klimi
Yo yoo
Anonymous
Hi
Ибраги́м
https://www.reddit.com/r/cpp/comments/dc73r1/even_the_ai_knows/?utm_medium=android_app&utm_source=share
Javi
There is no shorter solution
I think there is. You can find the average position of the points, convert the coordinates to spherical, and just pick the point with the maximum radius. It should be O(n)
A
Heyy! Whats the difference between C and C++ Whatt should i learn? I am beginner!
A
Can someone give me a full playlist of tutorial on C++
Talula
If you take first and second distances or "radius" it'll only give you distance between these two points to the center of average circle...
Talula
It will not give you the distance between two points...
Javi
Right, it will be an upper limit
Javi
But you can repeat the process setting the origin of the coordinates to the point that you found in the previous step. Now the new maximum radius will be the maximum distance between two points (I think)
Anonymous
But you can repeat the process setting the origin of the coordinates to the point that you found in the previous step. Now the new maximum radius will be the maximum distance between two points (I think)
You mean the minimum radius that encloses all the points? That would be correct in that case, because the two points with the largest distance would become the end points of diameter of the sphere. Not O(n) though
Talula
If you're talking about largest distance to center of the average circle it wouldn't work.
Anonymous
Largest distance to what?
Points with the largest distance between each other
Talula
Points with the largest distance between each other
How would you find the largest distance using a circle?
Javi
It'll never be maximum distance between 2 points, it'll be maximum distance between a point and center of average circle.
That's the first step. In the second step, radius 0 is at the point that you found before, so the new maximum radius will be the maximum distance between two points in the set
Anonymous
How would you find the largest distance using a circle?
Basically expand the circle then check if all the points are in the circle yet, then repeat till no point is outside the circle
Talula
Javi
You mean the minimum radius that encloses all the points? That would be correct in that case, because the two points with the largest distance would become the end points of diameter of the sphere. Not O(n) though
The minumum radius that encloses all the points, being centered at the point that is fartherst from the mean position. It's O(n), but with a lot of overhead, so it is only worth if the number of points is really big
Talula
Not x1,y1 and x2,y2
Anonymous
Not x1,y1 and x2,y2
0,0 would be the midpoint of these two, if these two would be the points that have the largest distance between them
Javi
Convert to spherical units: O(n)
Talula
0,0 would be the midpoint of these two, if these two would be the points that have the largest distance between them
Yeah and if these points are just adjustent to each other you'll get maximum distance when they are only 1 pixel away...
Javi
Find the largest r: O(n) or better
Javi
Calculate the mean: O(n)
Javi
Radius, in spherical coordinates, x and y are replaced by radius and angle
Talula
To find the distance between two points the formula is D = SQR(ABS(X1-X2)+ABS(Y1-Y2))^2
Javi
To find the distance between two points the formula is D = SQR(ABS(X1-X2)+ABS(Y1-Y2))^2
That isn't the euclidean distance. Actually you cancel sqrt with ^2
Javi
Euclidean distance is sqrt((x1-x2)^2+(y1-y2)^2)
Talula
Sorry D = SQR(ABS(X1-X2)^2+ABS(Y1-Y2)^2)
Talula
Euclidean distance is sqrt((x1-x2)^2+(y1-y2)^2)
Yeah right... sorry for typing it wrong.
klimi
Tazz you're wrong.... Well... Technically... Idk... Depends on the numbers I guess. Nvm me
Anonymous
Sorry D = SQR(ABS(X1-X2)^2+ABS(Y1-Y2)^2)
You got the correct formula this time, and we are indeed going to use that formula somewhere while finding out the convex hull
klimi
Wrong why?
If you count complex numbers then you are right but abs is not necessary since ^2 is always positivr afaik
klimi