Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DrawBSpline(int steps = 10)
- {
- Point[] points = new Point[]
- {
- new Point(0, 0),
- new Point(36, 75),
- new Point(108, 75),
- new Point(135, 0)
- };
- int[] knots = new int[] { 0, 1, 2, 3 };
- Point previous = deBoor(0, 2, 0f, knots);
- for (int i = 1; i < steps; i++)
- {
- float time = (float)i / (steps - 1);
- float t = time * (points.Length - 1);
- Point point = deBoor(0, 2, t, knots);
- //DrawLine(point, previous);
- previous = point;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement