javascript - Algorithms for positioning objects in a canvas -
Where can I find some algorithms for moving some objects in a clever way in the canvas? I am using Javascript (with Raphael SVG Library), but examples of other languages (or pseudo-language) are welcome. Geometry is not my strong point =)
For example, 600x800 canvas is, and I want to place the size n in the smart ways 60x60, for example:
- One . Conditions with an algorithm for position meters concentric sections, but an alternate - algorithm for the location m condensed o offset with circles With the commodities frequency (the result may be like a chess)
And similar examples .. I'm just looking at some examples of work to be suited to my case. In advance, thank you =)
for circle:
Input: CenterPt (possibly 300,400 ), RadiusLargestCircle (possibly 270 to ensure your objects are RadiusDelta on all screens) 60 assures the objects are circles)
circles (calculate the number of RadiusLargestCircle -2 * RadiusDelta Overlapping objects) / RadiusDelta
For each cycle
RadCir = RadiusLargestCircle - (CircleNum * RadiusDelta)
(I Will end soon
But essentially the first object goes to centpt X = radiusLargestCircle, y = 0
the division object 2 * radius in the circumferance of the circle
For the number objects
using the parametric equation of the circle, the object on the last one to the x radius
the next circle
Comments
Post a Comment