1 /* -- translated by f2c (version 20100827).
2 You must link the resulting object file with libf2c:
3 on Microsoft Windows system, link with libf2c.lib;
4 on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5 or, if you install libf2c.a in a standard place, with -lf2c -lm
6 -- in that order, at the end of the command line, as in
7 cc *.o -lf2c -lm
8 Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9
10 http://www.netlib.org/f2c/libf2c.zip
11 */
12
13 #include "libtinyf2c.h"
14
15 /* Table of constant values */
16
17 static integer c__9 = 9;
18 static integer c__1 = 1;
19 static integer c__3 = 3;
20 static real c_b9 = .2f;
21 static real c_b10 = .8f;
22 static integer c__37 = 37;
23 static integer c__25 = 25;
24
25 /* ----------------------------------------------------------------------- */
26 /* Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
27 /* ----------------------------------------------------------------------- */
MAIN__(void)28 /* Main program */ int MAIN__(void)
29 {
30 /* System generated locals */
31 real r__1, r__2;
32
33 /* Builtin functions */
34 double sin(doublereal), sqrt(doublereal), cos(doublereal);
35 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
36 e_wsle(void), s_rsle(cilist *), e_rsle(void);
37
38 /* Local variables */
39 static integer i__, j;
40 static real p[1369] /* was [37][37] */;
41 static integer iws;
42 static real alat[37], alon[37], slat;
43 extern /* Subroutine */ int grcls_(void), grfrm_(void), gropn_(integer *),
44 udcntr_(real *, integer *, integer *, integer *), grswnd_(real *,
45 real *, real *, real *), grstrf_(void), usdaxs_(void), grstrn_(
46 integer *), sgpwsn_(void), grsvpt_(real *, real *, real *, real *)
47 ;
48
49 /* Fortran I/O blocks */
50 static cilist io___7 = { 0, 6, 0, 0, 0 };
51 static cilist io___8 = { 0, 5, 0, 0, 0 };
52
53
54 for (i__ = 1; i__ <= 37; ++i__) {
55 alon[i__ - 1] = (i__ - 1) * 360.f / 36 + 0.f;
56 /* L10: */
57 }
58 for (j = 1; j <= 37; ++j) {
59 alat[j - 1] = (j - 1) * 180.f / 36 - 90.f;
60 /* L20: */
61 }
62 for (j = 1; j <= 37; ++j) {
63 slat = sin(alat[j - 1] * .017453277777777776f);
64 for (i__ = 1; i__ <= 37; ++i__) {
65 /* Computing 2nd power */
66 r__1 = slat;
67 /* Computing 2nd power */
68 r__2 = slat;
69 p[i__ + j * 37 - 38] = sqrt(1 - r__1 * r__1) * 3 * slat * cos(
70 alon[i__ - 1] * .017453277777777776f) - (r__2 * r__2 * 3
71 - 1) * .5f;
72 /* L30: */
73 }
74 }
75 s_wsle(&io___7);
76 do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ;", (ftnlen)24);
77 e_wsle();
78 sgpwsn_();
79 s_rsle(&io___8);
80 do_lio(&c__3, &c__1, (char *)&iws, (ftnlen)sizeof(integer));
81 e_rsle();
82 gropn_(&iws);
83 grfrm_();
84 grswnd_(&alon[8], &alon[32], &alat[6], &alat[30]);
85 grsvpt_(&c_b9, &c_b10, &c_b9, &c_b10);
86 grstrn_(&c__1);
87 grstrf_();
88 usdaxs_();
89 udcntr_(&p[230], &c__37, &c__25, &c__25);
90 grcls_();
91 return 0;
92 } /* MAIN__ */
93
u2d4_()94 /* Main program alias */ int u2d4_ () { MAIN__ (); return 0; }
95