Originally posted by loinburger
View Post
Announcement
Collapse
No announcement yet.
So you're think you're good at math?
Collapse
X
-
12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
-
Should I click on any of Ben's posts in this thread, or are his spherical geometry skills as poor as I would assume?12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
Originally posted by Ben KenobiDo you want to expand by all three directions?
Asher, what Polars do for you is rather than getting into a messy coordinate as cartesians, they let you find a number that you are very interested in, the 'radii' of the object from the com.
Instead of XYZ, you have inside, outside and edge.
Do you want it for n-sided polygons, or do have restricted cases?
Edit, this is probably what you want Asher. They've got the functions here.
http://web2.uwindsor.ca/math/hlynka/Ngon.pdfOriginally posted by Ben KenobiYou only need 2-d rather than 3 d? That makes it quite a bit easier.Originally posted by Ben KenobiYou could say thank you.
Check the link. They should have what you need. Searching for n-polygon functions polar coordinates should get you what you need.Originally posted by Ben Kenobi[r1r2sin(theta2-theta1) + r2r3sin(theta3-theta2) + r3r1sin(theta1-theta3)]/2.
For triangles at arbitrary points P1,P2,P3.Originally posted by Ben KenobiOriginally posted by Ben KenobiOriginally posted by Ben KenobiCool, I'm glad I was on the right track.
This is actually similar to some stuff we had to do in Astro way back when. We were always working in Polars (RA + Dec).KH FOR OWNER!
ASHER FOR CEO!!
GUYNEMER FOR OT MOD!!!
Comment
-
12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
Originally posted by KrazyHorse View PostI agree with this. Given that it's impossible to actually do distance-preserving conformal scalings, pretty much anything which gives a reasonable answer would be acceptable.
Also, the person who defined how it should work is a moron.Jon Miller: MikeH speaks the truth
Jon Miller: MikeH is a shockingly revolting dolt and a masturbatory urine-reeking sideshow freak whose word is as valuable as an aging cow paddy.
We've got both kinds
Comment
-
New problem, related to the original and also related to my thread ranting about the idiot I had yesterday.
The server-side idiots are sending me a randomly-ordered array of points that forms the polygon. All of my code is dependent on a coherent order, clockwise (CW) or counterclockwise (CCW).
Spent a bit of this morning trying to solve this myself. It involved computing surface normals and the midpoint. That'd give me an orthonormal basis for creating angles and sorting them. Using the midpoint and the array of angles, I could probably figure out the ordering. But this started making my head hurt, and I figured this problem must've been solved before in computer graphics.
I ran across the Graham Scan algorithm which I think suits my purposes: http://en.wikipedia.org/wiki/Graham_scan . It'll give me the convex hull of a set of points.
Again, lucky me gets to do this in Javascript client-side because the server-side guys -- where this should be done -- are epicly ****ing stupid."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
I thought of trying that a first but I don't think it'd work well because the polygons can be any obscure shape at all. Imagine a thick-shaped "U" with the midpoint in the center."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
I'm trying to explain this to the idiot doing the backend. I sent a lengthy email explaining how and why this is happening.
He responded with "What do you mean by clockwise and counterclockwise?"
Holy ****ing ****. If I wasn't working from home today I'd probably smack him. I can't take much more of tihs."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
How can you even tell what the polygon is if it's given to you as a randomly-ordered series of point? It's not unique.12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
As an example, take 5 points, 4 at the corners of a square, one in the middle of the square. There are 4 "reasonable" distinct polygons you can make out of these points.12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
There are so many less obtuse ways of doing what you originally stated the problem was that I just can't stop laughing about this.
FWIW, I'm pretty sure thy don't actually want the area you've shown on that pic12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
Comment