If you have a right angled triangle, with adjacent(perpendicular) = p, hypotenuse = h, and base = b, then with respect to angle , the trigonometric functions are defined as:

likewise,

you have

use Pythagorean Theorem to find the base (b), and calculate the remaining trigonometric functions.

This link might be helpful:

Trigonometric functions - Wikipedia, the free encyclopedia