⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringart.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
📖 第 1 页 / 共 3 页
字号:
	0.8058,0.8372,0.8660,0.8923,0.9158,0.9365,0.9544,	0.9694,0.9815,0.9905,0.9966,0.9996,0.9996,0.9966,	0.9905,0.9815,0.9694,0.9544,0.9365,0.9158,0.8923,	0.8660,0.8372,0.8058,0.7719,0.7357,0.6973,0.6568,	0.6142,0.5698,0.5237,0.4759,0.4268,0.3763,0.3247,	0.2721,0.2187,0.1646,0.1100,0.0551,0.0000,-0.0551,	-0.1100,-0.1646,-0.2187,-0.2721,-0.3247,-0.3763,-0.4268,	-0.4759,-0.5237,-0.5698,-0.6142,-0.6568,-0.6973,-0.7357,	-0.7719,-0.8058,-0.8372,-0.8660,-0.8923,-0.9158,-0.9365,	-0.9544,-0.9694,-0.9815,-0.9905,-0.9966,-0.9996,-0.9996,	-0.9966,-0.9905,-0.9815,-0.9694,-0.9544,-0.9365,-0.9158,	-0.8923,-0.8660,-0.8372,-0.8058,-0.7719,-0.7357,-0.6973,	-0.6568,-0.6142,-0.5698,-0.5237,-0.4759,-0.4268,-0.3763,	-0.3247,-0.2721,-0.2187,-0.1646,-0.1100,-0.0551,0.0000	},	{	0.0000,-0.0551,-0.1100,-0.1646,-0.2187,-0.2721,-0.3247,	-0.3763,-0.4268,-0.4759,-0.5237,-0.5698,-0.6142,-0.6568,	-0.6973,-0.7357,-0.7719,-0.8058,-0.8372,-0.8660,-0.8923,	-0.9158,-0.9365,-0.9544,-0.9694,-0.9815,-0.9905,-0.9966,	-0.9996,-0.9996,-0.9966,-0.9905,-0.9815,-0.9694,-0.9544,	-0.9365,-0.9158,-0.8923,-0.8660,-0.8372,-0.8058,-0.7719,	-0.7357,-0.6973,-0.6568,-0.6142,-0.5698,-0.5237,-0.4759,	-0.4268,-0.3763,-0.3247,-0.2721,-0.2187,-0.1646,-0.1100,	-0.0551,0.0000,0.0551,0.1100,0.1646,0.2187,0.2721,	0.3247,0.3763,0.4268,0.4759,0.5237,0.5698,0.6142,	0.6568,0.6973,0.7357,0.7719,0.8058,0.8372,0.8660,	0.8923,0.9158,0.9365,0.9544,0.9694,0.9815,0.9905,	0.9966,0.9996,0.9996,0.9966,0.9905,0.9815,0.9694,	0.9544,0.9365,0.9158,0.8923,0.8660,0.8372,0.8058,	0.7719,0.7357,0.6973,0.6568,0.6142,0.5698,0.5237,	0.4759,0.4268,0.3763,0.3247,0.2721,0.2187,0.1646,	0.1100,0.0551,0.0000,-0.0551,-0.1100,-0.1646,-0.2187,	-0.2721,-0.3247,-0.3763,-0.4268,-0.4759,-0.5237,-0.5698,	-0.6142,-0.6568,-0.6973,-0.7357,-0.7719,-0.8058,-0.8372,	-0.8660,-0.8923,-0.9158,-0.9365,-0.9544,-0.9694,-0.9815,	-0.9905,-0.9966,-0.9996,-0.9996,-0.9966,-0.9905,-0.9815,	-0.9694,-0.9544,-0.9365,-0.9158,-0.8923,-0.8660,-0.8372,	-0.8058,-0.7719,-0.7357,-0.6973,-0.6568,-0.6142,-0.5698,	-0.5237,-0.4759,-0.4268,-0.3763,-0.3247,-0.2721,-0.2187,	-0.1646,-0.1100,-0.0551,0.0000,0.0551,0.1100,0.1646,	0.2187,0.2721,0.3247,0.3763,0.4268,0.4759,0.5237,	0.5698,0.6142,0.6568,0.6973,0.7357,0.7719,0.8058,	0.8372,0.8660,0.8923,0.9158,0.9365,0.9544,0.9694,	0.9815,0.9905,0.9966,0.9996,0.9996,0.9966,0.9905,	0.9815,0.9694,0.9544,0.9365,0.9158,0.8923,0.8660,	0.8372,0.8058,0.7719,0.7357,0.6973,0.6568,0.6142,	0.5698,0.5237,0.4759,0.4268,0.3763,0.3247,0.2721,	0.2187,0.1646,0.1100,0.0551,0.0000,-0.0551,-0.1100,	-0.1646,-0.2187,-0.2721,-0.3247,-0.3763,-0.4268,-0.4759,	-0.5237,-0.5698,-0.6142,-0.6568,-0.6973,-0.7357,-0.7719,	-0.8058,-0.8372,-0.8660,-0.8923,-0.9158,-0.9365,-0.9544,	-0.9694,-0.9815,-0.9905,-0.9966,-0.9996,-0.9996,-0.9966,	-0.9905,-0.9815,-0.9694,-0.9544,-0.9365,-0.9158,-0.8923,	-0.8660,-0.8372,-0.8058,-0.7719,-0.7357,-0.6973,-0.6568,	-0.6142,-0.5698,-0.5237,-0.4759,-0.4268,-0.3763,-0.3247,	-0.2721,-0.2187,-0.1646,-0.1100,-0.0551,0.0000,0.0551,	0.1100,0.1646,0.2187,0.2721,0.3247,0.3763,0.4268,	0.4759,0.5237,0.5698,0.6142,0.6568,0.6973,0.7357,	0.7719,0.8058,0.8372,0.8660,0.8923,0.9158,0.9365,	0.9544,0.9694,0.9815,0.9905,0.9966,0.9996,0.9996,	0.9966,0.9905,0.9815,0.9694,0.9544,0.9365,0.9158,	0.8923,0.8660,0.8372,0.8058,0.7719,0.7357,0.6973,	0.6568,0.6142,0.5698,0.5237,0.4759,0.4268,0.3763,	0.3247,0.2721,0.2187,0.1646,0.1100,0.0551,0.0000	},	{	1.0000,0.9985,0.9939,0.9864,0.9758,0.9623,0.9458,	0.9265,0.9044,0.8795,0.8519,0.8218,0.7891,0.7541,	0.7168,0.6773,0.6357,0.5922,0.5469,0.5000,0.4515,	0.4017,0.3506,0.2985,0.2455,0.1917,0.1374,0.0826,	0.0276,-0.0276,-0.0826,-0.1374,-0.1917,-0.2455,-0.2985,	-0.3506,-0.4017,-0.4515,-0.5000,-0.5469,-0.5922,-0.6357,	-0.6773,-0.7168,-0.7541,-0.7891,-0.8218,-0.8519,-0.8795,	-0.9044,-0.9265,-0.9458,-0.9623,-0.9758,-0.9864,-0.9939,	-0.9985,-1.0000,-0.9985,-0.9939,-0.9864,-0.9758,-0.9623,	-0.9458,-0.9265,-0.9044,-0.8795,-0.8519,-0.8218,-0.7891,	-0.7541,-0.7168,-0.6773,-0.6357,-0.5922,-0.5469,-0.5000,	-0.4515,-0.4017,-0.3506,-0.2985,-0.2455,-0.1917,-0.1374,	-0.0826,-0.0276,0.0276,0.0826,0.1374,0.1917,0.2455,	0.2985,0.3506,0.4017,0.4515,0.5000,0.5469,0.5922,	0.6357,0.6773,0.7168,0.7541,0.7891,0.8218,0.8519,	0.8795,0.9044,0.9265,0.9458,0.9623,0.9758,0.9864,	0.9939,0.9985,1.0000,0.9985,0.9939,0.9864,0.9758,	0.9623,0.9458,0.9265,0.9044,0.8795,0.8519,0.8218,	0.7891,0.7541,0.7168,0.6773,0.6357,0.5922,0.5469,	0.5000,0.4515,0.4017,0.3506,0.2985,0.2455,0.1917,	0.1374,0.0826,0.0276,-0.0276,-0.0826,-0.1374,-0.1917,	-0.2455,-0.2985,-0.3506,-0.4017,-0.4515,-0.5000,-0.5469,	-0.5922,-0.6357,-0.6773,-0.7168,-0.7541,-0.7891,-0.8218,	-0.8519,-0.8795,-0.9044,-0.9265,-0.9458,-0.9623,-0.9758,	-0.9864,-0.9939,-0.9985,-1.0000,-0.9985,-0.9939,-0.9864,	-0.9758,-0.9623,-0.9458,-0.9265,-0.9044,-0.8795,-0.8519,	-0.8218,-0.7891,-0.7541,-0.7168,-0.6773,-0.6357,-0.5922,	-0.5469,-0.5000,-0.4515,-0.4017,-0.3506,-0.2985,-0.2455,	-0.1917,-0.1374,-0.0826,-0.0276,0.0276,0.0826,0.1374,	0.1917,0.2455,0.2985,0.3506,0.4017,0.4515,0.5000,	0.5469,0.5922,0.6357,0.6773,0.7168,0.7541,0.7891,	0.8218,0.8519,0.8795,0.9044,0.9265,0.9458,0.9623,	0.9758,0.9864,0.9939,0.9985,1.0000,0.9985,0.9939,	0.9864,0.9758,0.9623,0.9458,0.9265,0.9044,0.8795,	0.8519,0.8218,0.7891,0.7541,0.7168,0.6773,0.6357,	0.5922,0.5469,0.5000,0.4515,0.4017,0.3506,0.2985,	0.2455,0.1917,0.1374,0.0826,0.0276,-0.0276,-0.0826,	-0.1374,-0.1917,-0.2455,-0.2985,-0.3506,-0.4017,-0.4515,	-0.5000,-0.5469,-0.5922,-0.6357,-0.6773,-0.7168,-0.7541,	-0.7891,-0.8218,-0.8519,-0.8795,-0.9044,-0.9265,-0.9458,	-0.9623,-0.9758,-0.9864,-0.9939,-0.9985,-1.0000,-0.9985,	-0.9939,-0.9864,-0.9758,-0.9623,-0.9458,-0.9265,-0.9044,	-0.8795,-0.8519,-0.8218,-0.7891,-0.7541,-0.7168,-0.6773,	-0.6357,-0.5922,-0.5469,-0.5000,-0.4515,-0.4017,-0.3506,	-0.2985,-0.2455,-0.1917,-0.1374,-0.0826,-0.0276,0.0276,	0.0826,0.1374,0.1917,0.2455,0.2985,0.3506,0.4017,	0.4515,0.5000,0.5469,0.5922,0.6357,0.6773,0.7168,	0.7541,0.7891,0.8218,0.8519,0.8795,0.9044,0.9265,	0.9458,0.9623,0.9758,0.9864,0.9939,0.9985,1.0000	},	{	-1.0000,-0.9985,-0.9939,-0.9864,-0.9758,-0.9623,-0.9458,	-0.9265,-0.9044,-0.8795,-0.8519,-0.8218,-0.7891,-0.7541,	-0.7168,-0.6773,-0.6357,-0.5922,-0.5469,-0.5000,-0.4515,	-0.4017,-0.3506,-0.2985,-0.2455,-0.1917,-0.1374,-0.0826,	-0.0276,0.0276,0.0826,0.1374,0.1917,0.2455,0.2985,	0.3506,0.4017,0.4515,0.5000,0.5469,0.5922,0.6357,	0.6773,0.7168,0.7541,0.7891,0.8218,0.8519,0.8795,	0.9044,0.9265,0.9458,0.9623,0.9758,0.9864,0.9939,	0.9985,1.0000,0.9985,0.9939,0.9864,0.9758,0.9623,	0.9458,0.9265,0.9044,0.8795,0.8519,0.8218,0.7891,	0.7541,0.7168,0.6773,0.6357,0.5922,0.5469,0.5000,	0.4515,0.4017,0.3506,0.2985,0.2455,0.1917,0.1374,	0.0826,0.0276,-0.0276,-0.0826,-0.1374,-0.1917,-0.2455,	-0.2985,-0.3506,-0.4017,-0.4515,-0.5000,-0.5469,-0.5922,	-0.6357,-0.6773,-0.7168,-0.7541,-0.7891,-0.8218,-0.8519,	-0.8795,-0.9044,-0.9265,-0.9458,-0.9623,-0.9758,-0.9864,	-0.9939,-0.9985,-1.0000,-0.9985,-0.9939,-0.9864,-0.9758,	-0.9623,-0.9458,-0.9265,-0.9044,-0.8795,-0.8519,-0.8218,	-0.7891,-0.7541,-0.7168,-0.6773,-0.6357,-0.5922,-0.5469,	-0.5000,-0.4515,-0.4017,-0.3506,-0.2985,-0.2455,-0.1917,	-0.1374,-0.0826,-0.0276,0.0276,0.0826,0.1374,0.1917,	0.2455,0.2985,0.3506,0.4017,0.4515,0.5000,0.5469,	0.5922,0.6357,0.6773,0.7168,0.7541,0.7891,0.8218,	0.8519,0.8795,0.9044,0.9265,0.9458,0.9623,0.9758,	0.9864,0.9939,0.9985,1.0000,0.9985,0.9939,0.9864,	0.9758,0.9623,0.9458,0.9265,0.9044,0.8795,0.8519,	0.8218,0.7891,0.7541,0.7168,0.6773,0.6357,0.5922,	0.5469,0.5000,0.4515,0.4017,0.3506,0.2985,0.2455,	0.1917,0.1374,0.0826,0.0276,-0.0276,-0.0826,-0.1374,	-0.1917,-0.2455,-0.2985,-0.3506,-0.4017,-0.4515,-0.5000,	-0.5469,-0.5922,-0.6357,-0.6773,-0.7168,-0.7541,-0.7891,	-0.8218,-0.8519,-0.8795,-0.9044,-0.9265,-0.9458,-0.9623,	-0.9758,-0.9864,-0.9939,-0.9985,-1.0000,-0.9985,-0.9939,	-0.9864,-0.9758,-0.9623,-0.9458,-0.9265,-0.9044,-0.8795,	-0.8519,-0.8218,-0.7891,-0.7541,-0.7168,-0.6773,-0.6357,	-0.5922,-0.5469,-0.5000,-0.4515,-0.4017,-0.3506,-0.2985,	-0.2455,-0.1917,-0.1374,-0.0826,-0.0276,0.0276,0.0826,	0.1374,0.1917,0.2455,0.2985,0.3506,0.4017,0.4515,	0.5000,0.5469,0.5922,0.6357,0.6773,0.7168,0.7541,	0.7891,0.8218,0.8519,0.8795,0.9044,0.9265,0.9458,	0.9623,0.9758,0.9864,0.9939,0.9985,1.0000,0.9985,	0.9939,0.9864,0.9758,0.9623,0.9458,0.9265,0.9044,	0.8795,0.8519,0.8218,0.7891,0.7541,0.7168,0.6773,	0.6357,0.5922,0.5469,0.5000,0.4515,0.4017,0.3506,	0.2985,0.2455,0.1917,0.1374,0.0826,0.0276,-0.0276,	-0.0826,-0.1374,-0.1917,-0.2455,-0.2985,-0.3506,-0.4017,	-0.4515,-0.5000,-0.5469,-0.5922,-0.6357,-0.6773,-0.7168,	-0.7541,-0.7891,-0.8218,-0.8519,-0.8795,-0.9044,-0.9265,	-0.9458,-0.9623,-0.9758,-0.9864,-0.9939,-0.9985,-1.0000	}		};main(argc,argv)	int argc;	char *argv[];{	int i,j,k,l,m;	int quick_flag;	int counter,counter_limit;	quick_flag=quick_test(argc,argv);	get_view_surface(our_surface,argv);	our_surface->cmapsize = 128;	our_surface->cmapname[0] = '\0';	if(initialize_core(BASIC, SYNCHRONOUS, TWOD))		exit(1);	initialize_device(KEYBOARD, 1);	if(initialize_view_surface(our_surface,FALSE))		exit(2);	if(select_view_surface(our_surface))		exit(3);	set_window(-1.1,1.1,-1.1,1.1);	make_maps();	srand(getpid());	create_temporary_segment();	if(quick_flag)		counter_limit=12;	else		counter_limit=1000000;	for(counter=0;counter<counter_limit;counter++) {tryagain:		i=(rand()>>5)%NUM_FUNCTIONS;		j=(rand()>>5)%NUM_FUNCTIONS;		k=(rand()>>5)%NUM_FUNCTIONS;		l=(rand()>>5)%NUM_FUNCTIONS;		if ( (i == j) || (k == l) || ((i == l) && (k == j)) )			goto tryagain;		/* only do NUMLINES-1 lines ... dont redraw first line */		for(m=0;m<NUMLINES-1;m++) {			set_line_index(m/3 + 1);			move_abs_2(function[i][m],function[k][m]);			line_abs_2(function[j][m],function[l][m]);		}		sleep(4);		new_frame();	}	close_temporary_segment();	deselect_view_surface(our_surface);	terminate_core();	return 0;}int quick_test(argc,argv) int argc; char *argv[];	{	while (--argc > 0) {		if(!strncmp(argv[argc],"-q",2))			return(TRUE);		}	return(FALSE);	}make_maps(){	int i;	red[0] = 0.0;				/* background color */	grn[0] = 0.0;	blu[0] = 0.0;	for (i=0; i<19; i++) {		red[i +   1] = 0.99;		/* ramp to yellow */		grn[i +   1] = 0.055*i;		blu[i +   1] = 0.0;		red[i +  20] = 0.99-0.055*i;	/* ramp to green */		grn[i +  20] = 0.99;		blu[i +  20] = 0.0;		red[i +  39] = 0.0;		/* ramp to turqouise */		grn[i +  39] = 0.99;		blu[i +  39] = 0.055*i;		red[i +  58] = 0.0;		/* ramp to blue */		grn[i +  58] = 0.99-0.055*i;		blu[i +  58] = 0.99;		red[i +  77] = 0.055*i;		/* ramp to violet */		grn[i +  77] = 0.0;		blu[i +  77] = 0.99;		red[i +  96] = 0.99;		/* ramp to red */		grn[i +  96] = 0.0;		blu[i +  96] = 0.99-0.055*i;	}	define_color_indices(our_surface,0,MAPSIZE,red,grn,blu);} /* end of make_maps() */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -