mapgrid.3gl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. '\" te
  2. '\"! tbl|eqn | mmdoc
  3. '\"macro stdmacro
  4. .ds Vn Version 1.2
  5. .ds Dt 24 September 1999
  6. .ds Re Release 1.2.1
  7. .ds Dp Jan 14 18:30
  8. .ds Dm 01 mapgrid.g
  9. .ds Xs 53033 5 mapgrid.gl
  10. .TH GLMAPGRID 3G
  11. .SH NAME
  12. .B "glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f
  13. \- define a one- or two-dimensional mesh
  14. .SH C SPECIFICATION
  15. void \f3glMapGrid1d\fP(
  16. GLint \fIun\fP,
  17. .nf
  18. .ta \w'\f3void \fPglMapGrid1d( 'u
  19. GLdouble \fIu1\fP,
  20. GLdouble \fIu2\fP )
  21. .fi
  22. void \f3glMapGrid1f\fP(
  23. GLint \fIun\fP,
  24. .nf
  25. .ta \w'\f3void \fPglMapGrid1f( 'u
  26. GLfloat \fIu1\fP,
  27. GLfloat \fIu2\fP )
  28. .fi
  29. void \f3glMapGrid2d\fP(
  30. GLint \fIun\fP,
  31. .nf
  32. .ta \w'\f3void \fPglMapGrid2d( 'u
  33. GLdouble \fIu1\fP,
  34. GLdouble \fIu2\fP,
  35. GLint \fIvn\fP,
  36. GLdouble \fIv1\fP,
  37. GLdouble \fIv2\fP )
  38. .fi
  39. void \f3glMapGrid2f\fP(
  40. GLint \fIun\fP,
  41. .nf
  42. .ta \w'\f3void \fPglMapGrid2f( 'u
  43. GLfloat \fIu1\fP,
  44. GLfloat \fIu2\fP,
  45. GLint \fIvn\fP,
  46. GLfloat \fIv1\fP,
  47. GLfloat \fIv2\fP )
  48. .fi
  49. .EQ
  50. delim $$
  51. .EN
  52. .SH PARAMETERS
  53. .TP \w'\f2un\fP\ \ 'u
  54. \f2un\fP
  55. Specifies the number of partitions in the grid range interval
  56. [\f2u1\fP, \f2u2\fP].
  57. Must be positive.
  58. .TP
  59. \f2u1\fP, \f2u2\fP
  60. Specify the mappings for integer grid domain values $i~=~0$ and $i~=~"un"$.
  61. .TP
  62. \f2vn\fP
  63. Specifies the number of partitions in the grid range interval
  64. [\f2v1\fP, \f2v2\fP]
  65. .br
  66. (\%\f3glMapGrid2\fP only).
  67. .TP
  68. \f2v1\fP, \f2v2\fP
  69. Specify the mappings for integer grid domain values $j~=~0$ and $j~=~"vn"$
  70. .br
  71. (\%\f3glMapGrid2\fP only).
  72. .SH DESCRIPTION
  73. \%\f3glMapGrid\fP and \%\f3glEvalMesh\fP are used together to efficiently
  74. generate and evaluate a series of evenly-spaced map domain values.
  75. \%\f3glEvalMesh\fP steps through the integer domain
  76. of a one- or two-dimensional grid,
  77. whose range is the domain of the evaluation maps specified by
  78. \%\f3glMap1\fP and \%\f3glMap2\fP.
  79. .P
  80. \%\f3glMapGrid1\fP and \%\f3glMapGrid2\fP specify the linear grid mappings
  81. between the $i$
  82. (or $i$ and $j$)
  83. integer grid coordinates,
  84. to the $u$
  85. (or $u$ and $v$)
  86. floating-point evaluation map coordinates.
  87. See \%\f3glMap1\fP and \%\f3glMap2\fP for details of how $u$ and $v$ coordinates
  88. are evaluated.
  89. .P
  90. \%\f3glMapGrid1\fP specifies a single linear mapping
  91. such that integer grid coordinate 0 maps exactly to \f2u1\fP,
  92. and integer grid coordinate \f2un\fP maps exactly to \f2u2\fP.
  93. All other integer grid coordinates $i$ are mapped so that
  94. .sp
  95. .ce
  96. .EQ
  97. u ~=~ i ("u2" - "u1") / "un" ~+~ "u1"
  98. .EN
  99. .sp
  100. \%\f3glMapGrid2\fP specifies two such linear mappings.
  101. One maps integer grid coordinate $i~=~0$ exactly to \f2u1\fP,
  102. and integer grid coordinate $i~=~"un"$ exactly to \f2u2\fP.
  103. The other maps integer grid coordinate $j~=~0$ exactly to \f2v1\fP,
  104. and integer grid coordinate $j~=~"vn"$ exactly to \f2v2\fP.
  105. Other integer grid coordinates $i$ and $j$ are mapped such that
  106. .P
  107. .ce
  108. .EQ
  109. u ~=~ i ("u2" - "u1") / "un" ~+~ "u1"
  110. .EN
  111. .P
  112. .ce
  113. .EQ
  114. v ~=~ j ("v2" - "v1") / "vn" ~+~ "v1"
  115. .EN
  116. .P
  117. The mappings specified by \%\f3glMapGrid\fP are used identically by
  118. \%\f3glEvalMesh\fP and \%\f3glEvalPoint\fP.
  119. .SH ERRORS
  120. \%\f3GL_INVALID_VALUE\fP is generated if either \f2un\fP or \f2vn\fP is not
  121. positive.
  122. .P
  123. \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glMapGrid\fP
  124. is executed between the execution of \%\f3glBegin\fP
  125. and the corresponding execution of \%\f3glEnd\fP.
  126. .SH ASSOCIATED GETS
  127. \%\f3glGet\fP with argument \%\f3GL_MAP1_GRID_DOMAIN\fP
  128. .br
  129. \%\f3glGet\fP with argument \%\f3GL_MAP2_GRID_DOMAIN\fP
  130. .br
  131. \%\f3glGet\fP with argument \%\f3GL_MAP1_GRID_SEGMENTS\fP
  132. .br
  133. \%\f3glGet\fP with argument \%\f3GL_MAP2_GRID_SEGMENTS\fP
  134. .SH SEE ALSO
  135. \%\f3glEvalCoord(3G)\fP,
  136. \%\f3glEvalMesh(3G)\fP,
  137. \%\f3glEvalPoint(3G)\fP,
  138. \%\f3glMap1(3G)\fP,
  139. \%\f3glMap2(3G)\fP