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_b8 = 0.f;
21 static real c_b9 = 360.f;
22 static real c_b10 = -90.f;
23 static real c_b11 = 90.f;
24 static real c_b12 = .2f;
25 static real c_b13 = .8f;
26 static integer c__37 = 37;
27
28 /* ----------------------------------------------------------------------- */
29 /* Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved. */
30 /* ----------------------------------------------------------------------- */
MAIN__(void)31 /* Main program */ int MAIN__(void)
32 {
33 /* System generated locals */
34 real r__1, r__2;
35
36 /* Builtin functions */
37 double sin(doublereal), sqrt(doublereal), cos(doublereal);
38 integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
39 e_wsle(void), s_rsle(cilist *), e_rsle(void);
40
41 /* Local variables */
42 static integer i__, j;
43 static real p[1369] /* was [37][37] */;
44 static integer iws;
45 static real alat, alon, slat;
46 extern /* Subroutine */ int grcls_(void), grfrm_(void), gropn_(integer *),
47 uetone_(real *, integer *, integer *, integer *), udcntr_(real *,
48 integer *, integer *, integer *), grswnd_(real *, real *, real *,
49 real *), grstrf_(void), usdaxs_(void), grstrn_(integer *),
50 sgpwsn_(void), grsvpt_(real *, real *, real *, real *);
51
52 /* Fortran I/O blocks */
53 static cilist io___7 = { 0, 6, 0, 0, 0 };
54 static cilist io___8 = { 0, 5, 0, 0, 0 };
55
56
57 /* -- 球面調和関数 ---- */
58 for (j = 1; j <= 37; ++j) {
59 for (i__ = 1; i__ <= 37; ++i__) {
60 alon = ((i__ - 1) * 360.f / 36 + 0.f) * .017453277777777776f;
61 alat = ((j - 1) * 180.f / 36 - 90.f) * .017453277777777776f;
62 slat = sin(alat);
63 /* Computing 2nd power */
64 r__1 = slat;
65 /* Computing 2nd power */
66 r__2 = slat;
67 p[i__ + j * 37 - 38] = sqrt(1 - r__1 * r__1) * 3 * slat * cos(
68 alon) - (r__2 * r__2 * 3 - 1) * .5f;
69 /* L10: */
70 }
71 /* L20: */
72 }
73 /* -- グラフ ---- */
74 s_wsle(&io___7);
75 do_lio(&c__9, &c__1, " WORKSTATION ID (I) ? ;", (ftnlen)24);
76 e_wsle();
77 sgpwsn_();
78 s_rsle(&io___8);
79 do_lio(&c__3, &c__1, (char *)&iws, (ftnlen)sizeof(integer));
80 e_rsle();
81 gropn_(&iws);
82 grfrm_();
83 grswnd_(&c_b8, &c_b9, &c_b10, &c_b11);
84 grsvpt_(&c_b12, &c_b13, &c_b12, &c_b13);
85 grstrn_(&c__1);
86 grstrf_();
87 uetone_(p, &c__37, &c__37, &c__37);
88 usdaxs_();
89 udcntr_(p, &c__37, &c__37, &c__37);
90 grcls_();
91 return 0;
92 } /* MAIN__ */
93
quick4_()94 /* Main program alias */ int quick4_ () { MAIN__ (); return 0; }
95