'================================================= 'Better Propeller Beanie 2.0 'by T.Whitfield Stodghill, III 'February 4, 2011 '================================================= ' 'Load program and place pen in pen port. Press the 'reset button to run program. S2 will scribble the 'Propeller Beanie. This is a revision of Propeller 'Beanie 1.0 with smooth curves. ' CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 OBJ s2 : "s2" PUB start s2.start 'Start the S2 object s2.start_motors 'Start the motor cog. s2.button_mode(true, true) 'Set button mode to display in LEDs and to reset. s2.set_led(s2#POWER, s2#BLUE) 'Turn on the power LED. s2.set_wheel_calibration(s2#DEFAULT_FULL_CIRCLE -13, s2#DEFAULT_WHEEL_SPACE) 'Per Phil Pilgirm (may vary) if (s2.reset_button_count) 'Do only if reset was via a button, rather than powerup. s2.set_speed(7) 'Set speed to 50%. s2.here_is(0, 60) 'Start at lower left top of band point s2.begin_path 'Begin a smooth drawing path. s2.arc_to(300, 360, -300) 'Curve upward with a radius of 300 for outside left of beanie s2.move_to(320, 360) 'Move to far right of prop stem s2.move_to(320, 380) 'Move up right side of prop stem s2.arc_to(340, 400, 20) 'Curve up bottom right side of stem ball, radius 20 s2.move_to(560, 380) 'Draw bottom right prop blade s2.arc_to(560, 440, 30) 'Curve up for the right end of prop blade, radius 30 s2.move_to(340, 420) 'Return to right side of stem ball s2.arc_to(320, 440, 20) 'Curve up top right side of stem ball, radius 20 s2.move_to(310, 440) 'Draw middle of top of stem ball s2.arc_to(310, 460, -10) 'Curve up to top of top stem ball s2.arc_to(310, 440, -10) 'Curve down to bot of top stem ball s2.move_to(300, 440) 'Move to left top of stem ball s2.arc_to(280, 420, 20) 'Curve down left top side of stem ball, radius 20 s2.move_to(60, 440) 'Draw top of left prop blade s2.arc_to(60, 380, 30) 'Curve down for the left end of prop blade, radius 30 s2.move_to(280, 400) 'Return to left side of stem ball s2.arc_to(300, 380, 20) 'Curve down left top side of stem ball, radius 20 s2.move_to(300, 360) 'Move down bot left of stem ball s2.move_to(320, 360) 'Move to right top side of prop beanie (retrace) s2.arc_to(620, 60, -300) 'Curve downward with a radius of 300 for outside right of beanie s2.arc_to(310, 0, -826) 'Curve down right bot of beanie to center, radius 826 (back edge) s2.arc_to(0, 60, -826) 'Curve up left bot of beanie to home, radius 826 (back edge) s2.arc_to(310, 120, -826) 'Curve up left bot of beanie to center, radius 826 (front edge) s2.arc_to(620, 60, -826) 'Curve down right of beanie bot to lower right corner (front edge) s2.arc_to(615, 100, 300) 'Curve back up right outside of beanie, radius 300 s2.arc_to(567, 125, 860) 'Curve up far right top of band, radius 860 s2.arc_to(320, 360, 380) 'Curve up right of right stripe to top of beanie, radius 380 s2.arc_to(515, 135, -440) 'Curve down left of right stripe to band, radius -440 s2.arc_to(373, 155, 860) 'Curve up mid right top of band, radius 860 s2.arc_to(320, 360, 620) 'Curve up right side of middle stripe, radius 620 s2.move_to(300, 360) 'Move to left side of middle stripe s2.arc_to(245, 155, 620) 'Curve down left side of middle stripe, radius 620 s2.arc_to(103, 135, 860) 'Curve down mid left top of band, radius 860 s2.arc_to(300, 360, -440) 'Curve up right side of left stripe to top of beanie, radius -440 s2.arc_to(52, 125, 380) 'Curve down left side of left strip to top of band, radius 380 s2.arc_to(0, 100, 860) 'Curve down left top of leftmost band, radius 860 s2.end_path 'End the drawing path. '---[End of Program]----------------------------------------------------------- {{ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TERMS OF USE: MIT License │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation │ │files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, │ │modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│ │is furnished to do so, subject to the following conditions: │ │ │ │The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│ │ │ │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE │ │WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR │ │COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, │ │ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ }}