Scenario: I'm programming a module to draw a deck of cards on a canvas as though they were being held by a person.
I've cleaned up the question as best I can to be clearer.
What I'm looking for now:
The X,Y coords of each star, which represent the center of each card, as well as its rotation from that point to form a semi-circle.
To make it simpler than before, you can now also assume:
- The total angle the cards cover is 90º.
- There are 5 cards.
- The middle card will always be at X = 0
- Each end card will be on a rotation of 30º (the left side will be -30º)
- The canvas is a fixed size. Note: I put 200 as the height, though this is somewhat of an arbitrary number and I don't even know if it helps or not.
I should also mention that drawing is not exactly to scale, I did the best I can with a somewhat primitive tool for drawing geometric shapes
The source for my solution can be found here: https://github.com/tcrosen/playing-cards
A working demo can be found here: http://tcrosen.github.com/playing-cards/demo.html
Here are some screenshots of the results in action with different values: