Sine CAShapeLayer as a mask of CALayer
问题 I'm trying to implement the next curious thing: I have a few dots and I'd like to link them with sine waves Next method returns the array of dots for making plot: - (NSArray *)plotPointsBetweenPoint:(CGPoint)pointA andPoint:(CGPoint)pointB { double H = fabs(pointB.y - pointA.y); double L = fabs(pointB.x - pointA.x); NSInteger granularity = 40; NSMutableArray *array = [NSMutableArray arrayWithCapacity:granularity + 1]; for (int i = 0; i <= granularity; ++i) { CGFloat x = M_PI*(float)i/