DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦376cf32e7⟧ TextFile

    Length: 378 (0x17a)
    Types: TextFile
    Notes: UNIX file
    Names: »decay.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »frankh/gsrc/decay.c« 

TextFile

#include	<stdio.h>
#include	<math.h>

double	line(),
	point(),
	sin(),
	clear();

main()
{
	int y;
	double x, xx;

	clear();
	axis();

	for (x = -500.0; x < 500.0; x = x + 0.45) {
		xx = x / 5.0;
/*		y = (int)(sqrt(sin(xx) * cos(xx)) * 399.0);	*/
		y = (int)((sin(xx) * (x/6)) * 4.0);
		plot( (int)x, y);
	}
}

plot(x,y)
int x,y;
{
	x = x + 511;
	y = y + 399;
	point( x, y);

}