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

📄 jawsall.c

📁 Intro/: Directory containing introductory examples. HelloWorld.c A simple program that draws a bo
💻 C
字号:
#include <phigs.h>			/* get HP-PHIGS definitions for C */#include <stdio.h>			/* get standard I/O definitions */#include <math.h>			/* link with library "-lm" */main()					/* file "JawsAll.c" */{    Pint		WorkstnID = 1;		/* workstation identifier */    Pint		ConnID;			/* connection identifier */    Pint		WorkstnType = POIDDX;	/* out/in, dir, dbl bfr, X */    Pint		TheStructure = 1;	/* structure ID */    /*--- define combined curve --------------------------------------------*/    static Pfloat	KnotVals[16] = {0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0,	4.0, 5.0, 5.0, 6.0, 7.0, 7.0, 8.0, 8.0, 8.0};    static Ppoint3	CtrlPts[13] = {{0.1, 0.1, 0.0}, {0.7, 0.1, 0.0},	{0.9, 0.1, 0.0},   {0.9, 0.3, 0.0},  {0.7, 0.3, 0.0}, {0.6, 0.3, 0.0},	{0.55, 0.25, 0.0}, {0.5, 0.2, 0.0},  {0.2, 0.2, 0.0}, {0.12, 0.2, 0.0},	{0.1, 0.3, 0.0},   {0.07, 0.2, 0.0}, {0.1, 0.1, 0.0}};    static Ppoint_list3	Markers = {13, CtrlPts};    static Pcurve_geom_spline	Curve = {	3,					/* spline order */	{16, KnotVals},				/* knot vector */	0.0, 8.0,				/* low/high limits */	{PB_SPLINE_NON_RATIONAL, 13, CtrlPts}};	/* list of control points */    popen_phigs((char *) stderr, 0);	/* errors go to "stderr" */    pescape_u4("/dev/screen/phigs_window", &ConnID);    popen_ws(WorkstnID, (void *) ConnID, WorkstnType);    popen_struct(TheStructure);    pset_marker_type(PMARKER_ASTERISK);    pset_marker_size(4.0);    /*--- draw combined curve ----------------------------------------------*/    ppolymarker3(&Markers);    pnon_uniform_b_spline_curve3(&Curve);    pclose_struct();    ppost_struct(WorkstnID, TheStructure, 1.0);    pupd_ws(WorkstnID, PFLAG_PERFORM);	/* (regeneration flag) */    pclose_ws(WorkstnID);    pclose_phigs();}

⌨️ 快捷键说明

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