public class OverlayText { public static void main(String[] args) { // Sets the scale StdDraw3D.setScale(-1, 1); // Draws a white cone StdDraw3D.cone(0, 0, 0, 1, 1); // Draws overlay text StdDraw3D.setPenColor(StdDraw3D.BLUE); StdDraw3D.overlayText(0, -0.2, "This is overlay text."); StdDraw3D.setPenColor(StdDraw3D.YELLOW); StdDraw3D.overlayText(0, -0.4, "It hovers over the 3D scene."); // Sets a nice camera position StdDraw3D.setCamera(1.68, -0.965, 4.887, 15.7, 18.2, 6.94); // Shows the scene StdDraw3D.finished(); } }