morph3d.pp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. {
  2. $Id$
  3. *-
  4. * morph3d.c - Shows 3D morphing objects
  5. *
  6. * Converted to GLUT by brianp on 1/1/98
  7. * Converted to FreePascal by Peter Vreman on 9/3/2000
  8. *
  9. * This program was inspired on a WindowsNT(R)'s screen saver. It was written
  10. * from scratch and it was not based on any other source code.
  11. *
  12. * Porting it to xlock (the final objective of this code since the moment I
  13. * decided to create it) was possible by comparing the original Mesa's gear
  14. * demo with it's ported version, so thanks for Danny Sung for his indirect
  15. * help (look at gear.c in xlock source tree). NOTE: At the moment this code
  16. * was sent to Brian Paul for package inclusion, the XLock Version was not
  17. * available. In fact, I'll wait it to appear on the next Mesa release (If you
  18. * are reading this, it means THIS release) to send it for xlock package
  19. * inclusion). It will probably there be a GLUT version too.
  20. *
  21. * Thanks goes also to Brian Paul for making it possible and inexpensive
  22. * to use OpenGL at home. *
  23. * Since I'm not a native english speaker, my apologies for any gramatical
  24. * mistake.
  25. *
  26. * My e-mail addresses are
  27. *
  28. * [email protected]
  29. * and
  30. * [email protected]
  31. *
  32. * Marcelo F. Vianna (Feb-13-1997)
  33. */
  34. }
  35. program morph3d;
  36. {$Mode objfpc}
  37. {$INLINE ON}
  38. {$MACRO ON}
  39. {$ifdef win32}
  40. {$define extdecl := stdcall;}
  41. {$endif}
  42. {$ifdef linux}
  43. {$define extdecl := cdecl;}
  44. {$endif}
  45. {
  46. This document is VERY incomplete, but tries to describe the mathematics used
  47. in the program. At this moment it just describes how the polyhedra are
  48. generated. On futhurer versions, this document will be probabbly improved.
  49. Since I'm not a native english speaker, my apologies for any gramatical
  50. mistake.
  51. Marcelo Fernandes Vianna
  52. - Undergraduate in Computer Engeneering at Catholic Pontifical University
  53. - of Rio de Janeiro (PUC-Rio) Brasil.
  54. - e-mail: [email protected] or [email protected]
  55. - Feb-13-1997
  56. POLYHEDRA GENERATION
  57. For the purpose of this program it's not sufficient to know the polyhedra
  58. vertexes coordinates. Since the morphing algorithm applies a nonlinear
  59. transformation over the surfaces (faces) of the polyhedron, each face has
  60. to be divided into smaller ones. The morphing algorithm needs to transform
  61. each vertex of these smaller faces individually. It's a very time consoming
  62. task.
  63. In order to reduce calculation overload, and since all the macro faces of
  64. the polyhedron are transformed by the same way, the generation is made by
  65. creating only one face of the polyhedron, morphing it and then rotating it
  66. around the polyhedron center.
  67. What we need to know is the face radius of the polyhedron (the radius of
  68. the inscribed sphere) and the angle between the center of two adjacent
  69. faces using the center of the sphere as the angle's vertex.
  70. The face radius of the regular polyhedra are known values which I decided
  71. to not waste my time calculating. Following is a table of face radius for
  72. the regular polyhedra with edge length = 1:
  73. TETRAHEDRON : 1/(2*sqrt(2))/sqrt(3)
  74. CUBE : 1/2
  75. OCTAHEDRON : 1/sqrt(6)
  76. DODECAHEDRON : T^2 * sqrt((T+2)/5) / 2 -> where T=(sqrt(5)+1)/2
  77. ICOSAHEDRON : (3*sqrt(3)+sqrt(15))/12
  78. I've not found any reference about the mentioned angles, so I needed to
  79. calculate them, not a trivial task until I figured out how :)
  80. Curiously these angles are the same for the tetrahedron and octahedron.
  81. A way to obtain this value is inscribing the tetrahedron inside the cube
  82. by matching their vertexes. So you'll notice that the remaining unmatched
  83. vertexes are in the same straight line starting in the cube/tetrahedron
  84. center and crossing the center of each tetrahedron's face. At this point
  85. it's easy to obtain the bigger angle of the isosceles triangle formed by
  86. the center of the cube and two opposite vertexes on the same cube face.
  87. The edges of this triangle have the following lenghts: sqrt(2) for the base
  88. and sqrt(3)/2 for the other two other edges. So the angle we want is:
  89. +-----------------------------------------------------------+
  90. | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees |
  91. +-----------------------------------------------------------+
  92. For the cube this angle is obvious, but just for formality it can be
  93. easily obtained because we also know it's isosceles edge lenghts:
  94. sqrt(2)/2 for the base and 1/2 for the other two edges. So the angle we
  95. want is:
  96. +-----------------------------------------------------------+
  97. | 2*ARCSIN((sqrt(2)/2)/1) = 90.000000000000000000 degrees |
  98. +-----------------------------------------------------------+
  99. For the octahedron we use the same idea used for the tetrahedron, but now
  100. we inscribe the cube inside the octahedron so that all cubes's vertexes
  101. matches excatly the center of each octahedron's face. It's now clear that
  102. this angle is the same of the thetrahedron one:
  103. +-----------------------------------------------------------+
  104. | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees |
  105. +-----------------------------------------------------------+
  106. For the dodecahedron it's a little bit harder because it's only relationship
  107. with the cube is useless to us. So we need to solve the problem by another
  108. way. The concept of Face radius also exists on 2D polygons with the name
  109. Edge radius:
  110. Edge Radius For Pentagon (ERp)
  111. ERp = (1/2)/TAN(36 degrees) * VRp = 0.6881909602355867905
  112. (VRp is the pentagon's vertex radio).
  113. Face Radius For Dodecahedron
  114. FRd = T^2 * sqrt((T+2)/5) / 2 = 1.1135163644116068404
  115. Why we need ERp? Well, ERp and FRd segments forms a 90 degrees angle,
  116. completing this triangle, the lesser angle is a half of the angle we are
  117. looking for, so this angle is:
  118. +-----------------------------------------------------------+
  119. | 2*ARCTAN(ERp/FRd) = 63.434948822922009981 degrees |
  120. +-----------------------------------------------------------+
  121. For the icosahedron we can use the same method used for dodecahedron (well
  122. the method used for dodecahedron may be used for all regular polyhedra)
  123. Edge Radius For Triangle (this one is well known: 1/3 of the triangle height)
  124. ERt = sin(60)/3 = sqrt(3)/6 = 0.2886751345948128655
  125. Face Radius For Icosahedron
  126. FRi= (3*sqrt(3)+sqrt(15))/12 = 0.7557613140761707538
  127. So the angle is:
  128. +-----------------------------------------------------------+
  129. | 2*ARCTAN(ERt/FRi) = 41.810314895778596167 degrees |
  130. +-----------------------------------------------------------+
  131. }
  132. uses
  133. GL,GLUT;
  134. type
  135. float = single;
  136. const
  137. Scale = 0.3;
  138. // #define sqr(A) ((A)*(A))
  139. // Increasing this values produces better image quality, the price is speed.
  140. // Very low values produces erroneous/incorrect plotting
  141. tetradivisions = 23;
  142. cubedivisions = 20;
  143. octadivisions = 21;
  144. dodecadivisions = 10;
  145. icodivisions = 15;
  146. tetraangle = 109.47122063449069174;
  147. cubeangle = 90.000000000000000000;
  148. octaangle = 109.47122063449069174;
  149. dodecaangle = 63.434948822922009981;
  150. icoangle = 41.810314895778596167;
  151. //#define Pi 3.1415926535897932385
  152. SQRT2 = 1.4142135623730951455;
  153. SQRT3 = 1.7320508075688771932;
  154. SQRT5 = 2.2360679774997898051;
  155. SQRT6 = 2.4494897427831778813;
  156. SQRT15 = 3.8729833462074170214;
  157. cossec36_2 = 0.8506508083520399322;
  158. cos72 = 0.3090169943749474241;
  159. sin72 = 0.9510565162951535721;
  160. cos36 = 0.8090169943749474241;
  161. sin36 = 0.5877852522924731292;
  162. {*************************************************************************}
  163. const
  164. mono : boolean=false;
  165. smooth : boolean=true;
  166. var
  167. WindH,WindW : GLint;
  168. step,seno : GLFloat;
  169. _object : glint;
  170. edgedivisions : glint;
  171. draw_object : procedure;
  172. Magnitude : glfloat;
  173. MaterialColor : array[0..19] of pglfloat;
  174. const
  175. front_shininess : array[0..0] of glfloat = (60.0);
  176. front_specular : array[0..3] of glfloat = ( 0.7, 0.7, 0.7, 1.0 );
  177. ambient : array[0..3] of glfloat = ( 0.0, 0.0, 0.0, 1.0 );
  178. diffuse : array[0..3] of glfloat = ( 1.0, 1.0, 1.0, 1.0 );
  179. position0 : array[0..3] of glfloat = ( 1.0, 1.0, 1.0, 0.0 );
  180. position1 : array[0..3] of glfloat = (-1.0,-1.0, 1.0, 0.0 );
  181. lmodel_ambient : array[0..3] of glfloat = ( 0.5, 0.5, 0.5, 1.0 );
  182. lmodel_twoside : array[0..0] of glfloat = (GL_TRUE);
  183. MaterialRed : array[0..3] of glfloat = ( 0.7, 0.0, 0.0, 1.0 );
  184. MaterialGreen : array[0..3] of glfloat = ( 0.1, 0.5, 0.2, 1.0 );
  185. MaterialBlue : array[0..3] of glfloat = ( 0.0, 0.0, 0.7, 1.0 );
  186. MaterialCyan : array[0..3] of glfloat = ( 0.2, 0.5, 0.7, 1.0 );
  187. MaterialYellow : array[0..3] of glfloat = ( 0.7, 0.7, 0.0, 1.0 );
  188. MaterialMagenta : array[0..3] of glfloat = ( 0.6, 0.2, 0.5, 1.0 );
  189. MaterialWhite : array[0..3] of glfloat = ( 0.7, 0.7, 0.7, 1.0 );
  190. MaterialGray : array[0..3] of glfloat = ( 0.2, 0.2, 0.2, 1.0 );
  191. procedure VectMul(X1,Y1,Z1,X2,Y2,Z2:GLFloat);inline;
  192. begin
  193. glNormal3f((Y1)*(Z2)-(Z1)*(Y2),(Z1)*(X2)-(X1)*(Z2),(X1)*(Y2)-(Y1)*(X2));
  194. end;
  195. procedure TRIANGLE(Edge,Amp:GLFloat; Divisions: longint; Z:GLFloat);
  196. var
  197. Xf,Yf,Xa,Yb,Xf2,Yf2 : GLfloat;
  198. Factor,Factor1,Factor2 : GLfloat;
  199. VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ : GLfloat;
  200. Ax,Ay,Bx : GLfloat;
  201. Ri,Ti : longint;
  202. Vr : GLfloat;
  203. AmpVr2 : GLfloat;
  204. Zf : GLfloat;
  205. begin
  206. Vr:=(Edge)*SQRT3/3;
  207. AmpVr2:=(Amp)/sqr(Vr);
  208. Zf:=(Edge)*(Z);
  209. Ax:=(Edge)*(+0.5/(Divisions));
  210. Ay:=(Edge)*(-SQRT3/(2*Divisions));
  211. Bx:=(Edge)*(-0.5/(Divisions));
  212. for Ri:=1 to Divisions do
  213. begin
  214. glBegin(GL_TRIANGLE_STRIP);
  215. for Ti:=0 to Ri-1 do
  216. begin
  217. Xf:=(Ri-Ti)*Ax + Ti*Bx;
  218. Yf:=Vr+(Ri-Ti)*Ay + Ti*Ay;
  219. Xa:=Xf+0.001; Yb:=Yf+0.001;
  220. Xf2:=sqr(Xf);
  221. Yf2:=sqr(Yf);
  222. Factor:=1-(((Xf2)+(Yf2))*AmpVr2);
  223. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  224. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  225. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  226. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  227. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  228. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  229. glVertex3f(VertX, VertY, VertZ);
  230. Xf:=(Ri-Ti-1)*Ax + Ti*Bx;
  231. Yf:=Vr+(Ri-Ti-1)*Ay + Ti*Ay;
  232. Xa:=Xf+0.001; Yb:=Yf+0.001;
  233. Xf2:=sqr(Xf);
  234. Yf2:=sqr(Yf);
  235. Factor:=1-(((Xf2)+(Yf2))*AmpVr2);
  236. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  237. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  238. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  239. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  240. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  241. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  242. glVertex3f(VertX, VertY, VertZ);
  243. end;
  244. Xf:=Ri*Bx;
  245. Yf:=Vr+Ri*Ay;
  246. Xa:=Xf+0.001; Yb:=Yf+0.001;
  247. Xf2:=sqr(Xf);
  248. Yf2:=sqr(Yf);
  249. Factor:=1-((Xf2+Yf2)*AmpVr2);
  250. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  251. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  252. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  253. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  254. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  255. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  256. glVertex3f(VertX, VertY, VertZ);
  257. glEnd();
  258. end;
  259. end;
  260. procedure SQUARE(Edge,Amp:GLFloat; Divisions: longint; Z:GLFloat);
  261. var
  262. Xi,Yi : longint;
  263. Xf,Yf,Y,Y2,Xf2,Yf2,Xa,Yb : GLfloat;
  264. Factor,Factor1,Factor2 : GLfloat;
  265. VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ : GLfloat;
  266. AmpVr2 : GLfloat;
  267. Zf : GLfloat;
  268. begin
  269. AmpVr2:=(Amp)/sqr((Edge)*SQRT2/2);
  270. Zf:=(Edge)*(Z);
  271. for Yi:=0 to Divisions-1 do
  272. begin
  273. Yf:=-((Edge)/2.0) + (Yi)/(Divisions)*(Edge);
  274. Yf2:=sqr(Yf);
  275. Y:=Yf+1.0/(Divisions)*(Edge);
  276. Y2:=sqr(Y);
  277. glBegin(GL_QUAD_STRIP);
  278. for Xi:=0 to Divisions do
  279. begin
  280. Xf:=-((Edge)/2.0) + (Xi)/(Divisions)*(Edge);
  281. Xf2:=sqr(Xf);
  282. Xa:=Xf+0.001; Yb:=Y+0.001;
  283. Factor:=1-((Xf2+Y2)*AmpVr2);
  284. Factor1:=1-((sqr(Xa)+Y2)*AmpVr2);
  285. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  286. VertX:=Factor*Xf; VertY:=Factor*Y; VertZ:=Factor*Zf;
  287. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Y-VertY; NeiAZ:=Factor1*Zf-VertZ;
  288. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  289. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  290. glVertex3f(VertX, VertY, VertZ);
  291. Xa:=Xf+0.001; Yb:=Yf+0.001;
  292. Factor:=1-((Xf2+Yf2)*AmpVr2);
  293. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  294. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  295. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  296. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  297. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  298. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  299. glVertex3f(VertX, VertY, VertZ);
  300. end;
  301. glEnd();
  302. end;
  303. end;
  304. procedure PENTAGON(Edge,Amp:GLFloat; Divisions: longint; Z:GLFloat);
  305. var
  306. Ri,Ti,Fi : longint;
  307. Xf,Yf,Xf2,Yf2,Xa,Yb : GLfloat;
  308. X,Y : array[0..5] of GLFloat;
  309. Factor,Factor1,Factor2 : GLfloat;
  310. VertX,VertY,VertZ,NeiAX,NeiAY,NeiAZ,NeiBX,NeiBY,NeiBZ : GLfloat;
  311. AmpVr2 : GLfloat;
  312. Zf : GLfloat;
  313. begin
  314. AmpVr2:=(Amp)/sqr((Edge)*cossec36_2);
  315. Zf:=(Edge)*(Z);
  316. for Fi:=0 to 5 do
  317. begin
  318. x[Fi]:=-cos( Fi*2*Pi/5 + Pi/10 )/(Divisions)*cossec36_2*(Edge);
  319. y[Fi]:=sin( Fi*2*Pi/5 + Pi/10 )/(Divisions)*cossec36_2*(Edge);
  320. end;
  321. for Ri:=1 to Divisions do
  322. begin
  323. for Fi:=0 to 4 do
  324. begin
  325. glBegin(GL_TRIANGLE_STRIP);
  326. for Ti:=0 to Ri-1 do
  327. begin
  328. Xf:=(Ri-Ti)*x[Fi] + Ti*x[Fi+1];
  329. Yf:=(Ri-Ti)*y[Fi] + Ti*y[Fi+1];
  330. Xa:=Xf+0.001; Yb:=Yf+0.001;
  331. Xf2:=sqr(Xf);
  332. Yf2:=sqr(Yf);
  333. Factor:=1-(((Xf2)+(Yf2))*AmpVr2);
  334. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  335. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  336. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  337. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  338. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  339. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  340. glVertex3f(VertX, VertY, VertZ);
  341. Xf:=(Ri-Ti-1)*x[Fi] + Ti*x[Fi+1];
  342. Yf:=(Ri-Ti-1)*y[Fi] + Ti*y[Fi+1];
  343. Xa:=Xf+0.001; Yb:=Yf+0.001;
  344. Xf2:=sqr(Xf);
  345. Yf2:=sqr(Yf);
  346. Factor:=1-(((Xf2)+(Yf2))*AmpVr2);
  347. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  348. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  349. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  350. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  351. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  352. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  353. glVertex3f(VertX, VertY, VertZ);
  354. end;
  355. Xf:=Ri*x[Fi+1];
  356. Yf:=Ri*y[Fi+1];
  357. Xa:=Xf+0.001; Yb:=Yf+0.001;
  358. Xf2:=sqr(Xf);
  359. Yf2:=sqr(Yf);
  360. Factor:=1-(((Xf2)+(Yf2))*AmpVr2);
  361. Factor1:=1-((sqr(Xa)+Yf2)*AmpVr2);
  362. Factor2:=1-((Xf2+sqr(Yb))*AmpVr2);
  363. VertX:=Factor*Xf; VertY:=Factor*Yf; VertZ:=Factor*Zf;
  364. NeiAX:=Factor1*Xa-VertX; NeiAY:=Factor1*Yf-VertY; NeiAZ:=Factor1*Zf-VertZ;
  365. NeiBX:=Factor2*Xf-VertX; NeiBY:=Factor2*Yb-VertY; NeiBZ:=Factor2*Zf-VertZ;
  366. VectMul(NeiAX, NeiAY, NeiAZ, NeiBX, NeiBY, NeiBZ);
  367. glVertex3f(VertX, VertY, VertZ);
  368. glEnd();
  369. end;
  370. end;
  371. end;
  372. procedure draw_tetra;
  373. var
  374. list : GLuint;
  375. begin
  376. list := glGenLists( 1 );
  377. glNewList( list, GL_COMPILE );
  378. TRIANGLE(2,seno,edgedivisions,0.5/SQRT6);
  379. glEndList();
  380. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
  381. glCallList(list);
  382. glPushMatrix();
  383. glRotatef(180,0,0,1);
  384. glRotatef(-tetraangle,1,0,0);
  385. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
  386. glCallList(list);
  387. glPopMatrix();
  388. glPushMatrix();
  389. glRotatef(180,0,1,0);
  390. glRotatef(-180+tetraangle,0.5,SQRT3/2,0);
  391. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
  392. glCallList(list);
  393. glPopMatrix();
  394. glRotatef(180,0,1,0);
  395. glRotatef(-180+tetraangle,0.5,-SQRT3/2,0);
  396. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
  397. glCallList(list);
  398. glDeleteLists(list,1);
  399. end;
  400. procedure draw_cube;
  401. var
  402. list : GLuint;
  403. begin
  404. list := glGenLists( 1 );
  405. glNewList( list, GL_COMPILE );
  406. SQUARE(2, seno, edgedivisions, 0.5);
  407. glEndList();
  408. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
  409. glCallList(list);
  410. glRotatef(cubeangle,1,0,0);
  411. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
  412. glCallList(list);
  413. glRotatef(cubeangle,1,0,0);
  414. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
  415. glCallList(list);
  416. glRotatef(cubeangle,1,0,0);
  417. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
  418. glCallList(list);
  419. glRotatef(cubeangle,0,1,0);
  420. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
  421. glCallList(list);
  422. glRotatef(2*cubeangle,0,1,0);
  423. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
  424. glCallList(list);
  425. glDeleteLists(list,1);
  426. end;
  427. procedure draw_octa;
  428. var
  429. list : GLuint;
  430. begin
  431. list := glGenLists( 1 );
  432. glNewList( list, GL_COMPILE );
  433. TRIANGLE(2,seno,edgedivisions,1/SQRT6);
  434. glEndList();
  435. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
  436. glCallList(list);
  437. glPushMatrix();
  438. glRotatef(180,0,0,1);
  439. glRotatef(-180+octaangle,1,0,0);
  440. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
  441. glCallList(list);
  442. glPopMatrix();
  443. glPushMatrix();
  444. glRotatef(180,0,1,0);
  445. glRotatef(-octaangle,0.5,SQRT3/2,0);
  446. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
  447. glCallList(list);
  448. glPopMatrix();
  449. glPushMatrix();
  450. glRotatef(180,0,1,0);
  451. glRotatef(-octaangle,0.5,-SQRT3/2,0);
  452. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
  453. glCallList(list);
  454. glPopMatrix();
  455. glRotatef(180,1,0,0);
  456. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
  457. glCallList(list);
  458. glPushMatrix();
  459. glRotatef(180,0,0,1);
  460. glRotatef(-180+octaangle,1,0,0);
  461. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
  462. glCallList(list);
  463. glPopMatrix();
  464. glPushMatrix();
  465. glRotatef(180,0,1,0);
  466. glRotatef(-octaangle,0.5,SQRT3/2,0);
  467. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
  468. glCallList(list);
  469. glPopMatrix();
  470. glRotatef(180,0,1,0);
  471. glRotatef(-octaangle,0.5,-SQRT3/2,0);
  472. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
  473. glCallList(list);
  474. glDeleteLists(list,1);
  475. end;
  476. procedure draw_dodeca;
  477. const
  478. TAU = ((SQRT5+1)/2);
  479. var
  480. list : GLuint;
  481. begin
  482. list := glGenLists( 1 );
  483. glNewList( list, GL_COMPILE );
  484. PENTAGON(1,seno,edgedivisions,sqr(TAU) * sqrt((TAU+2)/5) / 2);
  485. glEndList();
  486. glPushMatrix();
  487. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
  488. glCallList(list);
  489. glRotatef(180,0,0,1);
  490. glPushMatrix();
  491. glRotatef(-dodecaangle,1,0,0);
  492. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
  493. glCallList(list);
  494. glPopMatrix();
  495. glPushMatrix();
  496. glRotatef(-dodecaangle,cos72,sin72,0);
  497. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
  498. glCallList(list);
  499. glPopMatrix();
  500. glPushMatrix();
  501. glRotatef(-dodecaangle,cos72,-sin72,0);
  502. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
  503. glCallList(list);
  504. glPopMatrix();
  505. glPushMatrix();
  506. glRotatef(dodecaangle,cos36,-sin36,0);
  507. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
  508. glCallList(list);
  509. glPopMatrix();
  510. glRotatef(dodecaangle,cos36,sin36,0);
  511. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
  512. glCallList(list);
  513. glPopMatrix();
  514. glRotatef(180,1,0,0);
  515. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
  516. glCallList(list);
  517. glRotatef(180,0,0,1);
  518. glPushMatrix();
  519. glRotatef(-dodecaangle,1,0,0);
  520. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
  521. glCallList(list);
  522. glPopMatrix();
  523. glPushMatrix();
  524. glRotatef(-dodecaangle,cos72,sin72,0);
  525. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[8]);
  526. glCallList(list);
  527. glPopMatrix();
  528. glPushMatrix();
  529. glRotatef(-dodecaangle,cos72,-sin72,0);
  530. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[9]);
  531. glCallList(list);
  532. glPopMatrix();
  533. glPushMatrix();
  534. glRotatef(dodecaangle,cos36,-sin36,0);
  535. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[10]);
  536. glCallList(list);
  537. glPopMatrix();
  538. glRotatef(dodecaangle,cos36,sin36,0);
  539. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[11]);
  540. glCallList(list);
  541. glDeleteLists(list,1);
  542. end;
  543. procedure draw_ico;
  544. var
  545. list : GLuint;
  546. begin
  547. list := glGenLists( 1 );
  548. glNewList( list, GL_COMPILE );
  549. TRIANGLE(1.5,seno,edgedivisions,(3*SQRT3+SQRT15)/12);
  550. glEndList();
  551. glPushMatrix();
  552. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[0]);
  553. glCallList(list);
  554. glPushMatrix();
  555. glRotatef(180,0,0,1);
  556. glRotatef(-icoangle,1,0,0);
  557. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[1]);
  558. glCallList(list);
  559. glPushMatrix();
  560. glRotatef(180,0,1,0);
  561. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  562. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[2]);
  563. glCallList(list);
  564. glPopMatrix();
  565. glRotatef(180,0,1,0);
  566. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  567. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[3]);
  568. glCallList(list);
  569. glPopMatrix();
  570. glPushMatrix();
  571. glRotatef(180,0,1,0);
  572. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  573. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[4]);
  574. glCallList(list);
  575. glPushMatrix();
  576. glRotatef(180,0,1,0);
  577. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  578. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[5]);
  579. glCallList(list);
  580. glPopMatrix();
  581. glRotatef(180,0,0,1);
  582. glRotatef(-icoangle,1,0,0);
  583. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[6]);
  584. glCallList(list);
  585. glPopMatrix();
  586. glRotatef(180,0,1,0);
  587. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  588. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[7]);
  589. glCallList(list);
  590. glPushMatrix();
  591. glRotatef(180,0,1,0);
  592. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  593. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[8]);
  594. glCallList(list);
  595. glPopMatrix();
  596. glRotatef(180,0,0,1);
  597. glRotatef(-icoangle,1,0,0);
  598. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[9]);
  599. glCallList(list);
  600. glPopMatrix();
  601. glRotatef(180,1,0,0);
  602. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[10]);
  603. glCallList(list);
  604. glPushMatrix();
  605. glRotatef(180,0,0,1);
  606. glRotatef(-icoangle,1,0,0);
  607. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[11]);
  608. glCallList(list);
  609. glPushMatrix();
  610. glRotatef(180,0,1,0);
  611. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  612. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[12]);
  613. glCallList(list);
  614. glPopMatrix();
  615. glRotatef(180,0,1,0);
  616. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  617. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[13]);
  618. glCallList(list);
  619. glPopMatrix();
  620. glPushMatrix();
  621. glRotatef(180,0,1,0);
  622. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  623. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[14]);
  624. glCallList(list);
  625. glPushMatrix();
  626. glRotatef(180,0,1,0);
  627. glRotatef(-180+icoangle,0.5,SQRT3/2,0);
  628. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[15]);
  629. glCallList(list);
  630. glPopMatrix();
  631. glRotatef(180,0,0,1);
  632. glRotatef(-icoangle,1,0,0);
  633. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[16]);
  634. glCallList(list);
  635. glPopMatrix();
  636. glRotatef(180,0,1,0);
  637. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  638. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[17]);
  639. glCallList(list);
  640. glPushMatrix();
  641. glRotatef(180,0,1,0);
  642. glRotatef(-180+icoangle,0.5,-SQRT3/2,0);
  643. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[18]);
  644. glCallList(list);
  645. glPopMatrix();
  646. glRotatef(180,0,0,1);
  647. glRotatef(-icoangle,1,0,0);
  648. glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialColor[19]);
  649. glCallList(list);
  650. glDeleteLists(list,1);
  651. end;
  652. procedure do_draw;extdecl
  653. begin
  654. glClear( GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT );
  655. glPushMatrix();
  656. glTranslatef( 0.0, 0.0, -10.0 );
  657. glScalef( Scale*WindH/WindW, Scale, Scale );
  658. glTranslatef(2.5*WindW/WindH*sin(step*1.11),2.5*cos(step*1.25*1.11),0);
  659. glRotatef(step*100,1,0,0);
  660. glRotatef(step*95,0,1,0);
  661. glRotatef(step*90,0,0,1);
  662. seno:=(sin(step)+1.0/3.0)*(4.0/5.0)*Magnitude;
  663. draw_object();
  664. glPopMatrix();
  665. glFlush();
  666. glutSwapBuffers();
  667. step:=step+0.05;
  668. end;
  669. procedure do_idle;extdecl
  670. begin
  671. glutPostRedisplay();
  672. end;
  673. procedure do_reshape(width,height:longint);extdecl
  674. begin
  675. WindW:=width;
  676. WindH:=height;
  677. glViewport(0, 0, width, height);
  678. glMatrixMode(GL_PROJECTION);
  679. glLoadIdentity();
  680. glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
  681. glMatrixMode(GL_MODELVIEW);
  682. end;
  683. procedure pinit;
  684. var
  685. loop : longint;
  686. begin
  687. case _object of
  688. 1 :
  689. begin
  690. draw_object:=draw_tetra;
  691. MaterialColor[0]:=@MaterialRed;
  692. MaterialColor[1]:=@MaterialGreen;
  693. MaterialColor[2]:=@MaterialBlue;
  694. MaterialColor[3]:=@MaterialWhite;
  695. edgedivisions:=tetradivisions;
  696. Magnitude:=2.5;
  697. end;
  698. 2:
  699. begin
  700. draw_object:=draw_cube;
  701. MaterialColor[0]:=@MaterialRed;
  702. MaterialColor[1]:=@MaterialGreen;
  703. MaterialColor[2]:=@MaterialCyan;
  704. MaterialColor[3]:=@MaterialMagenta;
  705. MaterialColor[4]:=@MaterialYellow;
  706. MaterialColor[5]:=@MaterialBlue;
  707. edgedivisions:=cubedivisions;
  708. Magnitude:=2.0;
  709. end;
  710. 3:
  711. begin
  712. draw_object:=draw_octa;
  713. MaterialColor[0]:=MaterialRed;
  714. MaterialColor[1]:=MaterialGreen;
  715. MaterialColor[2]:=MaterialBlue;
  716. MaterialColor[3]:=MaterialWhite;
  717. MaterialColor[4]:=MaterialCyan;
  718. MaterialColor[5]:=MaterialMagenta;
  719. MaterialColor[6]:=MaterialGray;
  720. MaterialColor[7]:=MaterialYellow;
  721. edgedivisions:=octadivisions;
  722. Magnitude:=2.5;
  723. end;
  724. 4:
  725. begin
  726. draw_object:=draw_dodeca;
  727. MaterialColor[ 0]:=MaterialRed;
  728. MaterialColor[ 1]:=MaterialGreen;
  729. MaterialColor[ 2]:=MaterialCyan;
  730. MaterialColor[ 3]:=MaterialBlue;
  731. MaterialColor[ 4]:=MaterialMagenta;
  732. MaterialColor[ 5]:=MaterialYellow;
  733. MaterialColor[ 6]:=MaterialGreen;
  734. MaterialColor[ 7]:=MaterialCyan;
  735. MaterialColor[ 8]:=MaterialRed;
  736. MaterialColor[ 9]:=MaterialMagenta;
  737. MaterialColor[10]:=MaterialBlue;
  738. MaterialColor[11]:=MaterialYellow;
  739. edgedivisions:=dodecadivisions;
  740. Magnitude:=2.0;
  741. end;
  742. 5:
  743. begin
  744. draw_object:=draw_ico;
  745. MaterialColor[ 0]:=MaterialRed;
  746. MaterialColor[ 1]:=MaterialGreen;
  747. MaterialColor[ 2]:=MaterialBlue;
  748. MaterialColor[ 3]:=MaterialCyan;
  749. MaterialColor[ 4]:=MaterialYellow;
  750. MaterialColor[ 5]:=MaterialMagenta;
  751. MaterialColor[ 6]:=MaterialRed;
  752. MaterialColor[ 7]:=MaterialGreen;
  753. MaterialColor[ 8]:=MaterialBlue;
  754. MaterialColor[ 9]:=MaterialWhite;
  755. MaterialColor[10]:=MaterialCyan;
  756. MaterialColor[11]:=MaterialYellow;
  757. MaterialColor[12]:=MaterialMagenta;
  758. MaterialColor[13]:=MaterialRed;
  759. MaterialColor[14]:=MaterialGreen;
  760. MaterialColor[15]:=MaterialBlue;
  761. MaterialColor[16]:=MaterialCyan;
  762. MaterialColor[17]:=MaterialYellow;
  763. MaterialColor[18]:=MaterialMagenta;
  764. MaterialColor[19]:=MaterialGray;
  765. edgedivisions:=icodivisions;
  766. Magnitude:=2.5;
  767. end;
  768. end;
  769. if (mono) then
  770. begin
  771. for loop:=0 to 19 do
  772. MaterialColor[loop]:=MaterialGray;
  773. end;
  774. if (smooth) then
  775. glShadeModel( GL_SMOOTH )
  776. else
  777. glShadeModel( GL_FLAT );
  778. end;
  779. procedure do_key(k:char;x,y:integer);extdecl
  780. begin
  781. case k of
  782. '1' : _object:=1;
  783. '2' : _object:=2;
  784. '3' : _object:=3;
  785. '4' : _object:=4;
  786. '5' : _object:=5;
  787. ' ' : mono:=not mono;
  788. #13 : smooth:=not smooth;
  789. #27 : halt(0);
  790. end;
  791. pinit;
  792. end;
  793. begin
  794. if not GLInitialized then
  795. begin
  796. writeln('OpenGL Not Availble');
  797. halt(1);
  798. end;
  799. if not GLUTInitialized then
  800. begin
  801. writeln('GLUT Not Availble');
  802. halt(1);
  803. end;
  804. writeln('Morph 3D - Shows morphing platonic polyhedra');
  805. writeln('Author: Marcelo Fernandes Vianna ([email protected])');
  806. writeln(' [1] - Tetrahedron');
  807. writeln(' [2] - Hexahedron (Cube)');
  808. writeln(' [3] - Octahedron');
  809. writeln(' [4] - Dodecahedron');
  810. writeln(' [5] - Icosahedron');
  811. writeln('[SPACE] - Toggle colored faces');
  812. writeln('[RETURN] - Toggle smooth/flat shading');
  813. writeln(' [ESC] - Quit');
  814. _object:=3;
  815. glutInitWindowPosition(0,0);
  816. glutInitWindowSize(640,480);
  817. glutInitDisplayMode( GLUT_DEPTH + GLUT_DOUBLE + GLUT_RGB );
  818. if (glutCreateWindow('Morph 3D - Shows morphing platonic polyhedra') <= 0) then
  819. halt(1);
  820. glClearDepth(1.0);
  821. glClearColor( 0.0, 0.0, 0.0, 1.0 );
  822. glColor3f( 1.0, 1.0, 1.0 );
  823. glClear( GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT );
  824. glFlush();
  825. glutSwapBuffers();
  826. glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
  827. glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
  828. glLightfv(GL_LIGHT0, GL_POSITION, position0);
  829. glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
  830. glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
  831. glLightfv(GL_LIGHT1, GL_POSITION, position1);
  832. glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  833. glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
  834. glEnable(GL_LIGHTING);
  835. glEnable(GL_LIGHT0);
  836. glEnable(GL_LIGHT1);
  837. glEnable(GL_DEPTH_TEST);
  838. glEnable(GL_NORMALIZE);
  839. glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_shininess);
  840. glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
  841. glHint(GL_FOG_HINT, GL_FASTEST);
  842. glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
  843. glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);
  844. pinit();
  845. glutReshapeFunc( @do_reshape );
  846. glutKeyboardFunc( @do_key );
  847. glutIdleFunc( @do_idle );
  848. glutDisplayFunc( @do_draw );
  849. glutMainLoop();
  850. end.
  851. {
  852. $Log$
  853. Revision 1.2 2000-09-03 22:17:17 peter
  854. * merged
  855. Revision 1.1.2.1 2000/09/03 22:10:47 peter
  856. * fixed for win32
  857. Revision 1.1 2000/09/03 21:25:45 peter
  858. * new updated version
  859. * gtkglarea unit and demo
  860. * win32 opengl headers
  861. * morph3d demo
  862. }