Posts Tagged ‘animation’

And Now, A Two-Point Cubic Spline

Friday, November 11th, 2011

The simple quadratic spline discussed my previous post seems to be sufficient for interpolating particle positions between two GADGET-2 snapshots for the purposes of making animations, but it's also possible to use a cubic spline for the task.  The advantages of using a cubic spline are (1) it can be more accurate—especially in cases where the acceleration changes sign once between snapshots, and (2) the derivatives at the end-points of the spline match the derivatives specified in the input data. In the case of the quadratic spline, if the acceleration (second derivative) changes sign even once during the interval, the interpolation is poor and the derivative of the spline at the end points is not guaranteed to match the specified value. Thus, in the case of the quadratic spline, the derivative is generally discontinuous when moving from one interval to another. This doesn't matter too much when making animations with reasonably small intervals, but it would be important for certain other situations. The disadvantage of the cubic spline is that it adds complexity. (more…)

Quadratic Spline Interpolation

Thursday, November 10th, 2011

While animating my first GADGET-2 galaxy mergers, I discovered that setting the frame rate to the common value of 25 frames per second resulted in movies that were too fast. The complexity of the merger process couldn't be appreciated--even though the snapshot interval was quite small (0.005 simulation time units). I had to interpolate the GADGET-2 snapshots in order to produce intermediate frames that could be used to slow the animation down. Linear interpolation didn't work well enough to meet my standards, so I looked for an efficient quadratic interpolation scheme. I wanted to perform a quadratic interpolation using only two snapshots at a time (a quadratic interpolation using two snapshots is possible in this case because each snapshot contains particle position and velocity information). The first thing that came to mind was simply using the familiar expression (more…)

First Simulations

Tuesday, November 8th, 2011
Several months have passed since I last wrote a research log entry.  I should probably write these a bit more frequently.  Much has happened since the previous entry!
  • My HST Cycle 19 Theory proposal was accepted and all of requested funding has been provided!
  • I became the first physics graduate student at UCR to be an instructor for a course (rather than just a teaching assistant). I taught Physics 40A during the summer session.
  • I got married!
  • I finished writing my first paper.  The paper is still being reviewed as I write this, so it's technically not finished because it hasn't been revised, resubmitted, and accepted for publication yet.
  • I compiled P-GADGET-2 and ran several small simulations on Crunch.
  • I've written a code in C++ to read, analyze, manipulate, and output GADGET-2 snapshot files. The code is very basic at the moment, but it should be mostly finished in a few months. I'll use this code for the non-Sunrise component of my thesis project. I plan to write another research log entry describing the first application of the code: quadratic spline interpolation of snapshot files for purposes of making animations.
  • I've built a GADGET-aware version of IFrIT.  This was somewhat more time-consuming than it should have been since there were no explicit instructions on how to build the GADGET plugin into IFrIT. I also managed to get SPLASH to read and analyze / visualize my GADGET-2 snapshots.  I still haven't managed to get Splotch to read my snapshot format though...I'm going to move on to working with Sunrise now.  I've heard that successfully building Sunrise takes some effort.
  • I've started reviewing the core of theoretical physics and I've finally started learning some elementary particle physics / quantum field theory. (more…)