« In case you missed it: January 2013 Roundup | Main | Video: Data Mining with R »

February 14, 2013

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

For an alternate parameterization (with a more pointy bottom) see my Valentine to my spouse. I also include some math-geeky phrases of affection, such as "You are more beautiful than Euler's identity!"

Saw this great solution on Stackoverflow: http://stackoverflow.com/questions/8082429/plot-a-heart-in-r

```
dat<- data.frame(t=seq(0, 2*pi, by=0.1) )
xhrt <- function(t) 16*sin(t)^3
yhrt <- function(t) 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)
dat$y=yhrt(dat$t)
dat$x=xhrt(dat$t)
plot(y ~ x, data=dat, type="l", bty="n", xaxt="n", yaxt="n", ann=FALSE)
with(dat, polygon(x,y, col="hotpink"))
points(c(10,-10, -15, 15), c(-10, -10, 10, 10), pch=169, font=5)
```

The comments to this entry are closed.

Search Revolutions Blog




Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr