Problems about leverage length changes
At runtime, I think the length of the connection circle and the rectangular lever is unchanged.
#include #include #define pi 3.1415926 # Define a 50 # define b 180INT main () {Double A, B, C, X = 230, y = 200, file1 = 0, CX , BX, By; Int GDriver, Gmode, E, I, K; GDriver = Detect; / * RegisterBgidriver; * / Initgraph (& gdriver, & gmode, ""); setbkcolor (2); cleardEvice (); do { File1 = 5; a = a * COS (file1 * pi / 180); b = a * sin (file1 * pi / 180); c = (double) SQRT (B * BB * b); bx = 400-a * COS (file1 * pi / 180); BY = 300-a * sin (file1 * pi / 180); CX = BX-ac; setColor (4); line (CX, 300, BX, by); line (BX, BY, 400, 300); Rectangle (CX-20, 290, CX 20, 310); Circle (400, 300, 50); Circle (400, 300, 2); Circle (CX, 300, 2); Circle (BX, BY, 2); LINE 80, 311, 345, 311); {Line (400, 300, 390, 311); LINE (400, 300, 410, 311); Line (380, 311, 422, 311);} for (k = 0; k <= 40; k = 5) line (383 K, 311, 379 K, 315); for E = 0; E <= 260; E = 5) LINE (86 E, 311, 81 E, 315); PUT_TEXT ((int) x, (int) y getmaxy () / 3); / * CLS * / Delay (20000); setColor (0); line (400, 300, bx, by); line (CX, 300, BX, BY); Rectangle (CX-20, 290, CX 20, 310); Circle (CX, 300, 2 ); Circle (bx, by, 2);} while (! Kbhit ()); getch (); Closegraph (); Return 0;
INT PUT_TEXT (X0, Y0) INT X0, Y0; {Char * S1; S1 = "0148 2002-12-06"; setTextStyle (1, 0, 5); setColor (Blue); OutTextxy (x0-6 * 8 * 3, Y0, S1); OUTTEXTXY (X0-6 * 8 * 3 1, Y0 1, S1); Outtextxy (X0-6 * 8 * 3 2, Y0 2, S1); Outtextxy (X0-6 * 8 * 3 3, Y0 3, S1);