I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?
If not, is there a way to systematically access these from web images?
|
I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included? If not, is there a way to systematically access these from web images? |
|||
|
You can get some nice vector playing cards from this site, licensed under GNU LGPL (read more here). Download this folder to your computer and then try the following:
You can then use this like any other curated data:
Random hand generator:You can extend this further and also create a random hand generator using Mathematica as follows:
Use this to deal a hand as |
|||||
|
|
Not super high quality, but this might do for some purposes:
In terms of your real question, namely "how to find out what all is included as curated data", I had no clue if playing card images were included or not. I simply asked Wolfram Alpha via a query like so:
Choosing "Subpod content" as shown, I learned that the command to access the image is
I couldn't figure out how to access the whole deck at once, but from here I was able to put the whole thing together programmatically. |
|||||||||||
|
|
It is not entirely clear to me whether the playing cards in your question are just an example of what you want to find or the actual target. Since the other answers already provide you with the latter I'll provide a way to explore The following two lines of code will build a complete overview of what's hidden in there. Running it may take a bit of time as most of the data will have to be transfered from the Wolfram server to your local paclet store for the first time.
MacOSMacOs doesn't seem to like long This adds another layer of
MacOS user MarkMcClure reports that |
|||||||
|
|
I don't know if this question is specifically asking about finding images in MMA's data, but if the end goal is to get playing card images, then using an online image and partition seems to work great. Link to image
Edit: The lack of a top outline over the third row of cards is an artifact of the Finally, I suppose that the way I went about extracting the individual card images from the imported image could have been more elegant than what I did, but I don't think there's an issue with trial and error for finding the card dimensions if it's just as effective as whatever the more elegant code is. |
|||||||
|
|
Did you see Mathematica Package for Texas Hold'em from Sal Mangano. It's a Poker Simulation Library in Mathematica from http://www.mathematicacookbook.com. The code covers parsing cards, monte carlo simulation, a game engine as well as visual interface with cards. You can access also the images of cards from this link of same library. |
|||
|
|
ExampleData. I hunted but could not find playing cards and thought someone might know if/where they might be hiding before trying to manually construct such a thing. – JohnD Dec 11 '12 at 18:27