We develop a realistic computerized heart phantom for use in medical imaging research. This phantom is a hybrid of realistic patient-based phantoms and flexible geometry-based phantoms. The surfaces of heart structures are defined using non-uniform rational B-splines (NURBS), as used in 3D computer graphics. The NURBS primitives define continuous surfaces allowing the phantom to be defined at any resolution. Also, by fitting NURBS to patient data, the phantom is more realistic than those based on solid geometry. An important innovation is the extension of NURBS to the fourth dimension, time, to model heart motion. Points on the surfaces of heart structures were selected from a gated MRI study of a normal patient. Polygon surfaces were fit to the points for each time frame, and smoothed. 3D NURBS surfaces were fit to the smooth polygon surfaces and then a 4D NURBS surface was fit through these surfaces. Each of the principal 4D surfaces (atria, ventricles, inner and outer walls) contains approximately 200 control points. We conclude that 4D NURBS are an efficient and flexible way to describe the heart and other anatomical objects for a realistic phantom.