sellipse.coo | R Documentation |
calculate coordinates for plotting a superellipse for visualizing body cross-sections
sellipse.coo(k, res = 100)
k |
superellipse exponent. |
res |
the desired resolution |
a data frame containing
sellipse.coo(2.0)->df #get coordinates for normal ellipse (exponent k=2)
plot(df$x,df$y,col="black", type="l") #plot normal ellipse
sellipse.coo(2.3)->df2 # get coordinates for superellipse with exponent 2.3
lines(df$x,df$y, col="blue") #plot superellipse
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.