Main Page | Class List | File List | Class Members | File Members

jitter.h

Go to the documentation of this file.
00001 /*
00002  * (c) Copyright 1993-1999, Silicon Graphics, Inc.
00003  * ALL RIGHTS RESERVED 
00004  * Permission to use, copy, modify, and distribute this software for 
00005  * any purpose and without fee is hereby granted, provided that the above
00006  * copyright notice appear in all copies and that both the copyright notice
00007  * and this permission notice appear in supporting documentation, and that 
00008  * the name of Silicon Graphics, Inc. not be used in advertising
00009  * or publicity pertaining to distribution of the software without specific,
00010  * written prior permission. 
00011  *
00012  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
00013  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
00014  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
00015  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
00016  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
00017  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
00018  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
00019  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
00020  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
00021  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
00022  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
00023  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
00024  * 
00025  * US Government Users Restricted Rights 
00026  * Use, duplication, or disclosure by the Government is subject to
00027  * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
00028  * (c)(1)(ii) of the Rights in Technical Data and Computer Software
00029  * clause at DFARS 252.227-7013 and/or in similar or successor
00030  * clauses in the FAR or the DOD or NASA FAR Supplement.
00031  * Unpublished-- rights reserved under the copyright laws of the
00032  * United States.  Contractor/manufacturer is Silicon Graphics,
00033  * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
00034  *
00035  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
00036  */
00037 /*
00038 jitter.h
00039 
00040 This file contains jitter point arrays for 2,3,4,8,15,24 and 66 jitters.
00041 
00042 The arrays are named j2, j3, etc. Each element in the array has the form,
00043 for example, j8[0].x and j8[0].y
00044 
00045 Values are floating point in the range -.5 < x < .5, -.5 < y < .5, and
00046 have a gaussian distribution around the origin.
00047 
00048 Use these to do model jittering for scene anti-aliasing and view volume
00049 jittering for depth of field effects. Use in conjunction with the 
00050 accwindow() routine.
00051 */
00052 
00053 typedef struct 
00054 {
00055         GLfloat x, y;
00056 } jitter_point;
00057 
00058 #define MAX_SAMPLES  66
00059 
00060 
00061 /* 2 jitter points */
00062 jitter_point j2[] =
00063 {
00064         { 0.246490,  0.249999},
00065         {-0.246490, -0.249999}
00066 };
00067 
00068 
00069 /* 3 jitter points */
00070 jitter_point j3[] =
00071 {
00072         {-0.373411, -0.250550},
00073         { 0.256263,  0.368119},
00074         { 0.117148, -0.117570}
00075 };
00076 
00077 
00078 /* 4 jitter points */
00079 jitter_point j4[] =
00080 {
00081         {-0.208147,  0.353730},
00082         { 0.203849, -0.353780},
00083         {-0.292626, -0.149945},
00084         { 0.296924,  0.149994}
00085 };
00086 
00087 
00088 /* 8 jitter points */
00089 jitter_point j8[] =
00090 {
00091         {-0.334818,  0.435331},
00092         { 0.286438, -0.393495},
00093         { 0.459462,  0.141540},
00094         {-0.414498, -0.192829},
00095         {-0.183790,  0.082102},
00096         {-0.079263, -0.317383},
00097         { 0.102254,  0.299133},
00098         { 0.164216, -0.054399}
00099 };
00100 
00101 
00102 /* 15 jitter points */
00103 jitter_point j15[] =
00104 {
00105         { 0.285561,  0.188437},
00106         { 0.360176, -0.065688},
00107         {-0.111751,  0.275019},
00108         {-0.055918, -0.215197},
00109         {-0.080231, -0.470965},
00110         { 0.138721,  0.409168},
00111         { 0.384120,  0.458500},
00112         {-0.454968,  0.134088},
00113         { 0.179271, -0.331196},
00114         {-0.307049, -0.364927},
00115         { 0.105354, -0.010099},
00116         {-0.154180,  0.021794},
00117         {-0.370135, -0.116425},
00118         { 0.451636, -0.300013},
00119         {-0.370610,  0.387504}
00120 };
00121 
00122 
00123 /* 24 jitter points */
00124 jitter_point j24[] =
00125 {
00126         { 0.030245,  0.136384},
00127         { 0.018865, -0.348867},
00128         {-0.350114, -0.472309},
00129         { 0.222181,  0.149524},
00130         {-0.393670, -0.266873},
00131         { 0.404568,  0.230436},
00132         { 0.098381,  0.465337},
00133         { 0.462671,  0.442116},
00134         { 0.400373, -0.212720},
00135         {-0.409988,  0.263345},
00136         {-0.115878, -0.001981},
00137         { 0.348425, -0.009237},
00138         {-0.464016,  0.066467},
00139         {-0.138674, -0.468006},
00140         { 0.144932, -0.022780},
00141         {-0.250195,  0.150161},
00142         {-0.181400, -0.264219},
00143         { 0.196097, -0.234139},
00144         {-0.311082, -0.078815},
00145         { 0.268379,  0.366778},
00146         {-0.040601,  0.327109},
00147         {-0.234392,  0.354659},
00148         {-0.003102, -0.154402},
00149         { 0.297997, -0.417965}
00150 };
00151 
00152 
00153 /* 66 jitter points */
00154 jitter_point j66[] =
00155 {
00156         { 0.266377, -0.218171},
00157         {-0.170919, -0.429368},
00158         { 0.047356, -0.387135},
00159         {-0.430063,  0.363413},
00160         {-0.221638, -0.313768},
00161         { 0.124758, -0.197109},
00162         {-0.400021,  0.482195},
00163         { 0.247882,  0.152010},
00164         {-0.286709, -0.470214},
00165         {-0.426790,  0.004977},
00166         {-0.361249, -0.104549},
00167         {-0.040643,  0.123453},
00168         {-0.189296,  0.438963},
00169         {-0.453521, -0.299889},
00170         { 0.408216, -0.457699},
00171         { 0.328973, -0.101914},
00172         {-0.055540, -0.477952},
00173         { 0.194421,  0.453510},
00174         { 0.404051,  0.224974},
00175         { 0.310136,  0.419700},
00176         {-0.021743,  0.403898},
00177         {-0.466210,  0.248839},
00178         { 0.341369,  0.081490},
00179         { 0.124156, -0.016859},
00180         {-0.461321, -0.176661},
00181         { 0.013210,  0.234401},
00182         { 0.174258, -0.311854},
00183         { 0.294061,  0.263364},
00184         {-0.114836,  0.328189},
00185         { 0.041206, -0.106205},
00186         { 0.079227,  0.345021},
00187         {-0.109319, -0.242380},
00188         { 0.425005, -0.332397},
00189         { 0.009146,  0.015098},
00190         {-0.339084, -0.355707},
00191         {-0.224596, -0.189548},
00192         { 0.083475,  0.117028},
00193         { 0.295962, -0.334699},
00194         { 0.452998,  0.025397},
00195         { 0.206511, -0.104668},
00196         { 0.447544, -0.096004},
00197         {-0.108006, -0.002471},
00198         {-0.380810,  0.130036},
00199         {-0.242440,  0.186934},
00200         {-0.200363,  0.070863},
00201         {-0.344844, -0.230814},
00202         { 0.408660,  0.345826},
00203         {-0.233016,  0.305203},
00204         { 0.158475, -0.430762},
00205         { 0.486972,  0.139163},
00206         {-0.301610,  0.009319},
00207         { 0.282245, -0.458671},
00208         { 0.482046,  0.443890},
00209         {-0.121527,  0.210223},
00210         {-0.477606, -0.424878},
00211         {-0.083941, -0.121440},
00212         {-0.345773,  0.253779},
00213         { 0.234646,  0.034549},
00214         { 0.394102, -0.210901},
00215         {-0.312571,  0.397656},
00216         { 0.200906,  0.333293},
00217         { 0.018703, -0.261792},
00218         {-0.209349, -0.065383},
00219         { 0.076248,  0.478538},
00220         {-0.073036, -0.355064},
00221         { 0.145087,  0.221726}
00222 };

Generated on Thu Jan 20 02:47:04 2005 for Depth_of_Field_Effect_Demo by doxygen 1.3.6