COFFEE (Cinema 4D)

Last updated

COFFEE (often written as "C.O.F.F.E.E") was a computer scripting language that forms part of CINEMA 4D, a proprietary 3D graphics application. Although presented as an acronym the letters of the word COFFEE allegedly stand for Cinema Object-oriented Fery Fast Environment Enhancer, [1] it is primarily a comic reference to Java, a considerably more famous computer language.

Contents

COFFEE has been discontinued with Release 20 of Cinema 4D in 2018.

Purpose

Like most scripting languages, COFFEE is used to extend or modify the functionality of the host software. This technique is preferable to writing a so-called plug-in module using a traditional language such as C for a number of reasons, among them:

There are several different aspects of CINEMA 4D's operation that can be customised using COFFEE scripts, notably additions to the user interface and extensions for reading and writing new file formats and creating texture shaders. Almost all the main functionality of the application can be accessed from a COFFEE program, and so customised features can look and behave much like those supplied as standard.

Syntax and language features

COFFEE is a fairly typical curly bracket language and so it would look familiar to any previous user of C/C++, Java, Perl or anything along those lines. The function and object class definitions are closely modelled after those of C++. However, COFFEE is dynamically typed, and so variables are defined with a simple var keyword without any reference to their type. Unlike similar scripting languages such as Squirrel and JavaScript, COFFEE does not use a function keyword to introduce functions, nor does it require a return type or "void" return like C/C++ - the function definition simply begins with the function name.

COFFEE's memory management is handled entirely by a garbage collection process; essentially this means that it looks after itself, and the programmer seldom needs to worry about it. However, it is possible to control the process explicitly when necessary.

3D graphics programming makes extensive use of certain mathematical techniques, notably trigonometry and vector arithmetic. COFFEE is well equipped in this area, with a good set of mathematical functions and a built-in vector datatype.

Interface with CINEMA 4D

Since COFFEE is used to extend CINEMA 4D, it clearly needs to make use of the host program's features to some extent. Through the application programming interface (API) it is possible to locate 3D objects created by the user and access their internal data structures. For example, a new object can be created or an existing one modified or distorted from a script. Since a major purpose of COFFEE is to allow new file formats to be used, the Cinema API provides features useful for the task; a file input/output class is available and this allows individual items of binary data (such as integers and floating point numbers) to be read and written.

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2023, 98.7% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

<span class="mw-page-title-main">MATLAB</span> Numerical computing environment and programming language

MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages.

<span class="mw-page-title-main">GNUstep</span> Open source widget toolkit and application development tools

GNUstep is a free software implementation of the Cocoa Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project.

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

<span class="mw-page-title-main">Windows API</span> Microsofts core set of application programming interfaces on Windows

The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations that are often referred to by their own names. Almost all Windows programs interact with the Windows API. On the Windows NT line of operating systems, a small number use the Native API.

In object-oriented (OO) and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes change, but the object's state appears unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object.

Lingo is a verbose object-oriented (OO) scripting language developed by John H. Thompson for use in Adobe Director. Lingo is used to develop desktop application software, interactive kiosks, CD-ROMs and Adobe Shockwave content.

<span class="mw-page-title-main">ActionScript</span> Object-oriented programming language created for the Flash multimedia platform

ActionScript is an object-oriented programming language originally developed by Macromedia Inc.. It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript, though it originally arose as a sibling, both being influenced by HyperTalk. ActionScript code is usually converted to byte-code format by a compiler.

COLLADA is an interchange file format for interactive 3D applications. It is managed by the nonprofit technology consortium, the Khronos Group, and has been adopted by ISO as a publicly available specification, ISO/PAS 17506.

A user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and extra scriptability.

A GIS software program is a computer program to support the use of a geographic information system, providing the ability to create, store, manage, query, analyze, and visualize geographic data, that is, data representing phenomena for which location is important. The GIS software industry encompasses a broad range of commercial and open-source products that provide some or all of these capabilities within various information technology architectures.

Dynamic-link library (DLL) is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. These libraries usually have the file extension DLL, OCX, or DRV . The file formats for DLLs are the same as for Windows EXE files – that is, Portable Executable (PE) for 32-bit and 64-bit Windows, and New Executable (NE) for 16-bit Windows. As with EXEs, DLLs can contain code, data, and resources, in any combination.

Java AWT Native Interface (jawt) is an interface for the Java programming language that enables rendering libraries compiled to native code to draw directly to a Java Abstract Window Toolkit (AWT) Canvas object drawing surface.

<span class="mw-page-title-main">AmigaOS</span> Operating system for Amiga computers

AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions of AmigaOS required the Motorola 68000 series of 16-bit and 32-bit microprocessors. Later versions were developed by Haage & Partner and then Hyperion Entertainment. A PowerPC microprocessor is required for the most recent release, AmigaOS 4.

<span class="mw-page-title-main">Scripting language</span> Programming language for run-time events

A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled.

<span class="mw-page-title-main">API</span> Software interface between computer programs

An application programming interface (API) is in contrast with a User Interface. It is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or expose an API. The term API may refer either to the specification or to the implementation.

Many programming languages and other computer files have a directive, often called include, import, or copy, that causes the contents of the specified file to be inserted into the original file. These included files are called header files or copybooks. They are often used to define the physical layout of program data, pieces of procedural code, and/or forward declarations while promoting encapsulation and the reuse of code or data.

Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++, Rust/WinRT, Python/WinRT, JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET).

Google Chrome Experiments Online showroom of web browser based experiments

Google Chrome Experiments is an online showroom of web browser based experiments, interactive programs, and artistic projects. Launched on March 1, 2009, Google Chrome Experiments is an official Google website that was originally meant to test the limits of JavaScript and the Google Chrome browser's performance and abilities. As the project progressed, it took the role of showcasing and experimenting latest open-source web-based technologies, such as JavaScript, HTML5, WebGL, Canvas, SVG, CSS, and some others. All the projects on Chrome experiments are user submitted and are made using open source technologies. As of February 24, 2015, there were 1,000 different Chrome projects posted on the website.

References

  1. Sterner, Mikael. "What means C.O.F.F.E.E. ? - Plugin Cafe Forums". www.plugincafe.com. Retrieved 14 July 2019.