I have a watermark on to the image and i want to create its shadow using php GD.how can i calculate the distance that how far is the shadow and at what position if i have only the angle and distance from the watermark
for example
$shadowAngle = 90;// in radian
$shadowDistance = 100// in % means 100 percent away from watermark
$watermark_x = 320; //width of watermark
$watermark_y = 320; //height of watermark
$watermark_Pointx = 640; // x of watermark on background Image
$watermark_Pointy = 140; // y of watermark on background Image
$shadow_Pointx = ? // x of shadow on background Image
$shadow_Pointy = ? // y of shadow on background Image
How can i calculate starting points of shadow($shadow_Pointx,$shadow_Pointy) by using $shadowAngle and $shadowdistance