Some More Tinkering

After yesterday’s discussion of springs and sine graphs, I remembered a post from 2012, “Daydreams, Lectures, and Helices.” I decided to figure out how to graph a helix in R.

Well, after installing the rgl package and experimenting a bit, I got it to work.


Here’s the code:

plot3d(cos(x), sin(y), z, col=”red”, size=3)

I then rotated it into a good view. As my Latin teacher used to say, that’s all there is to it!

Next up (at some point): an animation of a spring.

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: