@ssube Thats the question...I'd use PhoneGap to make it look like an app but, I like the how an app can be used offline or without internet. Thats why I kind of want to do it that way.
@argentum47 I reviewed the repo code and it needs some work so that you can work on it easily. I will do a refactoring round next morning and add you as a collaborator, and also setup a branch for you to work on. Expect major changes next time you see the code :)
@MadaraUchiha i went through that MDN link. I tried to use className to alert my css class name. But it's just showing blank alert. jsfiddle.net/vqs1qrh7/22
I could do a native app. Then once you have it you don't need to be online. The other way I could do it is through making it as a website. Then if I want to use PhoneGap or something else to make it look like an app I could. If I was doing something that didn't need to use a database I could use only local files and you could be offline if you wanted and the PhoneGap-ed app would still work.
I need the polygon to fit inside the square. Currently I check the distance from the middle of the polygon to the edge of each point and store the largest value. Then I get the angle that point is on, and calculate the hypotenuse and use that as a width. So I end up dividing that calculated width by the max width or height.
In geometry, the minimum or smallest bounding or enclosing box for a point set (S) in N dimensions is the box with the smallest measure (area, volume, or hypervolume in higher dimensions) within which all the points lie. When other kinds of measure are used, the minimum box is usually called accordingly, e.g., "minimum-perimeter bounding box".
The minimum bounding box of a point set is the same as the minimum bounding box of its convex hull, a fact which may be used heuristically to speed up computation.
The term "box"/"hyperrectangle" comes from its usage in the Cartesian coordinate system, where...
find the extremities of the potato, find the distance between 'em, find the relative lengths of the side of the square and the distance between extremities, and scale the potato to its inverse.
@ssube But both the objects are centered. The lens is in the middle of the circle. Using abs would give me the distance between the center point and the edge, as a positive number
find the min/max x/y for all the points in your poly. That is the minimal box surrounding it. Find the size difference between the two boxes (divide width and height). Scale each point by the width/height ratios.
Stack Exchange just tweeted this image following the Supreme Court of America ruling in favor of gay marriage:
#LoveWins
#LoveOverflows
Please can this be made the logo for a couple of days? I'm thinking Stack Overflow and the localised ones.
I've made a SVG format - here it is.
And here is...
@SterlingArcher True dat. Marriage unfortunately carries with it some legal benfits and as long as that is the case everyone should be allowed one, in my opinion.