Google Classroom
GeoGebraGeoGebra Klaslokaal

move triangle in triangle

I would like to limit P onto green triangle d1 so I can drag the red triangle at point P freely until it fits into the green triangle at C. The problem is, that the green triangle d1 is derived from the shape of the red triangle. I first want to set the shape of the red triangle, then it should be draggable exactly between A and B.