[R] Playing with rgl: a Youtube video

Mark Knecht markknecht at gmail.com
Tue Dec 22 18:49:09 CET 2009


On Mon, Dec 21, 2009 at 4:42 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> I've just posted a demo made with the rgl package to Youtube, visible here:
>  http://www.youtube.com/watch?v=prdZWQD7L5c
>
> For future reference, here are the steps I used:
>
> 1.  Design a shape to be displayed, and then play with the animation
> functions to make it change over time.  Use play3d to do it live in R,
> movie3d to write the individual frames of the movie to .png files.
>
> 2.  Use the ffmpeg package (not an R package, a separate project at
> http://ffmpeg.org) to convert the .png files to an .mp4 file.  The
> individual frames totalled about 1 GB; the compressed movie is about 45 MB.
> 3.  Upload to Youtube.  I'm not a musician, so I had to use one of their
> licensed background tracks, I couldn't write my own.  I spent a lot of time
> picking one and then adjusting the timing of the video to compensate.  Each
> render/upload cycle at full resolution took about an hour and a half.  It's
> a lot faster to render in a smaller window with fewer frames per second, but
> it's still tedious.   It's easier to synchronize if you actually have a copy
> of the music locally, but Youtube doesn't let you download their music.  So
> the timing isn't perfect, but it's good enough for me!
>
> Duncan Murdoch
>

Cool enough video. Thanks for sharing.

I'm curious - did you do the equations for the knot in R? If so what
did they look like, assuming there's no reason you cannot share it.

Again, thanks for the diversion.

Cheers,
Mark




More information about the R-help mailing list