Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.24 KB

README.md

File metadata and controls

27 lines (19 loc) · 1.24 KB

WJMagicCurveView

By simply setting several parameters, You'll get a fancy magic curve immediately.

Let's see what it is

First

How it works

By setting eight parameters, WJMagicCurveView will draw a beautiful curve based on a math function.

First, we'll create two points and make them rotate in specified speed and specified radius revolving a same center; Second, whenever they reach a point during rotating, we'll draw a line connecting these two points; Thirds, continue rotate and draw lines, Bingo! You're creating a new beautiful curve!

How to create your own curve

We provide eight base parameters for normal users and more for developers from code level. Here are explaintion for these parameters:

  1. radiusAX、radiusAY: A point is the outer rotating point, these two are the radius of A;
  2. radiusBX、radiusBY: B point is the inner rotating point;
  3. speedOuterPoint、speedInnerPoint: the rotating speed for A & B;
  4. loopTotalCount: the loop count for these two rotating points;
  5. durationSeconds: the durationg speed for rotating.

Playable apk

Download it here and make a try!

How to use it