From f16fed3d50fd3d56deb46a3d4641a81460e389de Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 12 Dec 2018 09:20:10 -0500 Subject: Update Chickadee manual and home page for 0.3.0. Better late than never! --- manuals/chickadee/Bezier-Curves.html | 174 +++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 manuals/chickadee/Bezier-Curves.html (limited to 'manuals/chickadee/Bezier-Curves.html') diff --git a/manuals/chickadee/Bezier-Curves.html b/manuals/chickadee/Bezier-Curves.html new file mode 100644 index 0000000..6a49b59 --- /dev/null +++ b/manuals/chickadee/Bezier-Curves.html @@ -0,0 +1,174 @@ + + + + + + +Bezier Curves (The Chickadee Game Toolkit) + + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: Math   [Contents][Index]

+
+
+ +

2.2.8 Bezier Curves

+ +

The (chickadee math bezier) module provides an API for +describing cubic Bezier curves in 2D space. These curves are notably +used in font description, vector graphics programs, and when it comes +to games: path building. With Bezier curves, it’s somewhat easy to +create a smooth looking path for an enemy to move along, for example. +Bezier curves become particularly interesting when they are chained +together to form a Bezier “path”, where the end point of one curve +becomes the starting point of the next. +

+

Currently, the rendering of Bezier curves is rather crude and provided +mostly for visualizing and debugging curves that would be unseen in +the final game. See See Lines and Shapes for more information. +

+
+
Procedure: make-bezier-curve p0 p1 p2 p3
+

Return a new Bezier curve object whose starting point is p0, +ending point is p3, and control points are p1 and +p2. All points are 2D vectors. +

+ +
+
Procedure: bezier-curve? obj
+

Return #t if obj is a Bezier curve. +

+ +
+
Procedure: bezier-curve-p0 bezier
+

Return the starting point of bezier. +

+ +
+
Procedure: bezier-curve-p1 bezier
+

Return the first control point of bezier. +

+ +
+
Procedure: bezier-curve-p2 bezier
+

Return the second control point of bezier. +

+ +
+
Procedure: bezier-curve-p3 bezier
+

Return the end point of bezier. +

+ +
+
Procedure: bezier-path . control-points
+

Return a list of connected bezier curves defined by +control-points. The first curve is defined by the first 4 +arguments and every additional curve thereafter requires 3 additional +arguments. +

+ +
+
Procedure: bezier-curve-point-at bezier t
+

Return the coordinates for bezier at t (a value in the +range [0, 1] representing how far from the start of the curve to +check) as a 2D vector. +

+ +
+
Procedure: bezier-curve-point-at! dest bezier t
+

Modify the 2D vector dest in-place to contain the coordinates +for bezier at t. +

+ +
+
+

+Next: , Previous: , Up: Math   [Contents][Index]

+
+ + + + + -- cgit v1.2.3