here is a code draft for pl/python, it's just the basic idea of translating the points by a given distance and azimuth.
To run postgis functions in pl/python the only solution that I found is to use plpy.prepare and plpy.execute (very boring).