Live data from Hacker News

Wolfram Alpha’s New Data about Pokémon

blog.wolframalpha.com

1–10 of 61 posts

Re: Wolfram Alpha’s New Data about Pokémon

#4
post #3

How would one generate this equation from an image? http://www.wolframalpha.com/input/?i=snorlax+plane+curve

The equation is provided on the same page. It is using the Heaviside step function which allows you to piecewise define the curves and add them all together.

Re: Wolfram Alpha’s New Data about Pokémon

#8
post #3

How would one generate this equation from an image? http://www.wolframalpha.com/input/?i=snorlax+plane+curve

I've never done it, but here's how I would do it off the top of my head.

-Vectorize the image into a set of bezier curves that have endpoints at intersections

-Walk the bezier curves so that the entire image can be represented by a single "strip" of piecewise bezier sections. If there's any overlapping sections from having to rewalk the a curve, maybe apply some offsets/small modifications to those curves to give it a "sketched" look.

-Rasterize the bezier curves in order at your desired resolution into a list of XY coordinates. Make sure the XY coordinates remain in order they were rasterized.

-Split the coordinates of each rasterized pixel so that you have two lists, (t, x) and (t, y), where t is the index of the rasterized pixel. Now you can represent the X and Y coordinates of your sketch on two coordinate planes as a function of t.

-For each coordinate plane X and Y, record the index where the second derivative of the rasterized graph changes. What this does is lets you distinguish subcurves on the line. For this to work it's probably important that the rasterization was done at a relatively high resolution.

-For each subcurve, generate an extremely low frequency trigonometric function that can represent that subcurve. Ideally outside of that subcurve, the trig function should be at or very near zero. This might require layering some additional trig functions in order to eliminate any noise.

-With the trig functions generated, return the results as a parametric function.

Re: Wolfram Alpha’s New Data about Pokémon

#9
post #6

That's... cool I guess? There are a bunch of other sites that already do this though. Serebii, bulbabedia, veekun, pokemondb .etc

Those other sites allow you to plot distribution and find sets of specific numerical characteristics that easily? I only remember seeing generic statistic listings.

Re: Wolfram Alpha’s New Data about Pokémon

#10

Always liked WolframAlpha, this is also awesome. But what i really like, is to match stuff like protein in bananas vs spinach to know what i'm going to (prefer to) eat soon ^^.. So, thanks!

Wow, I didn't realize it had food. Good call! :)
Post reply on HN