A computer method for simulating a surface of a bone and cartilage, the computer method comprising the computer implemented steps of: extracting a two-dimensional (2D) bone contour from a plurality of raw radiofrequency (RF) signals; extracting a two-dimensional (2D) cartilage contour from the plurality of raw RF signals; transforming the 2D bone contour from a local frame of reference into a three-dimensional (3D) bone point cloud in a world frame of reference using tracked data generated by tracking a position of an ultrasound transducer that generated the plurality of raw RF signals; transforming the 2D cartilage contour from the local frame of reference into a three-dimensional (3D) cartilage point cloud in the world frame of reference using tracking data generated by tracking the position of the ultrasound transducer that generated the plurality of raw RF signals; comparing a generalized model of the bone with the 3D bone point cloud; comparing a generalized model of the cartilage with the 3D cartilage point cloud; and based on the comparing, deforming the generalized model of the bone to match the 3D bone point cloud, and deforming the generalized model of the cartilage to match the 3D cartilage point cloud.