Difference between revisions of "Graphics Programming"

From Chessprogramming wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
'''[[Main Page|Home]] * [[Programming]] * Graphics Programming'''
 
'''[[Main Page|Home]] * [[Programming]] * Graphics Programming'''
  
'''Graphics Programming''' in computer chess is essentially about drawing [[Chess Position|chess positions]] or [[Chess Diagram|diagrams]] within a [[User Interface|user interface]] to give [https://en.wikipedia.org/wiki/User_%28computing%29 users] a visual [https://en.wikipedia.org/wiki/Feedback feedback] of the game state, while [https://en.wikipedia.org/wiki/Human%E2%80%93computer_interaction interacting] with the program.  
+
'''Graphics Programming''' in computer chess is essentially about drawing [[Chess Position|chess positions]] or diagrams within a [[User Interface|user interface]] to give [https://en.wikipedia.org/wiki/User_%28computing%29 users] a visual [https://en.wikipedia.org/wiki/Feedback feedback] of the game state, while [https://en.wikipedia.org/wiki/Human%E2%80%93computer_interaction interacting] with the program.  
  
 
=Visualization=
 
=Visualization=
Line 56: Line 56:
  
 
=Publications=  
 
=Publications=  
 +
==1979==
 
* [[Kathe Spracklen]] ('''1979'''). ''Micro Graphics and X-Y Plotter''. [[Personal Computing#3_2|Personal Computing, Vol. 3, No. 2]], pp. 75
 
* [[Kathe Spracklen]] ('''1979'''). ''Micro Graphics and X-Y Plotter''. [[Personal Computing#3_2|Personal Computing, Vol. 3, No. 2]], pp. 75
 +
==1990 ...==
 
* [[Alexander G. M. Smith]] ('''1991'''). ''[http://web.ncf.ca/au829/Handyman/Thesis.html Handyman - A Multiuser Puppeteering System for Computer Graphics Motion Control]''. Masters thesis, [https://en.wikipedia.org/wiki/Carleton_University Carleton University]  
 
* [[Alexander G. M. Smith]] ('''1991'''). ''[http://web.ncf.ca/au829/Handyman/Thesis.html Handyman - A Multiuser Puppeteering System for Computer Graphics Motion Control]''. Masters thesis, [https://en.wikipedia.org/wiki/Carleton_University Carleton University]  
 +
==2000 ...==
 +
* [[Vlad Stamate]] ('''2004'''). ''Reduction of lighting calculations using Spherical Harmonics''. in [http://www.shaderx3.com/Tables%20of%20Content.htm ShaderX3 - Advanced Rendering Techniques]
 +
* [[Vlad Stamate]] ('''2005'''). ''Real-time damage deformation methods''. in [http://www.shaderx4.com/TOC.html ShaderX4 - Advanced Rendering Techniques]
 
* [[Oliver Vornberger]] ('''2006'''). ''[http://www-lehre.inf.uos.de/%7Ecg/2006/skript/skript.html Computergrafik]''. [http://www-lehre.inf.uos.de/%7Ecg/2006/PDF/skript.pdf pdf] (German)
 
* [[Oliver Vornberger]] ('''2006'''). ''[http://www-lehre.inf.uos.de/%7Ecg/2006/skript/skript.html Computergrafik]''. [http://www-lehre.inf.uos.de/%7Ecg/2006/PDF/skript.pdf pdf] (German)
 
* [[Leen Ammeraal]], [http://www.utdallas.edu/%7Ekzhang/ Kang Zhang] ('''2007'''). ''[http://home.planet.nl/%7Eammeraal/grjava2e.html Computer Graphics for Java Programmers]''. 2nd edition, [https://en.wikipedia.org/wiki/Wiley_(publisher) Wiley]  
 
* [[Leen Ammeraal]], [http://www.utdallas.edu/%7Ekzhang/ Kang Zhang] ('''2007'''). ''[http://home.planet.nl/%7Eammeraal/grjava2e.html Computer Graphics for Java Programmers]''. 2nd edition, [https://en.wikipedia.org/wiki/Wiley_(publisher) Wiley]  
 
* [http://goossens.web.cern.ch/goossens/ Michel Goossens], [http://www.informit.com/authors/bio.aspx?a=A2624A62-C2B4-40F9-B8ED-E99563F89A27 Frank Mittelbach], [http://users.ox.ac.uk/~rahtz/ Sebastian Rahtz], [http://www.loria.fr/~roegel/ Denis Roegel], [http://www.uit.co.uk/Authors/HerbVoss Herbert Voß] ('''2007'''). ''[http://xml.web.cern.ch/XML/lgc2/ The LATEXGraphics Companion]''. 2nd edition, Addison-Wesley, [http://ptgmedia.pearsoncmg.com/images/9780321508928/samplepages/0321508920_Sample.pdf sample pdf], 10.1 Chess, 10.2 Xiangqi—Chinese Chess <ref>[https://en.wikipedia.org/wiki/LaTeX LaTeX from Wikipedia]</ref>
 
* [http://goossens.web.cern.ch/goossens/ Michel Goossens], [http://www.informit.com/authors/bio.aspx?a=A2624A62-C2B4-40F9-B8ED-E99563F89A27 Frank Mittelbach], [http://users.ox.ac.uk/~rahtz/ Sebastian Rahtz], [http://www.loria.fr/~roegel/ Denis Roegel], [http://www.uit.co.uk/Authors/HerbVoss Herbert Voß] ('''2007'''). ''[http://xml.web.cern.ch/XML/lgc2/ The LATEXGraphics Companion]''. 2nd edition, Addison-Wesley, [http://ptgmedia.pearsoncmg.com/images/9780321508928/samplepages/0321508920_Sample.pdf sample pdf], 10.1 Chess, 10.2 Xiangqi—Chinese Chess <ref>[https://en.wikipedia.org/wiki/LaTeX LaTeX from Wikipedia]</ref>
 +
* [[Vlad Stamate]] ('''2008'''). ''Real Time Photon Mapping Approximation on the GPU''. in [http://shaderx6.com/TOC.html ShaderX6 - Advanced Rendering Techniques] <ref>[https://en.wikipedia.org/wiki/Photon_mapping Photon mapping from Wikipedia]</ref>
 +
==2010 ...==
 
* [https://en.wikipedia.org/wiki/Eric_Lengyel Eric Lengye] ('''2011'''). ''[http://www.mathfor3dgameprogramming.com/ Mathematics for 3D Game Programming and Computer Graphics, 3rd edition]''. [http://www.amazon.com/exec/obidos/tg/detail/-/1435458869 amazon.com]
 
* [https://en.wikipedia.org/wiki/Eric_Lengyel Eric Lengye] ('''2011'''). ''[http://www.mathfor3dgameprogramming.com/ Mathematics for 3D Game Programming and Computer Graphics, 3rd edition]''. [http://www.amazon.com/exec/obidos/tg/detail/-/1435458869 amazon.com]
 
* [[Leen Ammeraal]], [http://www.utdallas.edu/%7Ekzhang/ Kang Zhang] ('''2017'''). ''[http://home.planet.nl/~ammeraal/grjava3e.html Computer Graphics for Java Programmers]''. 3rd edition, [https://en.wikipedia.org/wiki/Springer_Science%2BBusiness_Media Springer]
 
* [[Leen Ammeraal]], [http://www.utdallas.edu/%7Ekzhang/ Kang Zhang] ('''2017'''). ''[http://home.planet.nl/~ammeraal/grjava3e.html Computer Graphics for Java Programmers]''. 3rd edition, [https://en.wikipedia.org/wiki/Springer_Science%2BBusiness_Media Springer]

Latest revision as of 11:32, 28 May 2020

Home * Programming * Graphics Programming

Graphics Programming in computer chess is essentially about drawing chess positions or diagrams within a user interface to give users a visual feedback of the game state, while interacting with the program.

Visualization

Pseudo Graphics

ASCII Diagrams

ASCII Diagrams on teleprinters were already used by early programs, such as The Bernstein Chess Program, and are still appropriate today for a rudimentary text oriented command line user interface, to display a position on a terminal with monospaced ASCII characters. One may further store the characters inside "human readable" ASCII files for logging- or debugging purposes. Several proposals to display an ASCII board were made in CCC [1] [2] . Ernst A. Heinz came up with the left one [3] , Reinhard Scharnagl proposed the right one with the remarks below [4] :

kqKQ -
  +------------------------+       +-*--b--c--d--*--f--g--*-+
8 |*R *N:*B *Q:*K *B:*N *R:|     8 |[r][n][b][q][k][b][n][r]|
7 |*P:*P *P:*P *P:*P *P:*P |     7 |[p][p][p][p][p][p][p][p]|
6 |   :::   :::   :::   :::|     6 |   :::   :::   :::   :::|
5 |:::   :::   :::   :::   |     5 |:::   :::   :::   :::   |
4 |   :::   :::   :::   :::|     4 |   :::   :::   :::   :::|
3 |:::   :::   :::   :::   |     3 |:::   :::   :::   :::   |
2 | P :P: P :P: P :P: P :P:|     2 |<P><P><P><P><P><P><P><P>|
1 |:R: N :B: Q :K: B :N: R |     1 |<R><N><B><Q><K><B><N><R>|
  +------------------------+     =>+-*--b--c--d--*--f--g--*-+
    a  b  c  d  e  f  g  h

Remarks:
a) with "*"  is shown, where castling potential resides (FRC specific)
b) with "=>" is shown, which side has to move

Semigraphics

Some of the early home computers had semigraphics characters and sprites [5] for a more realistic board representation of chess programs.

Microchess-1-5-trs80-screenshot.l062302023.jennings.jpg

MicroChess Screen on TRS-80, 1976 [6]

High Resolution Graphics

Next generation home- and personal computers already did support not only text mode and semigraphics, but graphic modes for resolutions supported by the computer monitor and its video controller. A system call was necessary to switch the video card into a mode, where each pixel was an element of an array mapped into the main memory, either bit-wise for black-and-white or nibble-, byte- or word-wise for sixteen, 256 or more colors or grayscale.

DOS Area

Programs running under MS-DOS on IBM PCs, initially using a color graphics adapter (CGA), and later Hercules graphics cards and video graphics array (VGA), needed to use a BIOS interrupt call, the INT 10H, to switch graphic modes accordantly to make all points addressable. Chess programs usually worked in fullscreen mode at that times on single tasking operating systems, the program run exclusively and could access whole the hardware and memory. A VGA resolution of 640x480 was quite sufficient for drawing an ergonomic chess board in 2D or even 3D.

Abstraction

With the advent of multitasking operating systems with memory protection between processes and a protection ring model, and their graphical user interfaces and window managers, direct access was no longer possible, and video hardware became abstract, accessible via API-calls of kernel- or graphic libraries or toolkits.

Screenshots

275507-psion-chess-atari-st-screenshot-information-window-colour.png

Psion for Atari ST [7]

See also

Publications

1979

1990 ...

2000 ...

2010 ...

Forum Posts

External Links

Algorithms

Digital Differential Analyzer (graphics algorithm)
Bresenham's line algorithm
Xiaolin Wu's line algorithm
De Boor's algorithm
De Casteljau's algorithm

Coordinates

Cartesian coordinate system
Curvilinear coordinates
Reflection (mathematics)
Rotation (mathematics)
Rotation matrix
Transformation matrix
Translation (geometry)

Geometric primitives

Toolkits, Libraries and APIs

Direct2D from Wikipedia
Direct3D from Wikipedia
DirectDraw from Wikipedia
DirectDraw Surface from Wikipedia
CDC Class - Device Context, Microsoft Foundation Class Library, MSDN
gtkmm from Wikipedia
Gtk Sharp from Wikipedia
lib-gwt-svg « vectomatic
vectomatic - standard dynamic 2D graphics in web browsers - Google Project Hosting
Graphics Programming - Introduction to OpenGL (pdf)
Comparison of OpenGL and Direct3D from Wikipedia
X11.app (XQuartz) from Wikipedia » OS X

Misc

Hiromi Uehara, Martin Valihora, Tony Grey, David Fiuczynski

References

Up one Level