- var
- vertex: array[1..4] of record // or create an own type for it
- x, y, z: GLFloat;
- end;
- for Loop1 := 0 to Precision div 2 do begin
- // calculate vertex 1 and 2 into fields vertex[1] and [2]
- // for Loop2 you must use zero
- // important. Loop2 must start at 1 because first degree has allready been calculated
- for Loop2 := 1 to Precision do begin
- // calculate vertex 3 and 4 into fields vertex[3] and [4]
- glBindTexture
- glBegin(GL_QUADS);
- // Draw your points with you calculated value. vertex[1], [2], [3] and [4]
- // but texture coordinates must be in range from 0 to 1.
- // the coords from the code won't work because they use
- // only an small rect from the texture.
- glEnd;
- // store vertex[3] in [1] // vertex[1] := vertex[3] should work
- // store vertex[4] in [2]
- end
- end;