If you want to draw a star shaped image..I am pretty much sure that this piece of code would really help you.
These two lines are responsible for start and endpoints:
CGContextMoveToPoint();
CGContextAddLineToPoint();
CGContextClosePath() : is used to close the current subpath of the context's path.
- (void)drawRect:(CGRect)rect
{
CGContextRef contextRef=UIGraphicsGetCurrentContext();
CGContextSetLineWidth(contextRef, 2);
CGContextSetStrokeColorWithColor(contextRef, [UIColor redColor].CGColor);
CGContextBeginPath(contextRef);
CGContextMoveToPoint(contextRef, 50.0, 440.0);
CGContextAddLineToPoint(contextRef, 100.0, 440.0);
CGContextAddLineToPoint(contextRef, 75.0, 380.0);
CGContextClosePath(contextRef);
CGContextMoveToPoint(contextRef, 50.0, 400.0);
CGContextAddLineToPoint(contextRef, 100.0, 400.0);
CGContextAddLineToPoint(contextRef, 75.0, 460.0);
CGContextClosePath(contextRef);
[[UIColor grayColor]setFill];
CGContextStrokePath(contextRef);
CGContextFillPath(contextRef);
}