📄 jaws1.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 "jaws1.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 curve 1 ---------------------------------------------------*/ static Pfloat KnotVals1[9] = {0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 4.0, 4.0}; static Ppoint3 CtrlPts1[6] = {{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}}; static Ppoint_list3 Markers1 = {6, CtrlPts1}; static Pcurve_geom_spline Curve1 = { 3, /* spline order */ {9, KnotVals1}, /* knot vector */ 0.0, 4.0, /* low/high limits */ {PB_SPLINE_NON_RATIONAL, 6, CtrlPts1}}; /* 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 curve 1 -----------------------------------------------------*/ ppolymarker3(&Markers1); pnon_uniform_b_spline_curve3(&Curve1); 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 + -