Skip to content

Instantly share code, notes, and snippets.

@Dispader
Created November 12, 2013 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dispader/b5d55c0f3868ba46f8af to your computer and use it in GitHub Desktop.
Save Dispader/b5d55c0f3868ba46f8af to your computer and use it in GitHub Desktop.
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)
with(dat, polygon(x,y, col="hotpink"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment