Skip to main content
Engineering LibreTexts

9: Programming Languages

  • Page ID
    14085
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    This appendix contains brief introductions to three programming languages that are used in the textbook: Java, C, and JavaScript. You should be very familiar with at least one of the three languages before reading this textbook. The three languages have something in common, so that knowing one will make it easier to learn the others. You should also be at least somewhat familiar with classes, objects, and object-oriented programming.

    The appendix is meant to help you get started with the languages that you don’t already know. Only some basic information about each language is given—but hopefully enough to let you understand examples in the book and to write some programs that use the graphics techniques that are covered. You should at least be able to work with the sample programs that accompany this textbook.

    Java is obligatory only for Section 2.5. For the material on OpenGL 1.1 in Chapter 3 and Chapter 4, either Java or C can be used, but you will need to be at least somewhat familiar with C to follow the discussion. The shader programming language that is used with WebGL is based on C, so some knowledge of C will also be useful there. JavaScript is essential for WebGL programming (Chapter 6 and Chapter 7), and for programming with three.js (Chapter 5). It is also used for HTML canvas graphics in Section 2.6.


    This page titled 9: Programming Languages is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by David J. Eck via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?