Calculate the heigh of a square when drawing perspective to a vanishing point I know how to use a vanishing point to create the illusion of perspective, but how do I determine the height of a square if I draw two lines towards the vanishing point?

For this case, assume I have two parallel lines on a grid. One at y=0 and one at y=10. I select a point on the higher line to be my vanishing point (0, 10) and then draw two lines from the lower line to the higher line to give two "parallel" lines (not parallel, but look parallel). First line from (-3, 0) to (0, 10), and the second line from (3, 0) to (0, 10). How do I find out where on the y-axis to draw the horizontal line so that my illusionary shape appears to be a square?

Bonus: If I have a square paper with points drawn on it and I know the location of those points. How do map those points to the perspective square in the above scenario? For example I have a point at 20% width and 90% height (near the upper left corner), how do I draw that point at its exact location on the perspective square?
There is a way to calculate the location of the horizontal line that goes on top of the square.

There are actually two ways to do it, but I'm not an expert on matrices so I'm not going to go into detail on how 3D rendering/calculating.

The old way to do it is based off of the idea of having a pane of glass between your eye and the object and drawing straight lines from your eye to the object to find the intersect points on the pane of glass. This pane of glass (canvas plane) has the points correctly placed.

This post contains detailed information on this perspective drawing technique and proofs for it.

http://perspectiveresources.blogspot.com/p/principles.html

No numbers are actually required, just angles and straight lines. More euclidian geometry than anything.

Note: This technique works for all shapes and rotations of shapes from a plane into perspective. To make shapes have height, that takes more work.
The short answer is that the location of the image of the far edge of the square is indeterminate. There’s a range a possibilities for its distance from the near edge’s image and without some other point of reference (such as other objects in the scene), any of them will do.  

The distance between the two edges in the image is a function of the size of the square and its position in the 3-D scene, but there’s an infinite combination of those factors that will result in the same image. Mathematically, this corresponds to the fact that every point on a ray through the origin is mapped to the same point on the image plane by a perspective projection. By the same token, if you fix the size of the square, its foreshortening in the image will increase as it moves away from the viewer.  

Of course, if you have the perspective transformation in hand and can locate the square in 3-D space, it’s a simple matter to apply the transformation to the square. Unfortunately, establishing a single vanishing point isn’t enough to determine this transformation uniquely.  

Once you’ve established an image for the square, however, there are simple techniques for locating points on it by, for instance, subdividing it. This tutorial on one-point perspective drawing illustrates the technique—see especially exercise 4. If you want to do this mathematically, there’s a fairly straightforward way to compute a planar perspective projection transformation which maps the unit square onto a given convex quadrilateral that I describe here. Doing this also requires that you first establish the image of the square in some other way, though.