De Castellau's Objective-C Algorithm

I'm not very mathematically inclined, so it would be great if someone could provide me with a sample code of the Casteljau algorithm in Objective-C. I am trying to calculate points along a curve between the start point and the end point. Basically what I am trying to do is create a view similar to UIActivityIndicatorView. I would just use images, but it should be dynamic and have any number of ticks. My plan was to draw the view in four quadrants, top-left, top-right, bottom-right, bottom-left. I was basically going to draw one quadrant and then just create that view 3 more times and apply transforms to them to complete the circle.

enter image description here

Any help would be appreciated, thanks!

+3


source to share





All Articles