|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 610 (0x262) Types: TextFile Notes: UNIX file Names: »dr.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦2d53db1df⟧ UNIX Filesystem └─⟦this⟧ »frankh/gsrc/dr.c«
#include <stdio.h> #include <math.h> int line(), clear(), clearw(); double sin(), cos(), tan(), sqrt; main() { double x1,x2,y1,y2, b,c,i,j,h,v, o1,o2,o3,o4; h = 1023.0 / 2.0; v = 800.0 / 2.0; o1 = 0; o2 = 0; o3 = 4.0; o4 = 3.0; b = 2.0 * PI; c = 0.0061; clear(); for ( o4 = 0; o4 < 10.0; o4 = o4 + 1.0) { for ( i = 0; i < b; i = i + c) { x1 = (sin( i ) + o1) * h + h; y1 = (cos( i ) + o2) * v + v; x2 = (sin( i + o3)) * h + h; y2 = (cos( i + o4)) * v + v; /* printf("x1 = %f, y1 = %f, x2 = %f, y2 = %f\n", x1,y1,x2,y2); */ line ( (int)x1,(int)y1,(int)x2,(int)y2 ); } } }