Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Master.cpp@35:a4e89e78d034, 2013-11-24 (annotated)
- Committer:
- Sparker
- Date:
- Sun Nov 24 20:18:17 2013 +0000
- Revision:
- 35:a4e89e78d034
- Parent:
- 28:21773a6fb6df
- Child:
- 37:bf257a0154db
With inverse kinematics;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
calamaridudeman | 23:112c0be5a7f3 | 1 | #include "mbed.h" |
Sparker | 35:a4e89e78d034 | 2 | #include "include/zgeom.hpp" |
calamaridudeman | 22:4d85d989af08 | 3 | |
calamaridudeman | 23:112c0be5a7f3 | 4 | Serial pc(USBTX, USBRX); |
calamaridudeman | 23:112c0be5a7f3 | 5 | |
Sparker | 35:a4e89e78d034 | 6 | int main() { |
calamaridudeman | 25:8a34b8d6cc6e | 7 | |
Sparker | 35:a4e89e78d034 | 8 | Point p1(1,2,3); |
Sparker | 35:a4e89e78d034 | 9 | Point p2(2,2,3); |
Sparker | 35:a4e89e78d034 | 10 | |
Sparker | 35:a4e89e78d034 | 11 | Line l1(p1,p2); |
Sparker | 35:a4e89e78d034 | 12 | |
Sparker | 35:a4e89e78d034 | 13 | Point p3(3,2,3); |
Sparker | 35:a4e89e78d034 | 14 | |
Sparker | 35:a4e89e78d034 | 15 | Point bLine[3] = {p1,p2,p3}; |
Sparker | 35:a4e89e78d034 | 16 | |
Sparker | 35:a4e89e78d034 | 17 | BezCurve b(bLine, sizeof(bLine)/sizeof(Point)); |
Sparker | 35:a4e89e78d034 | 18 | |
Sparker | 35:a4e89e78d034 | 19 | b.setAdot(.025); |
Sparker | 35:a4e89e78d034 | 20 | b.startCurve(); |
calamaridudeman | 23:112c0be5a7f3 | 21 | |
calamaridudeman | 23:112c0be5a7f3 | 22 | while(1){ |
Sparker | 35:a4e89e78d034 | 23 | pc.printf("%f\n",b.newPoint().x); |
Sparker | 35:a4e89e78d034 | 24 | wait(2); |
calamaridudeman | 23:112c0be5a7f3 | 25 | } |
calamaridudeman | 22:4d85d989af08 | 26 | } |