• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* San Angeles Observation OpenGL ES version example
2  * Copyright 2004-2005 Jetro Lauha
3  * All rights reserved.
4  * Web: http://iki.fi/jetro/
5  *
6  * This source is free software; you can redistribute it and/or
7  * modify it under the terms of EITHER:
8  *   (1) The GNU Lesser General Public License as published by the Free
9  *       Software Foundation; either version 2.1 of the License, or (at
10  *       your option) any later version. The text of the GNU Lesser
11  *       General Public License is included with this source in the
12  *       file LICENSE-LGPL.txt.
13  *   (2) The BSD-style license that is included with this source in
14  *       the file LICENSE-BSD.txt.
15  *
16  * This source is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
19  * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
20  *
21  * $Id: shapes.h,v 1.6 2005/01/31 22:15:30 tonic Exp $
22  * $Revision: 1.6 $
23  */
24 
25 #ifndef SHAPES_H_INCLUDED
26 #define SHAPES_H_INCLUDED
27 
28 
29 #define SUPERSHAPE_PARAMS 15
30 
31 static const float sSuperShapeParams[][SUPERSHAPE_PARAMS] =
32 {
33     // m  a     b     n1      n2     n3     m     a     b     n1     n2      n3   res1 res2 scale
34 #ifdef SUPERSHAPE_HIGH_RES
35     { 10, 1,    2,    90,      1,   -45,    8,    1,    1,    -1,     1,  -0.4f,   40,  60, 2 },
36     { 10, 1,    2,    90,      1,   -45,    4,    1,    1,    10,     1,  -0.4f,   40,  40, 4 },
37     { 10, 1,    2,    60,      1,   -10,    4,    1,    1,    -1,    -2,  -0.4f,   82,  82, 1 },
38     {  6, 1,    1,    60,      1,   -70,    8,    1,    1,  0.4f,     3,  0.25f,   40,  40, 1 },
39     {  4, 1,    1,    30,      1,    20,   12,    1,    1,  0.4f,     3,  0.25f,   20,  60, 1 },
40     {  8, 1,    1,    30,      1,    -4,    8,    2,    1,    -1,     5,   0.5f,   60,  60, 1 },
41     { 13, 1,    1,    30,      1,    -4,   13,    1,    1,     1,     5,      1,   60,  60, 6 },
42     { 10, 1, 1.1f, -0.5f,   0.1f,    70,   60,    1,    1,   -90,     0, -0.25f,   60, 180, 8 },
43     {  7, 1,    1,    20,  -0.3f, -3.5f,    6,    1,    1,    -1,  4.5f,   0.5f,   60,  80, 4 },
44     {  4, 1,    1,    10,     10,    10,    4,    1,    1,    10,    10,     10,   20,  40, 1 },
45     {  4, 1,    1,     1,      1,     1,    4,    1,    1,     1,     1,      1,   10,  10, 2 },
46     {  1, 1,    1,    38, -0.25f,    19,    4,    1,    1,    10,    10,     10,   20,  40, 2 },
47     {  2, 1,    1,  0.7f,   0.3f,  0.2f,    3,    1,    1,   100,   100,    100,   20,  50, 2 },
48     {  6, 1,    1,     1,      1,     1,    3,    1,    1,     1,     1,      1,   60,  60, 2 },
49     {  3, 1,    1,     1,      1,     1,    6,    1,    1,     2,     1,      1,   20,  40, 2 },
50     {  6, 1,    1,     6,   5.5f,   100,    6,    1,    1,    25,    10,     10,   60,  40, 2 },
51     {  3, 1,    1,  0.5f,   1.7f,  1.7f,    2,    1,    1,    10,    10,     10,   40,  40, 2 },
52     {  5, 1,    1,  0.1f,   1.7f,  1.7f,    1,    1,    1,  0.3f,  0.5f,   0.5f,   40,  40, 4 },
53     {  2, 1,    1,     6,   5.5f,   100,    6,    1,    1,     4,    10,     10,   40,  40, 1 },
54     {  6, 1,    1,    -1,     70,  0.1f,    9,    1, 0.5f,   -98, 0.05f,    -45,   60,  91, 4 },
55     {  6, 1,    1,    -1,     90, -0.1f,    7,    1,    1,    90,  1.3f,     34,   32,  60, 1 },
56 #else  // !SUPERSHAPE_HIGH_RES (regular resolution)
57     { 10, 1,    2,    90,      1,   -45,    8,    1,    1,    -1,     1,  -0.4f,   20,  30, 2 },
58     { 10, 1,    2,    90,      1,   -45,    4,    1,    1,    10,     1,  -0.4f,   20,  20, 4 },
59     { 10, 1,    2,    60,      1,   -10,    4,    1,    1,    -1,    -2,  -0.4f,   41,  41, 1 },
60     {  6, 1,    1,    60,      1,   -70,    8,    1,    1,  0.4f,     3,  0.25f,   20,  20, 1 },
61     {  4, 1,    1,    30,      1,    20,   12,    1,    1,  0.4f,     3,  0.25f,   10,  30, 1 },
62     {  8, 1,    1,    30,      1,    -4,    8,    2,    1,    -1,     5,   0.5f,   25,  26, 1 },
63     { 13, 1,    1,    30,      1,    -4,   13,    1,    1,     1,     5,      1,   30,  30, 6 },
64     { 10, 1, 1.1f, -0.5f,   0.1f,    70,   60,    1,    1,   -90,     0, -0.25f,   20,  60, 8 },
65     {  7, 1,    1,    20,  -0.3f, -3.5f,    6,    1,    1,    -1,  4.5f,   0.5f,   10,  20, 4 },
66     {  4, 1,    1,    10,     10,    10,    4,    1,    1,    10,    10,     10,   10,  20, 1 },
67     {  4, 1,    1,     1,      1,     1,    4,    1,    1,     1,     1,      1,   10,  10, 2 },
68     {  1, 1,    1,    38, -0.25f,    19,    4,    1,    1,    10,    10,     10,   10,  15, 2 },
69     {  2, 1,    1,  0.7f,   0.3f,  0.2f,    3,    1,    1,   100,   100,    100,   10,  25, 2 },
70     {  6, 1,    1,     1,      1,     1,    3,    1,    1,     1,     1,      1,   30,  30, 2 },
71     {  3, 1,    1,     1,      1,     1,    6,    1,    1,     2,     1,      1,   10,  20, 2 },
72     {  6, 1,    1,     6,   5.5f,   100,    6,    1,    1,    25,    10,     10,   30,  20, 2 },
73     {  3, 1,    1,  0.5f,   1.7f,  1.7f,    2,    1,    1,    10,    10,     10,   20,  20, 2 },
74     {  5, 1,    1,  0.1f,   1.7f,  1.7f,    1,    1,    1,  0.3f,  0.5f,   0.5f,   20,  20, 4 },
75     {  2, 1,    1,     6,   5.5f,   100,    6,    1,    1,     4,    10,     10,   10,  22, 1 },
76     {  6, 1,    1,    -1,     70,  0.1f,    9,    1, 0.5f,   -98, 0.05f,    -45,   20,  30, 4 },
77     {  6, 1,    1,    -1,     90, -0.1f,    7,    1,    1,    90,  1.3f,     34,   13,  16, 1 },
78 #endif  // SUPERSHAPE_HIGH_RES | !SUPERSHAPE_HIGH_RES
79 };
80 #define SUPERSHAPE_COUNT (sizeof(sSuperShapeParams) / sizeof(sSuperShapeParams[0]))
81 
82 
83 #endif // !SHAPES_H_INCLUDED
84