'=========================================================================== ' Subject: DRAW A CARTIOID Date: 12-14-98 (14:35) ' Author: Dave Navarro, Jr. Code: QB, QBasic, PDS ' Origin: dave@powerbasic.com Packet: GRAPHICS.ABC '=========================================================================== ' Draw a Cartioid ' From "Microcomputer Graphics Techniques and Applications" by Donald Hearn ' ported to PB by Dave Navarro (dave@powerbasic.com) SCREEN 12 WINDOW (-160, -120) - (160, 120) XN = 40 : YN = 0 C1 = COS(.314) : S1 = SIN(.314) FOR I = 1 TO 10 T = XN*C1 - YN*S1 YN = XN*S1 + YNC1 : XN = T RAD = SQR((XN - 40)^2 + YN ^ 2) CIRCLE (XN, YN), RAD YL = - YN CIRCLE (XN, YL), RAD NEXT SLEEP