Hacker News new | past | comments | ask | show | jobs | submit login
Wolfram Alpha: {y = Re(sqrt(abs(x)(1-abs(x)))), y = Re(-sqrt(1-sqrt(abs(x))))} (wolframalpha.com)
121 points by susam 15 days ago | hide | past | web | favorite | 31 comments

This post reminded me of this legendary question on plotting a human butt: https://mathematica.stackexchange.com/questions/66538/how-do...

I arrived at these equations in 2014 when I plotted a heart using Matplotlib for my girlfriend (now my wife). The code and output is available here: https://github.com/susam/heart/. Some of the Matplotlib defaults have changed since then. With the current version of Matplotlib, the following code would produce good results: https://gist.github.com/susam/2a7e38ba632c4a2780fad421d1ca5f....

Today, I thought of sharing a WolframAlpha link to this plot here on Hacker News. I am glad you all liked it! :-)

By the way, I've explained these equations step-by-step along with graph plots for every step in this 6 year old Reddit thread: https://www.reddit.com/comments/1xwuv3/math/cffeykn/.

r = 1 - sin(θ)

heres the same thing on desmos, my favorite free graphing calculator https://www.desmos.com/calculator/lvespenn07

Desmos is the best thing ever! I'm certain I would not have passed Calc without it. I always struggled with math and put it off till the last year of grad school (funny enough, you can get into grad school for CS without it).

I only ended up doing calc because with it work could pay me ~$20k more.

I can't believe any respectable school would let in a CS grad student without calculus. Linear algebra is really important, too, but you have to know calculus to do much of the math behind circuits. Good for you for doing it even though it wasn't required.

I'd be surprised if many CS degrees (as opposed to CE) had a circuits course. But I agree that calculus would be a surprising omission.

Thanks for sharing!

I turned those functions into an area: https://www.desmos.com/calculator/ya8gxv1hzo

well done! I didn't know you could do that.

Wolfram Alpha crawling. They should be caching queries.

100% my first thought when loading this page. It really seems like they are running the calculation on query. Think about how much compute resource have they needlessly burned through by not caching user queries.

I have tried to draw the Duomo di Milano [0] for a local meetup, best I could do was [1]

    {y = abs((sin(2 pi x) - sin (pi x)) / x )}

[0] https://en.wikipedia.org/wiki/Milan_Cathedral often represented as bars https://duomo.shbcdn.com/blobs/variants/5/7/a/0/57a0e90e-25c...

[1] https://i.imgur.com/iDpCFKY.png

Highly recommended video by Iquilez, in a similar vein:


Watching the guy hack away at graphics is super enjoyable

From the loading speed it seems that the results are not cached. Isn't it?

WA is always pretty slow. At least to me.

Nice but, completely off-topic, how is it possible that with uBlock Origin and behind Pi-Hole I get two banners on the right? This is the first place that I remember where it happens!

For me, the 2 banners are related to Wolfram Alpha. Possibly generated from the backend directly, so there's no ad network involved, which can be blocked.

There are some pretty aggressive rules in some blocklists. I had to disable one to read about an Aggregated Discovery Service because it just looks for /ads/ in the URL and decides to block it.

They are content serve directly by Wolfram Alpha.

You can kill it by blocking 1st party scripts, but you probably dont want to do that as it will kill the site as well.

Best bet if you really hate it would be to add a filter. But as they are "dogfood" ads those are some of the few I find acceptable.

My rendition of the heart curve: https://gods.art/heart_curve.html

Aww. For those of us who have boyfriends and girlfriends who are not technical, this is a nice way to engage them with what we actually do during the day!

this is valentine's day gold. Thanks :D

thanks <3

A day early?

A bit early, but it's Feb 14th already on some places on the planet.

It's never too early to spread some good feelings, though


Applications are open for YC Summer 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact